openapi: 3.0.0 info: title: OpenAI Assistants Conversations API description: The Assistants API allows you to build AI assistants within your own applications. An Assistant has instructions and can leverage models, tools, and knowledge to respond to user queries. The Assistants API currently supports three types of tools - Code Interpreter, Retrieval, and Function calling. In the future, we plan to release more OpenAI-built tools, and allow you to provide your own tools on our platform. version: 2.0.0 termsOfService: https://openai.com/policies/terms-of-use contact: name: OpenAI Support url: https://help.openai.com/ license: name: MIT url: https://github.com/openai/openai-openapi/blob/master/LICENSE servers: - url: https://api.openai.com/v1 security: - ApiKeyAuth: [] tags: - name: Conversations description: Manage conversations and conversation items. paths: /conversations/{conversation_id}/items: post: operationId: createConversationItems tags: - Conversations summary: Create items in a conversation with the given ID. parameters: - in: path name: conversation_id required: true schema: type: string example: conv_123 description: The ID of the conversation to add the item to. - name: include in: query required: false schema: type: array items: $ref: '#/components/schemas/IncludeEnum' description: 'Additional fields to include in the response. See the `include` parameter for [listing Conversation items above](/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information. ' requestBody: required: true content: application/json: schema: properties: items: type: array description: 'The items to add to the conversation. You may add up to 20 items at a time. ' items: $ref: '#/components/schemas/InputItem' maxItems: 20 required: - items responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ConversationItemList' x-oaiMeta: name: Create items group: conversations path: create-item examples: request: curl: "curl https://api.openai.com/v1/conversations/conv_123/items \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"items\": [\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ]\n }'\n" javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst items = await client.conversations.items.create(\n \"conv_123\",\n {\n items: [\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"Hello!\" }],\n },\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"How are you?\" }],\n },\n ],\n }\n);\nconsole.log(items.data);\n" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n \"type\": \"message\",\n }],\n)\nprint(conversation_item_list.first_id)" csharp: "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItemList created = client.ConversationItems.Create(\n conversationId: \"conv_123\",\n new CreateConversationItemsOptions\n {\n Items = new List\n {\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"Hello!\" }\n }\n },\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"How are you?\" }\n }\n }\n }\n }\n);\nConsole.WriteLine(created.Data.Count);\n" node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [\n {\n content: 'string',\n role: 'user',\n type: 'message',\n },\n ],\n});\n\nconsole.log(conversationItemList.first_id);" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversationItemList, err := client.Conversations.Items.New(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\tconversations.ItemNewParams{\n\t\t\tItems: []responses.ResponseInputItemUnionParam{{\n\t\t\t\tOfMessage: &responses.EasyInputMessageParam{\n\t\t\t\t\tContent: responses.EasyInputMessageContentUnionParam{\n\t\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t\t},\n\t\t\t\t\tRole: responses.EasyInputMessageRoleUser,\n\t\t\t\t\tType: responses.EasyInputMessageTypeMessage,\n\t\t\t\t},\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversationItemList.FirstID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItemList;\nimport com.openai.models.conversations.items.ItemCreateParams;\nimport com.openai.models.responses.EasyInputMessage;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemCreateParams params = ItemCreateParams.builder()\n .conversationId(\"conv_123\")\n .addItem(EasyInputMessage.builder()\n .content(\"string\")\n .role(EasyInputMessage.Role.USER)\n .type(EasyInputMessage.Type.MESSAGE)\n .build())\n .build();\n ConversationItemList conversationItemList = client.conversations().items().create(params);\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") conversation_item_list = openai.conversations.items.create("conv_123", items: [{content: "string", role: :user, type: :message}]) puts(conversation_item_list)' response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"id\": \"msg_def\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ],\n \"first_id\": \"msg_abc\",\n \"last_id\": \"msg_def\",\n \"has_more\": false\n}\n" get: operationId: listConversationItems tags: - Conversations summary: List all items for a conversation with the given ID. parameters: - in: path name: conversation_id required: true schema: type: string example: conv_123 description: The ID of the conversation to list items for. - name: limit in: query description: 'A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. ' required: false schema: type: integer default: 20 - in: query name: order schema: type: string enum: - asc - desc description: 'The order to return the input items in. Default is `desc`. - `asc`: Return the input items in ascending order. - `desc`: Return the input items in descending order. ' - in: query name: after schema: type: string description: 'An item ID to list items after, used in pagination. ' - name: include in: query required: false schema: type: array items: $ref: '#/components/schemas/IncludeEnum' description: 'Specify additional output data to include in the model response. Currently supported values are: - `web_search_call.action.sources`: Include the sources of the web search tool call. - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items. - `computer_call_output.output.image_url`: Include image urls from the computer call output. - `file_search_call.results`: Include the search results of the file search tool call. - `message.input_image.image_url`: Include image urls from the input message. - `message.output_text.logprobs`: Include logprobs with assistant messages. - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ConversationItemList' x-oaiMeta: name: List items group: conversations path: list-items examples: request: curl: "curl \"https://api.openai.com/v1/conversations/conv_123/items?limit=10\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" javascript: 'import OpenAI from "openai"; const client = new OpenAI(); const items = await client.conversations.items.list("conv_123", { limit: 10 }); console.log(items.data); ' python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.conversations.items.list(\n conversation_id=\"conv_123\",\n)\npage = page.data[0]\nprint(page)" csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItemList items = client.ConversationItems.List(\n conversationId: \"conv_123\",\n new ListConversationItemsOptions { Limit = 10 }\n);\nConsole.WriteLine(items.Data.Count);\n" node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const conversationItem of client.conversations.items.list('conv_123')) {\n console.log(conversationItem);\n}" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Conversations.Items.List(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\tconversations.ItemListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ItemListPage;\nimport com.openai.models.conversations.items.ItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemListPage page = client.conversations().items().list(\"conv_123\");\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") page = openai.conversations.items.list("conv_123") puts(page)' response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n }\n ],\n \"first_id\": \"msg_abc\",\n \"last_id\": \"msg_abc\",\n \"has_more\": false\n}\n" /conversations/{conversation_id}/items/{item_id}: get: operationId: getConversationItem tags: - Conversations summary: Get a single item from a conversation with the given IDs. parameters: - in: path name: conversation_id required: true schema: type: string example: conv_123 description: The ID of the conversation that contains the item. - in: path name: item_id required: true schema: type: string example: msg_abc description: The ID of the item to retrieve. - name: include in: query required: false schema: type: array items: $ref: '#/components/schemas/IncludeEnum' description: 'Additional fields to include in the response. See the `include` parameter for [listing Conversation items above](/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information. ' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ConversationItem' x-oaiMeta: name: Retrieve an item group: conversations path: get-item examples: request: curl: "curl https://api.openai.com/v1/conversations/conv_123/items/msg_abc \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst item = await client.conversations.items.retrieve(\n \"conv_123\",\n \"msg_abc\"\n);\nconsole.log(item);\n" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation_item = client.conversations.items.retrieve(\n item_id=\"msg_abc\",\n conversation_id=\"conv_123\",\n)\nprint(conversation_item)" csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItem item = client.ConversationItems.Get(\n conversationId: \"conv_123\",\n itemId: \"msg_abc\"\n);\nConsole.WriteLine(item.Id);\n" node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationItem = await client.conversations.items.retrieve('msg_abc', {\n conversation_id: 'conv_123',\n});\n\nconsole.log(conversationItem);" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversationItem, err := client.Conversations.Items.Get(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\t\"msg_abc\",\n\t\tconversations.ItemGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversationItem)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItem;\nimport com.openai.models.conversations.items.ItemRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemRetrieveParams params = ItemRetrieveParams.builder()\n .conversationId(\"conv_123\")\n .itemId(\"msg_abc\")\n .build();\n ConversationItem conversationItem = client.conversations().items().retrieve(params);\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") conversation_item = openai.conversations.items.retrieve("msg_abc", conversation_id: "conv_123") puts(conversation_item)' response: "{\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n}\n" delete: operationId: deleteConversationItem tags: - Conversations summary: Delete an item from a conversation with the given IDs. parameters: - in: path name: conversation_id required: true schema: type: string example: conv_123 description: The ID of the conversation that contains the item. - in: path name: item_id required: true schema: type: string example: msg_abc description: The ID of the item to delete. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ConversationResource' x-oaiMeta: name: Delete an item group: conversations path: delete-item examples: request: curl: "curl -X DELETE https://api.openai.com/v1/conversations/conv_123/items/msg_abc \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst conversation = await client.conversations.items.delete(\n \"conv_123\",\n \"msg_abc\"\n);\nconsole.log(conversation);\n" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation = client.conversations.items.delete(\n item_id=\"msg_abc\",\n conversation_id=\"conv_123\",\n)\nprint(conversation.id)" csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation conversation = client.ConversationItems.Delete(\n conversationId: \"conv_123\",\n itemId: \"msg_abc\"\n);\nConsole.WriteLine(conversation.Id);\n" node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversation = await client.conversations.items.delete('msg_abc', {\n conversation_id: 'conv_123',\n});\n\nconsole.log(conversation.id);" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversation, err := client.Conversations.Items.Delete(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\t\"msg_abc\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversation.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.items.ItemDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemDeleteParams params = ItemDeleteParams.builder()\n .conversationId(\"conv_123\")\n .itemId(\"msg_abc\")\n .build();\n Conversation conversation = client.conversations().items().delete(params);\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") conversation = openai.conversations.items.delete("msg_abc", conversation_id: "conv_123") puts(conversation)' response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation\",\n \"created_at\": 1741900000,\n \"metadata\": {\"topic\": \"demo\"}\n}\n" /conversations: post: tags: - Conversations summary: Create a conversation. operationId: createConversation parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateConversationBody' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ConversationResource' x-oaiMeta: name: Create a conversation group: conversations path: create examples: request: curl: "curl https://api.openai.com/v1/conversations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"metadata\": {\"topic\": \"demo\"},\n \"items\": [\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n" javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst conversation = await client.conversations.create({\n metadata: { topic: \"demo\" },\n items: [\n { type: \"message\", role: \"user\", content: \"Hello!\" }\n ],\n});\nconsole.log(conversation);\n" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation = client.conversations.create()\nprint(conversation.id)" csharp: "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation conversation = client.CreateConversation(\n new CreateConversationOptions\n {\n Metadata = new Dictionary\n {\n { \"topic\", \"demo\" }\n },\n Items =\n {\n new ConversationMessageInput\n {\n Role = \"user\",\n Content = \"Hello!\",\n }\n }\n }\n);\nConsole.WriteLine(conversation.Id);\n" node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversation = await client.conversations.create();\n\nconsole.log(conversation.id);" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversation, err := client.Conversations.New(context.TODO(), conversations.ConversationNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversation.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.ConversationCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Conversation conversation = client.conversations().create();\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") conversation = openai.conversations.create puts(conversation)' response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation\",\n \"created_at\": 1741900000,\n \"metadata\": {\"topic\": \"demo\"}\n}\n" /conversations/{conversation_id}: get: tags: - Conversations summary: Get a conversation operationId: getConversation parameters: - name: conversation_id in: path description: The ID of the conversation to retrieve. required: true schema: example: conv_123 type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ConversationResource' x-oaiMeta: name: Retrieve a conversation group: conversations path: retrieve examples: request: curl: "curl https://api.openai.com/v1/conversations/conv_123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" javascript: 'import OpenAI from "openai"; const client = new OpenAI(); const conversation = await client.conversations.retrieve("conv_123"); console.log(conversation); ' python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation = client.conversations.retrieve(\n \"conv_123\",\n)\nprint(conversation.id)" csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation conversation = client.GetConversation(\"conv_123\");\nConsole.WriteLine(conversation.Id);\n" node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversation = await client.conversations.retrieve('conv_123');\n\nconsole.log(conversation.id);" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversation, err := client.Conversations.Get(context.TODO(), \"conv_123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversation.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.ConversationRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Conversation conversation = client.conversations().retrieve(\"conv_123\");\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") conversation = openai.conversations.retrieve("conv_123") puts(conversation)' response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation\",\n \"created_at\": 1741900000,\n \"metadata\": {\"topic\": \"demo\"}\n}\n" delete: tags: - Conversations summary: Delete a conversation. Items in the conversation will not be deleted. operationId: deleteConversation parameters: - name: conversation_id in: path description: The ID of the conversation to delete. required: true schema: example: conv_123 type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeletedConversationResource' x-oaiMeta: name: Delete a conversation group: conversations path: delete examples: request: curl: "curl -X DELETE https://api.openai.com/v1/conversations/conv_123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" javascript: 'import OpenAI from "openai"; const client = new OpenAI(); const deleted = await client.conversations.delete("conv_123"); console.log(deleted); ' python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation_deleted_resource = client.conversations.delete(\n \"conv_123\",\n)\nprint(conversation_deleted_resource.id)" csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nDeletedConversation deleted = client.DeleteConversation(\"conv_123\");\nConsole.WriteLine(deleted.Id);\n" node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationDeletedResource = await client.conversations.delete('conv_123');\n\nconsole.log(conversationDeletedResource.id);" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversationDeletedResource, err := client.Conversations.Delete(context.TODO(), \"conv_123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversationDeletedResource.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.ConversationDeleteParams;\nimport com.openai.models.conversations.ConversationDeletedResource;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ConversationDeletedResource conversationDeletedResource = client.conversations().delete(\"conv_123\");\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") conversation_deleted_resource = openai.conversations.delete("conv_123") puts(conversation_deleted_resource)' response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation.deleted\",\n \"deleted\": true\n}\n" post: tags: - Conversations summary: Update a conversation operationId: updateConversation parameters: - name: conversation_id in: path description: The ID of the conversation to update. required: true schema: example: conv_123 type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateConversationBody' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ConversationResource' x-oaiMeta: name: Update a conversation group: conversations path: update examples: request: curl: "curl https://api.openai.com/v1/conversations/conv_123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"metadata\": {\"topic\": \"project-x\"}\n }'\n" javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst updated = await client.conversations.update(\n \"conv_123\",\n { metadata: { topic: \"project-x\" } }\n);\nconsole.log(updated);\n" python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation = client.conversations.update(\n conversation_id=\"conv_123\",\n metadata={\n \"foo\": \"string\"\n },\n)\nprint(conversation.id)" csharp: "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation updated = client.UpdateConversation(\n conversationId: \"conv_123\",\n new UpdateConversationOptions\n {\n Metadata = new Dictionary\n {\n { \"topic\", \"project-x\" }\n }\n }\n);\nConsole.WriteLine(updated.Id);\n" node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversation = await client.conversations.update('conv_123', { metadata: { foo: 'string' } });\n\nconsole.log(conversation.id);" go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversation, err := client.Conversations.Update(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\tconversations.ConversationUpdateParams{\n\t\t\tMetadata: shared.Metadata{\n\t\t\t\t\"foo\": \"string\",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversation.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.JsonValue;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.ConversationUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ConversationUpdateParams params = ConversationUpdateParams.builder()\n .conversationId(\"conv_123\")\n .metadata(ConversationUpdateParams.Metadata.builder()\n .putAdditionalProperty(\"foo\", JsonValue.from(\"string\"))\n .build())\n .build();\n Conversation conversation = client.conversations().update(params);\n }\n}" ruby: 'require "openai" openai = OpenAI::Client.new(api_key: "My API Key") conversation = openai.conversations.update("conv_123", metadata: {foo: "string"}) puts(conversation)' response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation\",\n \"created_at\": 1741900000,\n \"metadata\": {\"topic\": \"project-x\"}\n}\n" components: schemas: Annotation: oneOf: - $ref: '#/components/schemas/FileCitationBody' - $ref: '#/components/schemas/UrlCitationBody' - $ref: '#/components/schemas/ContainerFileCitationBody' - $ref: '#/components/schemas/FilePath' description: An annotation that applies to a span of output text. discriminator: propertyName: type ApplyPatchUpdateFileOperation: properties: type: type: string enum: - update_file description: Update an existing file with the provided diff. default: update_file x-stainless-const: true path: type: string description: Path of the file to update. diff: type: string description: Diff to apply. type: object required: - type - path - diff title: Apply patch update file operation description: Instruction describing how to update a file via the apply_patch tool. ConversationItem: title: Conversation item description: A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](/docs/api-reference/responses/object#responses/object-output). oneOf: - $ref: '#/components/schemas/Message' - $ref: '#/components/schemas/FunctionToolCallResource' - $ref: '#/components/schemas/FunctionToolCallOutputResource' - $ref: '#/components/schemas/FileSearchToolCall' - $ref: '#/components/schemas/WebSearchToolCall' - $ref: '#/components/schemas/ImageGenToolCall' - $ref: '#/components/schemas/ComputerToolCall' - $ref: '#/components/schemas/ComputerToolCallOutputResource' - $ref: '#/components/schemas/ToolSearchCall' - $ref: '#/components/schemas/ToolSearchOutput' - $ref: '#/components/schemas/ReasoningItem' - $ref: '#/components/schemas/CompactionBody' - $ref: '#/components/schemas/CodeInterpreterToolCall' - $ref: '#/components/schemas/LocalShellToolCall' - $ref: '#/components/schemas/LocalShellToolCallOutput' - $ref: '#/components/schemas/FunctionShellCall' - $ref: '#/components/schemas/FunctionShellCallOutput' - $ref: '#/components/schemas/ApplyPatchToolCall' - $ref: '#/components/schemas/ApplyPatchToolCallOutput' - $ref: '#/components/schemas/MCPListTools' - $ref: '#/components/schemas/MCPApprovalRequest' - $ref: '#/components/schemas/MCPApprovalResponseResource' - $ref: '#/components/schemas/MCPToolCall' - $ref: '#/components/schemas/CustomToolCall' - $ref: '#/components/schemas/CustomToolCallOutput' discriminator: propertyName: type FileCitationBody: properties: type: type: string enum: - file_citation description: The type of the file citation. Always `file_citation`. default: file_citation x-stainless-const: true file_id: type: string description: The ID of the file. index: type: integer description: The index of the file in the list of files. filename: type: string description: The filename of the file cited. type: object required: - type - file_id - index - filename title: File citation description: A citation to a file. FunctionShellCallOutputContentParam: properties: stdout: type: string maxLength: 10485760 description: Captured stdout output for the shell call. stderr: type: string maxLength: 10485760 description: Captured stderr output for the shell call. outcome: $ref: '#/components/schemas/FunctionShellCallOutputOutcomeParam' description: The exit or timeout outcome associated with this shell call. type: object required: - stdout - stderr - outcome title: Shell output content description: Captured stdout and stderr for a portion of a shell tool call output. FileSearchToolCall: type: object title: File search tool call description: 'The results of a file search tool call. See the [file search guide](/docs/guides/tools-file-search) for more information. ' properties: id: type: string description: 'The unique ID of the file search tool call. ' type: type: string enum: - file_search_call description: 'The type of the file search tool call. Always `file_search_call`. ' x-stainless-const: true status: type: string description: 'The status of the file search tool call. One of `in_progress`, `searching`, `incomplete` or `failed`, ' enum: - in_progress - searching - completed - incomplete - failed queries: type: array items: type: string description: 'The queries used to search for files. ' results: anyOf: - type: array description: 'The results of the file search tool call. ' items: type: object properties: file_id: type: string description: 'The unique ID of the file. ' text: type: string description: 'The text that was retrieved from the file. ' filename: type: string description: 'The name of the file. ' attributes: $ref: '#/components/schemas/VectorStoreFileAttributes' score: type: number format: float description: 'The relevance score of the file - a value between 0 and 1. ' - type: 'null' required: - id - type - status - queries WebSearchTool: type: object title: Web search description: 'Search the Internet for sources related to the prompt. Learn more about the [web search tool](/docs/guides/tools-web-search). ' properties: type: type: string enum: - web_search - web_search_2025_08_26 description: The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. default: web_search filters: anyOf: - type: object description: 'Filters for the search. ' properties: allowed_domains: anyOf: - type: array title: Allowed domains for the search. description: 'Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well. Example: `["pubmed.ncbi.nlm.nih.gov"]` ' items: type: string description: Allowed domain for the search. default: [] - type: 'null' - type: 'null' user_location: $ref: '#/components/schemas/WebSearchApproximateLocation' search_context_size: type: string enum: - low - medium - high default: medium description: 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. required: - type WebSearchActionSearch: type: object title: Search action description: 'Action type "search" - Performs a web search query. ' properties: type: type: string enum: - search description: 'The action type. ' x-stainless-const: true query: type: string description: '[DEPRECATED] The search query. ' queries: type: array title: Search queries description: 'The search queries. ' items: type: string description: 'A search query. ' sources: type: array title: Web search sources description: 'The sources used in the search. ' items: type: object title: Web search source description: 'A source used in the search. ' properties: type: type: string enum: - url description: 'The type of source. Always `url`. ' x-stainless-const: true url: type: string format: uri description: 'The URL of the source. ' required: - type - url required: - type - query InlineSkillParam: properties: type: type: string enum: - inline description: Defines an inline skill for this request. default: inline x-stainless-const: true name: type: string description: The name of the skill. description: type: string description: The description of the skill. source: $ref: '#/components/schemas/InlineSkillSourceParam' description: Inline skill payload type: object required: - type - name - description - source FunctionShellCallOutput: properties: type: type: string enum: - shell_call_output description: The type of the shell call output. Always `shell_call_output`. default: shell_call_output x-stainless-const: true id: type: string description: The unique ID of the shell call output. Populated when this item is returned via API. call_id: type: string description: The unique ID of the shell tool call generated by the model. status: $ref: '#/components/schemas/FunctionShellCallOutputStatusEnum' description: The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. output: items: $ref: '#/components/schemas/FunctionShellCallOutputContent' type: array description: An array of shell call output contents max_output_length: anyOf: - type: integer description: The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. - type: 'null' created_by: type: string description: The identifier of the actor that created the item. type: object required: - type - id - call_id - status - output - max_output_length title: Shell call output description: The output of a shell tool call that was emitted. ImageGenActionEnum: type: string enum: - generate - edit - auto FunctionShellCall: properties: type: type: string enum: - shell_call description: The type of the item. Always `shell_call`. default: shell_call x-stainless-const: true id: type: string description: The unique ID of the shell tool call. Populated when this item is returned via API. call_id: type: string description: The unique ID of the shell tool call generated by the model. action: $ref: '#/components/schemas/FunctionShellAction' description: The shell commands and limits that describe how to run the tool call. status: $ref: '#/components/schemas/FunctionShellCallStatus' description: The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. environment: anyOf: - oneOf: - $ref: '#/components/schemas/LocalEnvironmentResource' - $ref: '#/components/schemas/ContainerReferenceResource' discriminator: propertyName: type - type: 'null' created_by: type: string description: The ID of the entity that created this tool call. type: object required: - type - id - call_id - action - status - environment title: Shell tool call description: A tool call that executes one or more shell commands in a managed environment. CustomToolCall: type: object title: Custom tool call description: 'A call to a custom tool created by the model. ' properties: type: type: string enum: - custom_tool_call x-stainless-const: true description: 'The type of the custom tool call. Always `custom_tool_call`. ' id: type: string description: 'The unique ID of the custom tool call in the OpenAI platform. ' call_id: type: string description: 'An identifier used to map this custom tool call to a tool call output. ' namespace: type: string description: 'The namespace of the custom tool being called. ' name: type: string description: 'The name of the custom tool being called. ' input: type: string description: 'The input for the custom tool call generated by the model. ' required: - type - call_id - name - input FileInputDetail: type: string enum: - low - high CodeInterpreterOutputLogs: properties: type: type: string enum: - logs description: The type of the output. Always `logs`. default: logs x-stainless-const: true logs: type: string description: The logs output from the code interpreter. type: object required: - type - logs title: Code interpreter output logs description: The logs output from the code interpreter. ReasoningTextContent: properties: type: type: string enum: - reasoning_text description: The type of the reasoning text. Always `reasoning_text`. default: reasoning_text x-stainless-const: true text: type: string description: The reasoning text from the model. type: object required: - type - text title: Reasoning text description: Reasoning text from the model. DeletedConversationResource: properties: object: type: string enum: - conversation.deleted default: conversation.deleted x-stainless-const: true deleted: type: boolean id: type: string type: object required: - object - deleted - id Item: type: object description: 'Content item used to generate a response. ' oneOf: - $ref: '#/components/schemas/InputMessage' - $ref: '#/components/schemas/OutputMessage' - $ref: '#/components/schemas/FileSearchToolCall' - $ref: '#/components/schemas/ComputerToolCall' - $ref: '#/components/schemas/ComputerCallOutputItemParam' - $ref: '#/components/schemas/WebSearchToolCall' - $ref: '#/components/schemas/FunctionToolCall' - $ref: '#/components/schemas/FunctionCallOutputItemParam' - $ref: '#/components/schemas/ToolSearchCallItemParam' - $ref: '#/components/schemas/ToolSearchOutputItemParam' - $ref: '#/components/schemas/ReasoningItem' - $ref: '#/components/schemas/CompactionSummaryItemParam' - $ref: '#/components/schemas/ImageGenToolCall' - $ref: '#/components/schemas/CodeInterpreterToolCall' - $ref: '#/components/schemas/LocalShellToolCall' - $ref: '#/components/schemas/LocalShellToolCallOutput' - $ref: '#/components/schemas/FunctionShellCallItemParam' - $ref: '#/components/schemas/FunctionShellCallOutputItemParam' - $ref: '#/components/schemas/ApplyPatchToolCallItemParam' - $ref: '#/components/schemas/ApplyPatchToolCallOutputItemParam' - $ref: '#/components/schemas/MCPListTools' - $ref: '#/components/schemas/MCPApprovalRequest' - $ref: '#/components/schemas/MCPApprovalResponse' - $ref: '#/components/schemas/MCPToolCall' - $ref: '#/components/schemas/CustomToolCallOutput' - $ref: '#/components/schemas/CustomToolCall' discriminator: propertyName: type ToolSearchOutputItemParam: properties: id: anyOf: - type: string description: The unique ID of this tool search output. example: tso_123 - type: 'null' call_id: anyOf: - type: string maxLength: 64 minLength: 1 description: The unique ID of the tool search call generated by the model. - type: 'null' type: type: string enum: - tool_search_output description: The item type. Always `tool_search_output`. default: tool_search_output x-stainless-const: true execution: $ref: '#/components/schemas/ToolSearchExecutionType' description: Whether tool search was executed by the server or by the client. tools: items: $ref: '#/components/schemas/Tool' type: array description: The loaded tool definitions returned by the tool search output. status: anyOf: - $ref: '#/components/schemas/FunctionCallItemStatus' description: The status of the tool search output. - type: 'null' type: object required: - type - tools SearchContentType: type: string enum: - text - image OutputMessage: type: object title: Output message description: 'An output message from the model. ' properties: id: type: string description: 'The unique ID of the output message. ' type: type: string description: 'The type of the output message. Always `message`. ' enum: - message x-stainless-const: true role: type: string description: 'The role of the output message. Always `assistant`. ' enum: - assistant x-stainless-const: true content: type: array description: 'The content of the output message. ' items: $ref: '#/components/schemas/OutputMessageContent' phase: anyOf: - $ref: '#/components/schemas/MessagePhase' - type: 'null' status: type: string description: 'The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API. ' enum: - in_progress - completed - incomplete required: - id - type - role - content - status ComputerCallSafetyCheckParam: properties: id: type: string description: The ID of the pending safety check. code: anyOf: - type: string description: The type of the pending safety check. - type: 'null' message: anyOf: - type: string description: Details about the pending safety check. - type: 'null' type: object required: - id description: A pending safety check for the computer call. FunctionCallItemStatus: type: string enum: - in_progress - completed - incomplete TypeParam: properties: type: type: string enum: - type description: Specifies the event type. For a type action, this property is always set to `type`. default: type x-stainless-const: true text: type: string description: The text to type. type: object required: - type - text title: Type description: An action to type in text. KeyPressAction: properties: type: type: string enum: - keypress description: Specifies the event type. For a keypress action, this property is always set to `keypress`. default: keypress x-stainless-const: true keys: items: type: string description: One of the keys the model is requesting to be pressed. type: array description: The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: object required: - type - keys title: KeyPress description: A collection of keypresses the model would like to perform. ToolSearchToolParam: properties: type: type: string enum: - tool_search description: The type of the tool. Always `tool_search`. default: tool_search x-stainless-const: true execution: $ref: '#/components/schemas/ToolSearchExecutionType' description: Whether tool search is executed by the server or by the client. description: anyOf: - type: string description: Description shown to the model for a client-executed tool search tool. - type: 'null' parameters: anyOf: - $ref: '#/components/schemas/EmptyModelParam' description: Parameter schema for a client-executed tool search tool. - type: 'null' type: object required: - type title: Tool search tool description: Hosted or BYOT tool search configuration for deferred tools. ComputerAction: oneOf: - $ref: '#/components/schemas/ClickParam' - $ref: '#/components/schemas/DoubleClickAction' - $ref: '#/components/schemas/DragParam' - $ref: '#/components/schemas/KeyPressAction' - $ref: '#/components/schemas/MoveParam' - $ref: '#/components/schemas/ScreenshotParam' - $ref: '#/components/schemas/ScrollParam' - $ref: '#/components/schemas/TypeParam' - $ref: '#/components/schemas/WaitParam' discriminator: propertyName: type ReasoningItem: type: object description: 'A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your `input` to the Responses API for subsequent turns of a conversation if you are manually [managing context](/docs/guides/conversation-state). ' title: Reasoning properties: type: type: string description: 'The type of the object. Always `reasoning`. ' enum: - reasoning x-stainless-const: true id: type: string description: 'The unique identifier of the reasoning content. ' encrypted_content: anyOf: - type: string description: 'The encrypted content of the reasoning item - populated when a response is generated with `reasoning.encrypted_content` in the `include` parameter. ' - type: 'null' summary: type: array description: 'Reasoning summary content. ' items: $ref: '#/components/schemas/SummaryTextContent' content: type: array description: 'Reasoning text content. ' items: $ref: '#/components/schemas/ReasoningTextContent' status: type: string description: 'The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. ' enum: - in_progress - completed - incomplete required: - id - summary - type CodeInterpreterOutputImage: properties: type: type: string enum: - image description: The type of the output. Always `image`. default: image x-stainless-const: true url: type: string format: uri description: The URL of the image output from the code interpreter. type: object required: - type - url title: Code interpreter output image description: The image output from the code interpreter. FunctionCallOutputStatusEnum: type: string enum: - in_progress - completed - incomplete GrammarSyntax1: type: string enum: - lark - regex ImageGenToolCall: type: object title: Image generation call description: 'An image generation request made by the model. ' properties: type: type: string enum: - image_generation_call description: 'The type of the image generation call. Always `image_generation_call`. ' x-stainless-const: true id: type: string description: 'The unique ID of the image generation call. ' status: type: string enum: - in_progress - completed - generating - failed description: 'The status of the image generation call. ' result: anyOf: - type: string description: 'The generated image encoded in base64. ' - type: 'null' required: - type - id - status - result Filters: anyOf: - $ref: '#/components/schemas/ComparisonFilter' - $ref: '#/components/schemas/CompoundFilter' ComputerToolCall: type: object title: Computer tool call description: 'A tool call to a computer use tool. See the [computer use guide](/docs/guides/tools-computer-use) for more information. ' properties: type: type: string description: The type of the computer call. Always `computer_call`. enum: - computer_call default: computer_call id: type: string description: The unique ID of the computer call. call_id: type: string description: 'An identifier used when responding to the tool call with output. ' action: $ref: '#/components/schemas/ComputerAction' actions: $ref: '#/components/schemas/ComputerActionList' pending_safety_checks: type: array items: $ref: '#/components/schemas/ComputerCallSafetyCheckParam' description: 'The pending safety checks for the computer call. ' status: type: string description: 'The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. ' enum: - in_progress - completed - incomplete required: - type - id - call_id - pending_safety_checks - status WebSearchActionFind: type: object title: Find action description: 'Action type "find_in_page": Searches for a pattern within a loaded page. ' properties: type: type: string enum: - find_in_page description: 'The action type. ' x-stainless-const: true url: type: string format: uri description: 'The URL of the page searched for the pattern. ' pattern: type: string description: 'The pattern or text to search for within the page. ' required: - type - url - pattern WebSearchActionOpenPage: type: object title: Open page action description: 'Action type "open_page" - Opens a specific URL from search results. ' properties: type: type: string enum: - open_page description: 'The action type. ' x-stainless-const: true url: description: 'The URL opened by the model. ' anyOf: - type: string format: uri - type: 'null' required: - type FunctionShellCallItemStatus: type: string enum: - in_progress - completed - incomplete title: Shell call status description: Status values reported for shell tool calls. MessageRole: type: string enum: - unknown - user - assistant - system - critic - discriminator - developer - tool ContainerNetworkPolicyDisabledParam: properties: type: type: string enum: - disabled description: Disable outbound network access. Always `disabled`. default: disabled x-stainless-const: true type: object required: - type ComputerActionList: title: Computer Action List type: array description: 'Flattened batched actions for `computer_use`. Each action includes an `type` discriminator and action-specific fields. ' items: $ref: '#/components/schemas/ComputerAction' ContainerAutoParam: properties: type: type: string enum: - container_auto description: Automatically creates a container for this request default: container_auto x-stainless-const: true file_ids: items: type: string example: file-123 type: array maxItems: 50 description: An optional list of uploaded files to make available to your code. memory_limit: anyOf: - $ref: '#/components/schemas/ContainerMemoryLimit' description: The memory limit for the container. - type: 'null' network_policy: oneOf: - $ref: '#/components/schemas/ContainerNetworkPolicyDisabledParam' - $ref: '#/components/schemas/ContainerNetworkPolicyAllowlistParam' description: Network access policy for the container. discriminator: propertyName: type skills: items: oneOf: - $ref: '#/components/schemas/SkillReferenceParam' - $ref: '#/components/schemas/InlineSkillParam' discriminator: propertyName: type type: array maxItems: 200 description: An optional list of skills referenced by id or inline data. type: object required: - type RankerVersionType: type: string enum: - auto - default-2024-11-15 ToolSearchOutput: properties: type: type: string enum: - tool_search_output description: The type of the item. Always `tool_search_output`. default: tool_search_output x-stainless-const: true id: type: string description: The unique ID of the tool search output item. call_id: anyOf: - type: string description: The unique ID of the tool search call generated by the model. - type: 'null' execution: $ref: '#/components/schemas/ToolSearchExecutionType' description: Whether tool search was executed by the server or by the client. tools: items: $ref: '#/components/schemas/Tool' type: array description: The loaded tool definitions returned by tool search. status: $ref: '#/components/schemas/FunctionCallOutputStatusEnum' description: The status of the tool search output item that was recorded. created_by: type: string description: The identifier of the actor that created the item. type: object required: - type - id - call_id - execution - tools - status OutputMessageContent: oneOf: - $ref: '#/components/schemas/OutputTextContent' - $ref: '#/components/schemas/RefusalContent' discriminator: propertyName: type CreateConversationBody: properties: metadata: anyOf: - $ref: '#/components/schemas/Metadata' description: "Set 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.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." - type: 'null' items: anyOf: - items: $ref: '#/components/schemas/InputItem' type: array maxItems: 20 description: Initial items to include in the conversation context. You may add up to 20 items at a time. - type: 'null' type: object required: [] MessagePhase: type: string description: 'Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. ' enum: - commentary - final_answer CoordParam: properties: x: type: integer description: The x-coordinate. y: type: integer description: The y-coordinate. type: object required: - x - y title: Coordinate description: 'An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.' CustomToolCallOutput: type: object title: Custom tool call output description: 'The output of a custom tool call from your code, being sent back to the model. ' properties: type: type: string enum: - custom_tool_call_output x-stainless-const: true description: 'The type of the custom tool call output. Always `custom_tool_call_output`. ' id: type: string description: 'The unique ID of the custom tool call output in the OpenAI platform. ' call_id: type: string description: 'The call ID, used to map this custom tool call output to a custom tool call. ' output: description: 'The output from the custom tool call generated by your code. Can be a string or an list of output content. ' oneOf: - type: string description: 'A string of the output of the custom tool call. ' title: string output - type: array items: $ref: '#/components/schemas/FunctionAndCustomToolCallOutput' title: output content list description: 'Text, image, or file output of the custom tool call. ' required: - type - call_id - output ApplyPatchCreateFileOperation: properties: type: type: string enum: - create_file description: Create a new file with the provided diff. default: create_file x-stainless-const: true path: type: string description: Path of the file to create. diff: type: string description: Diff to apply. type: object required: - type - path - diff title: Apply patch create file operation description: Instruction describing how to create a file via the apply_patch tool. MCPListToolsTool: type: object title: MCP list tools tool description: 'A tool available on an MCP server. ' properties: name: type: string description: 'The name of the tool. ' description: anyOf: - type: string description: 'The description of the tool. ' - type: 'null' input_schema: type: object description: 'The JSON schema describing the tool''s input. ' annotations: anyOf: - type: object description: 'Additional annotations about the tool. ' - type: 'null' required: - name - input_schema ComputerScreenshotImage: type: object description: 'A computer screenshot image used with the computer use tool. ' properties: type: type: string enum: - computer_screenshot default: computer_screenshot description: "Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n" x-stainless-const: true image_url: type: string format: uri description: The URL of the screenshot image. file_id: type: string description: The identifier of an uploaded file that contains the screenshot. required: - type FunctionToolCallOutput: type: object title: Function tool call output description: 'The output of a function tool call. ' properties: id: type: string description: 'The unique ID of the function tool call output. Populated when this item is returned via API. ' type: type: string enum: - function_call_output description: 'The type of the function tool call output. Always `function_call_output`. ' x-stainless-const: true call_id: type: string description: 'The unique ID of the function tool call generated by the model. ' output: description: 'The output from the function call generated by your code. Can be a string or an list of output content. ' oneOf: - type: string description: 'A string of the output of the function call. ' title: string output - type: array items: $ref: '#/components/schemas/FunctionAndCustomToolCallOutput' title: output content list description: 'Text, image, or file output of the function call. ' status: type: string description: 'The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. ' enum: - in_progress - completed - incomplete required: - type - call_id - output EmptyModelParam: properties: {} type: object required: [] InputMessageContentList: type: array title: Input item content list description: "A list of one or many input items to the model, containing different content \ntypes.\n" items: $ref: '#/components/schemas/InputContent' ComputerUsePreviewTool: properties: type: type: string enum: - computer_use_preview description: The type of the computer use tool. Always `computer_use_preview`. default: computer_use_preview x-stainless-const: true environment: $ref: '#/components/schemas/ComputerEnvironment' description: The type of computer environment to control. display_width: type: integer description: The width of the computer display. display_height: type: integer description: The height of the computer display. type: object required: - type - environment - display_width - display_height title: Computer use preview description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). DoubleClickAction: properties: type: type: string enum: - double_click description: Specifies the event type. For a double click action, this property is always set to `double_click`. default: double_click x-stainless-const: true x: type: integer description: The x-coordinate where the double click occurred. y: type: integer description: The y-coordinate where the double click occurred. keys: anyOf: - items: type: string type: array description: The keys being held while double-clicking. - type: 'null' type: object required: - type - x - y - keys title: DoubleClick description: A double click action. InlineSkillSourceParam: properties: type: type: string enum: - base64 description: The type of the inline skill source. Must be `base64`. default: base64 x-stainless-const: true media_type: type: string enum: - application/zip description: The media type of the inline skill payload. Must be `application/zip`. default: application/zip x-stainless-const: true data: type: string maxLength: 70254592 minLength: 1 description: Base64-encoded skill zip bundle. type: object required: - type - media_type - data description: Inline skill payload ApplyPatchToolParam: properties: type: type: string enum: - apply_patch description: The type of the tool. Always `apply_patch`. default: apply_patch x-stainless-const: true type: object required: - type title: Apply patch tool description: Allows the assistant to create, delete, or update files using unified diffs. ContainerFileCitationBody: properties: type: type: string enum: - container_file_citation description: The type of the container file citation. Always `container_file_citation`. default: container_file_citation x-stainless-const: true container_id: type: string description: The ID of the container file. file_id: type: string description: The ID of the file. start_index: type: integer description: The index of the first character of the container file citation in the message. end_index: type: integer description: The index of the last character of the container file citation in the message. filename: type: string description: The filename of the container file cited. type: object required: - type - container_id - file_id - start_index - end_index - filename title: Container file citation description: A citation for a container file used to generate a model response. FileDetailEnum: type: string enum: - low - high ComparisonFilter: type: object additionalProperties: false title: Comparison Filter description: 'A filter used to compare a specified attribute key to a given value using a defined comparison operation. ' properties: type: type: string default: eq enum: - eq - ne - gt - gte - lt - lte - in - nin description: 'Specifies 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 ' key: type: string description: The key to compare against the value. value: oneOf: - type: string - type: number - type: boolean - type: array items: oneOf: - type: string - type: number description: The value to compare against the attribute key; supports string, number, or boolean types. required: - type - key - value x-oaiMeta: name: ComparisonFilter ToolSearchCall: properties: type: type: string enum: - tool_search_call description: The type of the item. Always `tool_search_call`. default: tool_search_call x-stainless-const: true id: type: string description: The unique ID of the tool search call item. call_id: anyOf: - type: string description: The unique ID of the tool search call generated by the model. - type: 'null' execution: $ref: '#/components/schemas/ToolSearchExecutionType' description: Whether tool search was executed by the server or by the client. arguments: description: Arguments used for the tool search call. status: $ref: '#/components/schemas/FunctionCallStatus' description: The status of the tool search call item that was recorded. created_by: type: string description: The identifier of the actor that created the item. type: object required: - type - id - call_id - execution - arguments - status LocalSkillParam: properties: name: type: string description: The name of the skill. description: type: string description: The description of the skill. path: type: string description: The path to the directory containing the skill. type: object required: - name - description - path LogProb: properties: token: type: string logprob: type: number bytes: items: type: integer type: array top_logprobs: items: $ref: '#/components/schemas/TopLogProb' type: array type: object required: - token - logprob - bytes - top_logprobs title: Log probability description: The log probability of a token. ContainerReferenceResource: properties: type: type: string enum: - container_reference description: The environment type. Always `container_reference`. default: container_reference x-stainless-const: true container_id: type: string type: object required: - type - container_id title: Container Reference description: Represents a container created with /v1/containers. ComputerCallOutputItemParam: properties: id: anyOf: - type: string description: The ID of the computer tool call output. example: cuo_123 - type: 'null' call_id: type: string maxLength: 64 minLength: 1 description: The ID of the computer tool call that produced the output. type: type: string enum: - computer_call_output description: The type of the computer tool call output. Always `computer_call_output`. default: computer_call_output x-stainless-const: true output: $ref: '#/components/schemas/ComputerScreenshotImage' acknowledged_safety_checks: anyOf: - items: $ref: '#/components/schemas/ComputerCallSafetyCheckParam' type: array description: The safety checks reported by the API that have been acknowledged by the developer. - type: 'null' status: anyOf: - $ref: '#/components/schemas/FunctionCallItemStatus' description: The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API. - type: 'null' type: object required: - call_id - type - output title: Computer tool call output description: The output of a computer tool call. InputMessage: type: object title: Input message description: 'A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. ' properties: type: type: string description: 'The type of the message input. Always set to `message`. ' enum: - message x-stainless-const: true role: type: string description: 'The role of the message input. One of `user`, `system`, or `developer`. ' enum: - user - system - developer status: type: string description: 'The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. ' enum: - in_progress - completed - incomplete content: $ref: '#/components/schemas/InputMessageContentList' required: - role - content ApplyPatchCallOutputStatusParam: type: string enum: - completed - failed title: Apply patch call output status description: Outcome values reported for apply_patch tool call outputs. ApplyPatchToolCallOutputItemParam: properties: type: type: string enum: - apply_patch_call_output description: The type of the item. Always `apply_patch_call_output`. default: apply_patch_call_output x-stainless-const: true id: anyOf: - type: string description: The unique ID of the apply patch tool call output. Populated when this item is returned via API. example: apco_123 - type: 'null' call_id: type: string maxLength: 64 minLength: 1 description: The unique ID of the apply patch tool call generated by the model. status: $ref: '#/components/schemas/ApplyPatchCallOutputStatusParam' description: The status of the apply patch tool call output. One of `completed` or `failed`. output: anyOf: - type: string maxLength: 10485760 description: Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - type: 'null' type: object required: - type - call_id - status title: Apply patch tool call output description: The streamed output emitted by an apply patch tool call. ComputerEnvironment: type: string enum: - windows - mac - linux - ubuntu - browser FunctionShellCallItemParam: properties: id: anyOf: - type: string description: The unique ID of the shell tool call. Populated when this item is returned via API. example: sh_123 - type: 'null' call_id: type: string maxLength: 64 minLength: 1 description: The unique ID of the shell tool call generated by the model. type: type: string enum: - shell_call description: The type of the item. Always `shell_call`. default: shell_call x-stainless-const: true action: $ref: '#/components/schemas/FunctionShellActionParam' description: The shell commands and limits that describe how to run the tool call. status: anyOf: - $ref: '#/components/schemas/FunctionShellCallItemStatus' description: The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - type: 'null' environment: anyOf: - oneOf: - $ref: '#/components/schemas/LocalEnvironmentParam' - $ref: '#/components/schemas/ContainerReferenceParam' description: The environment to execute the shell commands in. discriminator: propertyName: type - type: 'null' type: object required: - call_id - type - action title: Shell tool call description: A tool representing a request to execute one or more shell commands. ContainerNetworkPolicyAllowlistParam: properties: type: type: string enum: - allowlist description: Allow outbound network access only to specified domains. Always `allowlist`. default: allowlist x-stainless-const: true allowed_domains: items: type: string type: array minItems: 1 description: A list of allowed domains when type is `allowlist`. domain_secrets: items: $ref: '#/components/schemas/ContainerNetworkPolicyDomainSecretParam' type: array minItems: 1 description: Optional domain-scoped secrets for allowlisted domains. type: object required: - type - allowed_domains FunctionShellActionParam: properties: commands: items: type: string type: array description: Ordered shell commands for the execution environment to run. timeout_ms: anyOf: - type: integer description: Maximum wall-clock time in milliseconds to allow the shell commands to run. - type: 'null' max_output_length: anyOf: - type: integer description: Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - type: 'null' type: object required: - commands title: Shell action description: Commands and limits describing how to run the shell tool call. FunctionToolCall: type: object title: Function tool call description: "A tool call to run a function. See the \n[function calling guide](/docs/guides/function-calling) for more information.\n" properties: id: type: string description: 'The unique ID of the function tool call. ' type: type: string enum: - function_call description: 'The type of the function tool call. Always `function_call`. ' x-stainless-const: true call_id: type: string description: 'The unique ID of the function tool call generated by the model. ' namespace: type: string description: 'The namespace of the function to run. ' name: type: string description: 'The name of the function to run. ' arguments: type: string description: 'A JSON string of the arguments to pass to the function. ' status: type: string description: 'The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. ' enum: - in_progress - completed - incomplete required: - type - call_id - name - arguments ClickButtonType: type: string enum: - left - right - wheel - back - forward CompactionBody: properties: type: type: string enum: - compaction description: The type of the item. Always `compaction`. default: compaction x-stainless-const: true id: type: string description: The unique ID of the compaction item. encrypted_content: type: string description: The encrypted content that was produced by compaction. created_by: type: string description: The identifier of the actor that created the item. type: object required: - type - id - encrypted_content title: Compaction item description: A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). MCPToolFilter: type: object title: MCP tool filter description: 'A filter object to specify which tools are allowed. ' properties: tool_names: type: array title: MCP allowed tools items: type: string description: List of allowed tool names. read_only: type: boolean description: 'Indicates whether or not a tool modifies data or is read-only. If an MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), it will match this filter. ' required: [] additionalProperties: false ComputerToolCallOutput: type: object title: Computer tool call output description: 'The output of a computer tool call. ' properties: type: type: string description: 'The type of the computer tool call output. Always `computer_call_output`. ' enum: - computer_call_output default: computer_call_output x-stainless-const: true id: type: string description: 'The ID of the computer tool call output. ' call_id: type: string description: 'The ID of the computer tool call that produced the output. ' acknowledged_safety_checks: type: array description: 'The safety checks reported by the API that have been acknowledged by the developer. ' items: $ref: '#/components/schemas/ComputerCallSafetyCheckParam' output: $ref: '#/components/schemas/ComputerScreenshotImage' status: type: string description: 'The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API. ' enum: - in_progress - completed - incomplete required: - type - call_id - output NamespaceToolParam: properties: type: type: string enum: - namespace description: The type of the tool. Always `namespace`. default: namespace x-stainless-const: true name: type: string minLength: 1 description: The namespace name used in tool calls (for example, `crm`). description: type: string minLength: 1 description: A description of the namespace shown to the model. tools: items: oneOf: - $ref: '#/components/schemas/FunctionToolParam' - $ref: '#/components/schemas/CustomToolParam' description: A function or custom tool that belongs to a namespace. discriminator: propertyName: type type: array minItems: 1 description: The function/custom tools available inside this namespace. type: object required: - type - name - description - tools title: Namespace description: Groups function/custom tools under a shared namespace. FunctionShellAction: properties: commands: items: type: string description: A list of commands to run. type: array timeout_ms: anyOf: - type: integer description: Optional timeout in milliseconds for the commands. - type: 'null' max_output_length: anyOf: - type: integer description: Optional maximum number of characters to return from each command. - type: 'null' type: object required: - commands - timeout_ms - max_output_length title: Shell exec action description: Execute a shell command. EasyInputMessage: type: object title: Input message description: 'A message input to the model with a role indicating instruction following hierarchy. Instructions given with the `developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions. ' properties: role: type: string description: 'The role of the message input. One of `user`, `assistant`, `system`, or `developer`. ' enum: - user - assistant - system - developer content: description: 'Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. ' oneOf: - type: string title: Text input description: 'A text input to the model. ' - $ref: '#/components/schemas/InputMessageContentList' phase: anyOf: - $ref: '#/components/schemas/MessagePhase' - type: 'null' type: type: string description: 'The type of the message input. Always `message`. ' enum: - message x-stainless-const: true required: - role - content MoveParam: properties: type: type: string enum: - move description: Specifies the event type. For a move action, this property is always set to `move`. default: move x-stainless-const: true x: type: integer description: The x-coordinate to move to. y: type: integer description: The y-coordinate to move to. keys: anyOf: - items: type: string type: array description: The keys being held while moving the mouse. - type: 'null' type: object required: - type - x - y title: Move description: A mouse move action. FunctionShellCallOutputExitOutcome: properties: type: type: string enum: - exit description: The outcome type. Always `exit`. default: exit x-stainless-const: true exit_code: type: integer description: Exit code from the shell process. type: object required: - type - exit_code title: Shell call exit outcome description: Indicates that the shell commands finished and returned an exit code. FunctionShellCallOutputItemParam: properties: id: anyOf: - type: string description: The unique ID of the shell tool call output. Populated when this item is returned via API. example: sho_123 - type: 'null' call_id: type: string maxLength: 64 minLength: 1 description: The unique ID of the shell tool call generated by the model. type: type: string enum: - shell_call_output description: The type of the item. Always `shell_call_output`. default: shell_call_output x-stainless-const: true output: items: $ref: '#/components/schemas/FunctionShellCallOutputContentParam' type: array description: Captured chunks of stdout and stderr output, along with their associated outcomes. status: anyOf: - $ref: '#/components/schemas/FunctionShellCallItemStatus' description: The status of the shell call output. - type: 'null' max_output_length: anyOf: - type: integer description: The maximum number of UTF-8 characters captured for this shell call's combined output. - type: 'null' type: object required: - call_id - type - output title: Shell tool call output description: The streamed output items emitted by a shell tool call. FunctionShellCallStatus: type: string enum: - in_progress - completed - incomplete CodeInterpreterToolCall: type: object title: Code interpreter tool call description: 'A tool call to run code. ' properties: type: type: string enum: - code_interpreter_call default: code_interpreter_call x-stainless-const: true description: 'The type of the code interpreter tool call. Always `code_interpreter_call`. ' id: type: string description: 'The unique ID of the code interpreter tool call. ' status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: 'The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. ' container_id: type: string description: 'The ID of the container used to run the code. ' code: anyOf: - type: string description: 'The code to run, or null if not available. ' - type: 'null' outputs: anyOf: - type: array items: oneOf: - $ref: '#/components/schemas/CodeInterpreterOutputLogs' - $ref: '#/components/schemas/CodeInterpreterOutputImage' discriminator: propertyName: type discriminator: propertyName: type description: 'The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. ' - type: 'null' required: - type - id - status - container_id - code - outputs FunctionAndCustomToolCallOutput: oneOf: - $ref: '#/components/schemas/InputTextContent' - $ref: '#/components/schemas/InputImageContent' - $ref: '#/components/schemas/InputFileContent' discriminator: propertyName: type Tool: description: 'A tool that can be used to generate a response. ' discriminator: propertyName: type oneOf: - $ref: '#/components/schemas/FunctionTool' - $ref: '#/components/schemas/FileSearchTool' - $ref: '#/components/schemas/ComputerTool' - $ref: '#/components/schemas/ComputerUsePreviewTool' - $ref: '#/components/schemas/WebSearchTool' - $ref: '#/components/schemas/MCPTool' - $ref: '#/components/schemas/CodeInterpreterTool' - $ref: '#/components/schemas/ImageGenTool' - $ref: '#/components/schemas/LocalShellToolParam' - $ref: '#/components/schemas/FunctionShellToolParam' - $ref: '#/components/schemas/CustomToolParam' - $ref: '#/components/schemas/NamespaceToolParam' - $ref: '#/components/schemas/ToolSearchToolParam' - $ref: '#/components/schemas/WebSearchPreviewTool' - $ref: '#/components/schemas/ApplyPatchToolParam' LocalShellToolParam: properties: type: type: string enum: - local_shell description: The type of the local shell tool. Always `local_shell`. default: local_shell x-stainless-const: true type: object required: - type title: Local shell tool description: A tool that allows the model to execute shell commands in a local environment. InputImageContentParamAutoParam: properties: type: type: string enum: - input_image description: The type of the input item. Always `input_image`. default: input_image x-stainless-const: true image_url: anyOf: - type: string maxLength: 20971520 format: uri description: The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - type: 'null' file_id: anyOf: - type: string description: The ID of the file to be sent to the model. example: file-123 - type: 'null' detail: anyOf: - $ref: '#/components/schemas/DetailEnum' description: The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - type: 'null' type: object required: - type title: Input image description: An image input to the model. Learn about [image inputs](/docs/guides/vision) RefusalContent: properties: type: type: string enum: - refusal description: The type of the refusal. Always `refusal`. default: refusal x-stainless-const: true refusal: type: string description: The refusal explanation from the model. type: object required: - type - refusal title: Refusal description: A refusal from the model. ApplyPatchCallStatus: type: string enum: - in_progress - completed SummaryTextContent: properties: type: type: string enum: - summary_text description: The type of the object. Always `summary_text`. default: summary_text x-stainless-const: true text: type: string description: A summary of the reasoning output from the model so far. type: object required: - type - text title: Summary text description: A summary text from the model. ScrollParam: properties: type: type: string enum: - scroll description: Specifies the event type. For a scroll action, this property is always set to `scroll`. default: scroll x-stainless-const: true x: type: integer description: The x-coordinate where the scroll occurred. y: type: integer description: The y-coordinate where the scroll occurred. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. keys: anyOf: - items: type: string type: array description: The keys being held while scrolling. - type: 'null' type: object required: - type - x - y - scroll_x - scroll_y title: Scroll description: A scroll action. CustomTextFormatParam: properties: type: type: string enum: - text description: Unconstrained text format. Always `text`. default: text x-stainless-const: true type: object required: - type title: Text format description: Unconstrained free-form text. MCPTool: type: object title: MCP tool description: 'Give the model access to additional tools via remote Model Context Protocol (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). ' properties: type: type: string enum: - mcp description: The type of the MCP tool. Always `mcp`. x-stainless-const: true server_label: type: string description: 'A label for this MCP server, used to identify it in tool calls. ' server_url: type: string format: uri description: 'The URL for the MCP server. One of `server_url` or `connector_id` must be provided. ' connector_id: type: string enum: - connector_dropbox - connector_gmail - connector_googlecalendar - connector_googledrive - connector_microsoftteams - connector_outlookcalendar - connector_outlookemail - connector_sharepoint description: 'Identifier for service connectors, like those available in ChatGPT. One of `server_url` or `connector_id` must be provided. Learn more about service connectors [here](/docs/guides/tools-remote-mcp#connectors). Currently supported `connector_id` values are: - Dropbox: `connector_dropbox` - Gmail: `connector_gmail` - Google Calendar: `connector_googlecalendar` - Google Drive: `connector_googledrive` - Microsoft Teams: `connector_microsoftteams` - Outlook Calendar: `connector_outlookcalendar` - Outlook Email: `connector_outlookemail` - SharePoint: `connector_sharepoint` ' authorization: type: string description: 'An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here. ' server_description: type: string description: 'Optional description of the MCP server, used to provide more context. ' headers: anyOf: - type: object additionalProperties: type: string description: 'Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. ' - type: 'null' allowed_tools: anyOf: - description: 'List of allowed tool names or a filter object. ' oneOf: - type: array title: MCP allowed tools description: A string array of allowed tool names items: type: string - $ref: '#/components/schemas/MCPToolFilter' - type: 'null' require_approval: anyOf: - description: Specify which of the MCP server's tools require approval. oneOf: - type: object title: MCP tool approval filter description: 'Specify which of the MCP server''s tools require approval. Can be `always`, `never`, or a filter object associated with tools that require approval. ' properties: always: $ref: '#/components/schemas/MCPToolFilter' never: $ref: '#/components/schemas/MCPToolFilter' additionalProperties: false - type: string title: MCP tool approval setting description: 'Specify a single approval policy for all tools. One of `always` or `never`. When set to `always`, all tools will require approval. When set to `never`, all tools will not require approval. ' enum: - always - never default: always - type: 'null' defer_loading: type: boolean description: 'Whether this MCP tool is deferred and discovered via tool search. ' required: - type - server_label ApplyPatchOperationParam: oneOf: - $ref: '#/components/schemas/ApplyPatchCreateFileOperationParam' - $ref: '#/components/schemas/ApplyPatchDeleteFileOperationParam' - $ref: '#/components/schemas/ApplyPatchUpdateFileOperationParam' title: Apply patch operation description: One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool. discriminator: propertyName: type InputImageContent: properties: type: type: string enum: - input_image description: The type of the input item. Always `input_image`. default: input_image x-stainless-const: true image_url: anyOf: - type: string format: uri description: The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - type: 'null' file_id: anyOf: - type: string description: The ID of the file to be sent to the model. - type: 'null' detail: $ref: '#/components/schemas/ImageDetail' description: The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. type: object required: - type - detail title: Input image description: An image input to the model. Learn about [image inputs](/docs/guides/vision). LocalEnvironmentParam: properties: type: type: string enum: - local description: Use a local computer environment. default: local x-stainless-const: true skills: items: $ref: '#/components/schemas/LocalSkillParam' type: array maxItems: 200 description: An optional list of skills. type: object required: - type SearchContextSize: type: string enum: - low - medium - high ApproximateLocation: properties: type: type: string enum: - approximate description: The type of location approximation. Always `approximate`. default: approximate x-stainless-const: true country: anyOf: - type: string description: The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - type: 'null' region: anyOf: - type: string description: Free text input for the region of the user, e.g. `California`. - type: 'null' city: anyOf: - type: string description: Free text input for the city of the user, e.g. `San Francisco`. - type: 'null' timezone: anyOf: - type: string description: The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - type: 'null' type: object required: - type ItemReferenceParam: properties: type: anyOf: - type: string enum: - item_reference description: The type of item to reference. Always `item_reference`. default: item_reference x-stainless-const: true - type: 'null' id: type: string description: The ID of the item to reference. type: object required: - id title: Item reference description: An internal identifier for an item to reference. CompactionSummaryItemParam: properties: id: anyOf: - type: string description: The ID of the compaction item. example: cmp_123 - type: 'null' type: type: string enum: - compaction description: The type of the item. Always `compaction`. default: compaction x-stainless-const: true encrypted_content: type: string maxLength: 10485760 description: The encrypted content of the compaction summary. type: object required: - type - encrypted_content title: Compaction item description: A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). WebSearchToolCall: type: object title: Web search tool call description: 'The results of a web search tool call. See the [web search guide](/docs/guides/tools-web-search) for more information. ' properties: id: type: string description: 'The unique ID of the web search tool call. ' type: type: string enum: - web_search_call description: 'The type of the web search tool call. Always `web_search_call`. ' x-stainless-const: true status: type: string description: 'The status of the web search tool call. ' enum: - in_progress - searching - completed - failed action: type: object description: 'An object describing the specific action taken in this web search call. Includes details on how the model used the web (search, open_page, find_in_page). ' oneOf: - $ref: '#/components/schemas/WebSearchActionSearch' - $ref: '#/components/schemas/WebSearchActionOpenPage' - $ref: '#/components/schemas/WebSearchActionFind' discriminator: propertyName: type required: - id - type - status - action LocalEnvironmentResource: properties: type: type: string enum: - local description: The environment type. Always `local`. default: local x-stainless-const: true type: object required: - type title: Local Environment description: Represents the use of a local environment to perform shell actions. InputTextContent: properties: type: type: string enum: - input_text description: The type of the input item. Always `input_text`. default: input_text x-stainless-const: true text: type: string description: The text input to the model. type: object required: - type - text title: Input text description: A text input to the model. UrlCitationBody: properties: type: type: string enum: - url_citation description: The type of the URL citation. Always `url_citation`. default: url_citation x-stainless-const: true url: type: string format: uri description: The URL of the web resource. start_index: type: integer description: The index of the first character of the URL citation in the message. end_index: type: integer description: The index of the last character of the URL citation in the message. title: type: string description: The title of the web resource. type: object required: - type - url - start_index - end_index - title title: URL citation description: A citation for a web resource used to generate a model response. MCPApprovalResponseResource: type: object title: MCP approval response description: 'A response to an MCP approval request. ' properties: type: type: string enum: - mcp_approval_response description: 'The type of the item. Always `mcp_approval_response`. ' x-stainless-const: true id: type: string description: 'The unique ID of the approval response ' approval_request_id: type: string description: 'The ID of the approval request being answered. ' approve: type: boolean description: 'Whether the request was approved. ' reason: anyOf: - type: string description: 'Optional reason for the decision. ' - type: 'null' required: - type - id - request_id - approve - approval_request_id InputItem: oneOf: - $ref: '#/components/schemas/EasyInputMessage' - type: object title: Item description: 'An item representing part of the context for the response to be generated by the model. Can contain text, images, and audio inputs, as well as previous assistant responses and tool call outputs. ' $ref: '#/components/schemas/Item' - $ref: '#/components/schemas/ItemReferenceParam' discriminator: propertyName: type ApplyPatchDeleteFileOperation: properties: type: type: string enum: - delete_file description: Delete the specified file. default: delete_file x-stainless-const: true path: type: string description: Path of the file to delete. type: object required: - type - path title: Apply patch delete file operation description: Instruction describing how to delete a file via the apply_patch tool. MCPListTools: type: object title: MCP list tools description: 'A list of tools available on an MCP server. ' properties: type: type: string enum: - mcp_list_tools description: 'The type of the item. Always `mcp_list_tools`. ' x-stainless-const: true id: type: string description: 'The unique ID of the list. ' server_label: type: string description: 'The label of the MCP server. ' tools: type: array items: $ref: '#/components/schemas/MCPListToolsTool' description: 'The tools available on the server. ' error: anyOf: - type: string description: 'Error message if the server could not list tools. ' - type: 'null' required: - type - id - server_label - tools RankingOptions: properties: ranker: $ref: '#/components/schemas/RankerVersionType' description: The ranker to use for the file search. score_threshold: type: number description: The 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. hybrid_search: $ref: '#/components/schemas/HybridSearchOptions' description: Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. type: object required: [] FunctionShellCallOutputExitOutcomeParam: properties: type: type: string enum: - exit description: The outcome type. Always `exit`. default: exit x-stainless-const: true exit_code: type: integer description: The exit code returned by the shell process. type: object required: - type - exit_code title: Shell call exit outcome description: Indicates that the shell commands finished and returned an exit code. FileSearchTool: properties: type: type: string enum: - file_search description: The type of the file search tool. Always `file_search`. default: file_search x-stainless-const: true vector_store_ids: items: type: string type: array description: The IDs of the vector stores to search. max_num_results: type: integer description: The maximum number of results to return. This number should be between 1 and 50 inclusive. ranking_options: $ref: '#/components/schemas/RankingOptions' description: Ranking options for search. filters: anyOf: - $ref: '#/components/schemas/Filters' description: A filter to apply. - type: 'null' type: object required: - type - vector_store_ids title: File search description: A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). FunctionCallOutputItemParam: properties: id: anyOf: - type: string description: The unique ID of the function tool call output. Populated when this item is returned via API. example: fc_123 - type: 'null' call_id: type: string maxLength: 64 minLength: 1 description: The unique ID of the function tool call generated by the model. type: type: string enum: - function_call_output description: The type of the function tool call output. Always `function_call_output`. default: function_call_output x-stainless-const: true output: oneOf: - type: string maxLength: 10485760 description: A JSON string of the output of the function tool call. - items: oneOf: - $ref: '#/components/schemas/InputTextContentParam' - $ref: '#/components/schemas/InputImageContentParamAutoParam' - $ref: '#/components/schemas/InputFileContentParam' description: A piece of message content, such as text, an image, or a file. discriminator: propertyName: type type: array description: An array of content outputs (text, image, file) for the function tool call. description: Text, image, or file output of the function tool call. status: anyOf: - $ref: '#/components/schemas/FunctionCallItemStatus' description: The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. - type: 'null' type: object required: - call_id - type - output title: Function tool call output description: The output of a function tool call. LocalShellToolCallOutput: type: object title: Local shell call output description: 'The output of a local shell tool call. ' properties: type: type: string enum: - local_shell_call_output description: 'The type of the local shell tool call output. Always `local_shell_call_output`. ' x-stainless-const: true id: type: string description: 'The unique ID of the local shell tool call generated by the model. ' output: type: string description: 'A JSON string of the output of the local shell tool call. ' status: anyOf: - type: string enum: - in_progress - completed - incomplete description: 'The status of the item. One of `in_progress`, `completed`, or `incomplete`. ' - type: 'null' required: - id - type - call_id - output ApplyPatchCreateFileOperationParam: properties: type: type: string enum: - create_file description: The operation type. Always `create_file`. default: create_file x-stainless-const: true path: type: string minLength: 1 description: Path of the file to create relative to the workspace root. diff: type: string maxLength: 10485760 description: Unified diff content to apply when creating the file. type: object required: - type - path - diff title: Apply patch create file operation description: Instruction for creating a new file via the apply_patch tool. ContainerMemoryLimit: type: string enum: - 1g - 4g - 16g - 64g FunctionShellToolParam: properties: type: type: string enum: - shell description: The type of the shell tool. Always `shell`. default: shell x-stainless-const: true environment: anyOf: - oneOf: - $ref: '#/components/schemas/ContainerAutoParam' - $ref: '#/components/schemas/LocalEnvironmentParam' - $ref: '#/components/schemas/ContainerReferenceParam' discriminator: propertyName: type - type: 'null' type: object required: - type title: Shell tool description: A tool that allows the model to execute shell commands. ToolSearchCallItemParam: properties: id: anyOf: - type: string description: The unique ID of this tool search call. example: tsc_123 - type: 'null' call_id: anyOf: - type: string maxLength: 64 minLength: 1 description: The unique ID of the tool search call generated by the model. - type: 'null' type: type: string enum: - tool_search_call description: The item type. Always `tool_search_call`. default: tool_search_call x-stainless-const: true execution: $ref: '#/components/schemas/ToolSearchExecutionType' description: Whether tool search was executed by the server or by the client. arguments: $ref: '#/components/schemas/EmptyModelParam' description: The arguments supplied to the tool search call. status: anyOf: - $ref: '#/components/schemas/FunctionCallItemStatus' description: The status of the tool search call. - type: 'null' type: object required: - type - arguments SkillReferenceParam: properties: type: type: string enum: - skill_reference description: References a skill created with the /v1/skills endpoint. default: skill_reference x-stainless-const: true skill_id: type: string maxLength: 64 minLength: 1 description: The ID of the referenced skill. version: type: string description: Optional skill version. Use a positive integer or 'latest'. Omit for default. type: object required: - type - skill_id InputContent: oneOf: - $ref: '#/components/schemas/InputTextContent' - $ref: '#/components/schemas/InputImageContent' - $ref: '#/components/schemas/InputFileContent' discriminator: propertyName: type FunctionShellCallOutputStatusEnum: type: string enum: - in_progress - completed - incomplete WebSearchPreviewTool: properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. default: web_search_preview x-stainless-const: true user_location: anyOf: - $ref: '#/components/schemas/ApproximateLocation' description: The user's location. - type: 'null' search_context_size: $ref: '#/components/schemas/SearchContextSize' description: 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. search_content_types: items: $ref: '#/components/schemas/SearchContentType' type: array type: object required: - type title: Web search preview description: This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). ApplyPatchToolCallItemParam: properties: type: type: string enum: - apply_patch_call description: The type of the item. Always `apply_patch_call`. default: apply_patch_call x-stainless-const: true id: anyOf: - type: string description: The unique ID of the apply patch tool call. Populated when this item is returned via API. example: apc_123 - type: 'null' call_id: type: string maxLength: 64 minLength: 1 description: The unique ID of the apply patch tool call generated by the model. status: $ref: '#/components/schemas/ApplyPatchCallStatusParam' description: The status of the apply patch tool call. One of `in_progress` or `completed`. operation: $ref: '#/components/schemas/ApplyPatchOperationParam' description: The specific create, delete, or update instruction for the apply_patch tool call. type: object required: - type - call_id - status - operation title: Apply patch tool call description: A tool call representing a request to create, delete, or update files using diff patches. DragParam: properties: type: type: string enum: - drag description: Specifies the event type. For a drag action, this property is always set to `drag`. default: drag x-stainless-const: true path: items: $ref: '#/components/schemas/CoordParam' type: array description: "An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg\n```\n[\n { x: 100, y: 200 },\n { x: 200, y: 300 }\n]\n```" keys: anyOf: - items: type: string type: array description: The keys being held while dragging the mouse. - type: 'null' type: object required: - type - path title: Drag description: A drag action. CompoundFilter: $recursiveAnchor: true type: object additionalProperties: false title: Compound Filter description: Combine multiple filters using `and` or `or`. properties: type: type: string description: 'Type of operation: `and` or `or`.' enum: - and - or filters: type: array description: Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. items: oneOf: - $ref: '#/components/schemas/ComparisonFilter' - $recursiveRef: '#' discriminator: propertyName: type required: - type - filters x-oaiMeta: name: CompoundFilter CodeInterpreterTool: type: object title: Code interpreter description: 'A tool that runs Python code to help generate a response to a prompt. ' properties: type: type: string enum: - code_interpreter description: 'The type of the code interpreter tool. Always `code_interpreter`. ' x-stainless-const: true container: description: 'The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional `memory_limit` setting. ' oneOf: - type: string description: The container ID. - $ref: '#/components/schemas/AutoCodeInterpreterToolParam' required: - type - container ComputerTool: properties: type: type: string enum: - computer description: The type of the computer tool. Always `computer`. default: computer x-stainless-const: true type: object required: - type title: Computer description: A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). ApplyPatchUpdateFileOperationParam: properties: type: type: string enum: - update_file description: The operation type. Always `update_file`. default: update_file x-stainless-const: true path: type: string minLength: 1 description: Path of the file to update relative to the workspace root. diff: type: string maxLength: 10485760 description: Unified diff content to apply to the existing file. type: object required: - type - path - diff title: Apply patch update file operation description: Instruction for updating an existing file via the apply_patch tool. MessageStatus: type: string enum: - in_progress - completed - incomplete AutoCodeInterpreterToolParam: properties: type: type: string enum: - auto description: Always `auto`. default: auto x-stainless-const: true file_ids: items: type: string example: file-123 type: array maxItems: 50 description: An optional list of uploaded files to make available to your code. memory_limit: anyOf: - $ref: '#/components/schemas/ContainerMemoryLimit' description: The memory limit for the code interpreter container. - type: 'null' network_policy: oneOf: - $ref: '#/components/schemas/ContainerNetworkPolicyDisabledParam' - $ref: '#/components/schemas/ContainerNetworkPolicyAllowlistParam' description: Network access policy for the container. discriminator: propertyName: type type: object required: - type title: CodeInterpreterToolAuto description: Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on. ConversationResource: properties: id: type: string description: The unique ID of the conversation. object: type: string enum: - conversation description: The object type, which is always `conversation`. default: conversation x-stainless-const: true metadata: description: "Set 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.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." created_at: type: integer format: unixtime description: The time at which the conversation was created, measured in seconds since the Unix epoch. type: object required: - id - object - metadata - created_at CustomToolParam: properties: type: type: string enum: - custom description: The type of the custom tool. Always `custom`. default: custom x-stainless-const: true name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - $ref: '#/components/schemas/CustomTextFormatParam' - $ref: '#/components/schemas/CustomGrammarFormatParam' description: The input format for the custom tool. Default is unconstrained text. discriminator: propertyName: type defer_loading: type: boolean description: Whether this tool should be deferred and discovered via tool search. type: object required: - type - name title: Custom tool description: A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) MCPApprovalRequest: type: object title: MCP approval request description: 'A request for human approval of a tool invocation. ' properties: type: type: string enum: - mcp_approval_request description: 'The type of the item. Always `mcp_approval_request`. ' x-stainless-const: true id: type: string description: 'The unique ID of the approval request. ' server_label: type: string description: 'The label of the MCP server making the request. ' name: type: string description: 'The name of the tool to run. ' arguments: type: string description: 'A JSON string of arguments for the tool. ' required: - type - id - server_label - name - arguments FunctionToolCallResource: allOf: - $ref: '#/components/schemas/FunctionToolCall' - type: object properties: id: type: string description: 'The unique ID of the function tool call. ' status: description: 'The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. ' $ref: '#/components/schemas/FunctionCallStatus' created_by: type: string description: 'The identifier of the actor that created the item. ' required: - id - status FunctionTool: properties: type: type: string enum: - function description: The type of the function tool. Always `function`. default: function x-stainless-const: true name: type: string description: The name of the function to call. description: anyOf: - type: string description: A description of the function. Used by the model to determine whether or not to call the function. - type: 'null' parameters: anyOf: - additionalProperties: {} type: object description: A JSON schema object describing the parameters of the function. x-oaiTypeLabel: map - type: 'null' strict: anyOf: - type: boolean description: Whether to enforce strict parameter validation. Default `true`. - type: 'null' defer_loading: type: boolean description: Whether this function is deferred and loaded via tool search. type: object required: - type - name - strict - parameters title: Function description: Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). ContainerNetworkPolicyDomainSecretParam: properties: domain: type: string minLength: 1 description: The domain associated with the secret. name: type: string minLength: 1 description: The name of the secret to inject for the domain. value: type: string maxLength: 10485760 minLength: 1 description: The secret value to inject for the domain. type: object required: - domain - name - value FunctionShellCallOutputTimeoutOutcome: properties: type: type: string enum: - timeout description: The outcome type. Always `timeout`. default: timeout x-stainless-const: true type: object required: - type title: Shell call timeout outcome description: Indicates that the shell call exceeded its configured time limit. InputFileContent: properties: type: type: string enum: - input_file description: The type of the input item. Always `input_file`. default: input_file x-stainless-const: true file_id: anyOf: - type: string description: The ID of the file to be sent to the model. - type: 'null' filename: type: string description: The name of the file to be sent to the model. file_data: type: string description: 'The content of the file to be sent to the model. ' file_url: type: string format: uri description: The URL of the file to be sent to the model. detail: $ref: '#/components/schemas/FileInputDetail' description: The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. type: object required: - type title: Input file description: A file input to the model. HybridSearchOptions: properties: embedding_weight: type: number description: The weight of the embedding in the reciprocal ranking fusion. text_weight: type: number description: The weight of the text in the reciprocal ranking fusion. type: object required: - embedding_weight - text_weight LocalShellExecAction: properties: type: type: string enum: - exec description: The type of the local shell action. Always `exec`. default: exec x-stainless-const: true command: items: type: string type: array description: The command to run. timeout_ms: anyOf: - type: integer description: Optional timeout in milliseconds for the command. - type: 'null' working_directory: anyOf: - type: string description: Optional working directory to run the command in. - type: 'null' env: additionalProperties: type: string type: object description: Environment variables to set for the command. x-oaiTypeLabel: map user: anyOf: - type: string description: Optional user to run the command as. - type: 'null' type: object required: - type - command - env title: Local shell exec action description: Execute a shell command on the server. LocalShellToolCall: type: object title: Local shell call description: 'A tool call to run a command on the local shell. ' properties: type: type: string enum: - local_shell_call description: 'The type of the local shell call. Always `local_shell_call`. ' x-stainless-const: true id: type: string description: 'The unique ID of the local shell call. ' call_id: type: string description: 'The unique ID of the local shell tool call generated by the model. ' action: $ref: '#/components/schemas/LocalShellExecAction' status: type: string enum: - in_progress - completed - incomplete description: 'The status of the local shell call. ' required: - type - id - call_id - action - status FunctionCallStatus: type: string enum: - in_progress - completed - incomplete DetailEnum: type: string enum: - low - high - auto - original FunctionShellCallOutputTimeoutOutcomeParam: properties: type: type: string enum: - timeout description: The outcome type. Always `timeout`. default: timeout x-stainless-const: true type: object required: - type title: Shell call timeout outcome description: Indicates that the shell call exceeded its configured time limit. FunctionShellCallOutputOutcomeParam: oneOf: - $ref: '#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam' - $ref: '#/components/schemas/FunctionShellCallOutputExitOutcomeParam' title: Shell call outcome description: The exit or timeout outcome associated with this shell call. discriminator: propertyName: type ClickParam: properties: type: type: string enum: - click description: Specifies the event type. For a click action, this property is always `click`. default: click x-stainless-const: true button: $ref: '#/components/schemas/ClickButtonType' description: Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. x: type: integer description: The x-coordinate where the click occurred. y: type: integer description: The y-coordinate where the click occurred. keys: anyOf: - items: type: string type: array description: The keys being held while clicking. - type: 'null' type: object required: - type - button - x - y title: Click description: A click action. InputTextContentParam: properties: type: type: string enum: - input_text description: The type of the input item. Always `input_text`. default: input_text x-stainless-const: true text: type: string maxLength: 10485760 description: The text input to the model. type: object required: - type - text title: Input text description: A text input to the model. OutputTextContent: properties: type: type: string enum: - output_text description: The type of the output text. Always `output_text`. default: output_text x-stainless-const: true text: type: string description: The text output from the model. annotations: items: $ref: '#/components/schemas/Annotation' type: array description: The annotations of the text output. logprobs: items: $ref: '#/components/schemas/LogProb' type: array type: object required: - type - text - annotations - logprobs title: Output text description: A text output from the model. ApplyPatchCallOutputStatus: type: string enum: - completed - failed ConversationItemList: type: object title: The conversation item list description: A list of Conversation items. properties: object: type: string description: The type of object returned, must be `list`. enum: - list x-stainless-const: true data: type: array description: A list of conversation items. items: $ref: '#/components/schemas/ConversationItem' has_more: type: boolean description: Whether there are more items available. first_id: type: string description: The ID of the first item in the list. last_id: type: string description: The ID of the last item in the list. required: - object - data - has_more - first_id - last_id x-oaiMeta: name: The item list group: conversations MCPApprovalResponse: type: object title: MCP approval response description: 'A response to an MCP approval request. ' properties: type: type: string enum: - mcp_approval_response description: 'The type of the item. Always `mcp_approval_response`. ' x-stainless-const: true id: anyOf: - type: string description: 'The unique ID of the approval response ' - type: 'null' approval_request_id: type: string description: 'The ID of the approval request being answered. ' approve: type: boolean description: 'Whether the request was approved. ' reason: anyOf: - type: string description: 'Optional reason for the decision. ' - type: 'null' required: - type - request_id - approve - approval_request_id ApplyPatchToolCallOutput: properties: type: type: string enum: - apply_patch_call_output description: The type of the item. Always `apply_patch_call_output`. default: apply_patch_call_output x-stainless-const: true id: type: string description: The unique ID of the apply patch tool call output. Populated when this item is returned via API. call_id: type: string description: The unique ID of the apply patch tool call generated by the model. status: $ref: '#/components/schemas/ApplyPatchCallOutputStatus' description: The status of the apply patch tool call output. One of `completed` or `failed`. output: anyOf: - type: string description: Optional textual output returned by the apply patch tool. - type: 'null' created_by: type: string description: The ID of the entity that created this tool call output. type: object required: - type - id - call_id - status title: Apply patch tool call output description: The output emitted by an apply patch tool call. FunctionToolCallOutputResource: allOf: - $ref: '#/components/schemas/FunctionToolCallOutput' - type: object properties: id: type: string description: 'The unique ID of the function call tool output. ' status: description: 'The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. ' $ref: '#/components/schemas/FunctionCallOutputStatusEnum' created_by: type: string description: 'The identifier of the actor that created the item. ' required: - id - status FunctionShellCallOutputContent: properties: stdout: type: string description: The standard output that was captured. stderr: type: string description: The standard error output that was captured. outcome: oneOf: - $ref: '#/components/schemas/FunctionShellCallOutputTimeoutOutcome' - $ref: '#/components/schemas/FunctionShellCallOutputExitOutcome' title: Shell call outcome description: Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. discriminator: propertyName: type created_by: type: string description: The identifier of the actor that created the item. type: object required: - stdout - stderr - outcome title: Shell call output content description: The content of a shell tool call output that was emitted. InputFileContentParam: properties: type: type: string enum: - input_file description: The type of the input item. Always `input_file`. default: input_file x-stainless-const: true file_id: anyOf: - type: string description: The ID of the file to be sent to the model. example: file-123 - type: 'null' filename: anyOf: - type: string description: The name of the file to be sent to the model. - type: 'null' file_data: anyOf: - type: string maxLength: 73400320 description: The base64-encoded data of the file to be sent to the model. - type: 'null' file_url: anyOf: - type: string format: uri description: The URL of the file to be sent to the model. - type: 'null' detail: $ref: '#/components/schemas/FileDetailEnum' description: The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. type: object required: - type title: Input file description: A file input to the model. TopLogProb: properties: token: type: string logprob: type: number bytes: items: type: integer type: array type: object required: - token - logprob - bytes title: Top log probability description: The top log probability of a token. ToolSearchExecutionType: type: string enum: - server - client VectorStoreFileAttributes: anyOf: - type: object description: 'Set 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. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers. ' maxProperties: 16 propertyNames: type: string maxLength: 64 additionalProperties: oneOf: - type: string maxLength: 512 - type: number - type: boolean x-oaiTypeLabel: map - type: 'null' MCPToolCallStatus: type: string enum: - in_progress - completed - incomplete - calling - failed Message: properties: type: type: string enum: - message description: The type of the message. Always set to `message`. default: message x-stainless-const: true id: type: string description: The unique ID of the message. status: $ref: '#/components/schemas/MessageStatus' description: The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. role: $ref: '#/components/schemas/MessageRole' description: The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`. content: items: oneOf: - $ref: '#/components/schemas/InputTextContent' - $ref: '#/components/schemas/OutputTextContent' - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/SummaryTextContent' - $ref: '#/components/schemas/ReasoningTextContent' - $ref: '#/components/schemas/RefusalContent' - $ref: '#/components/schemas/InputImageContent' - $ref: '#/components/schemas/ComputerScreenshotContent' - $ref: '#/components/schemas/InputFileContent' description: A content part that makes up an input or output item. discriminator: propertyName: type type: array description: The content of the message phase: anyOf: - $ref: '#/components/schemas/MessagePhase-2' description: Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. - type: 'null' type: object required: - type - id - status - role - content title: Message description: A message to or from the model. MCPToolCall: type: object title: MCP tool call description: 'An invocation of a tool on an MCP server. ' properties: type: type: string enum: - mcp_call description: 'The type of the item. Always `mcp_call`. ' x-stainless-const: true id: type: string description: 'The unique ID of the tool call. ' server_label: type: string description: 'The label of the MCP server running the tool. ' name: type: string description: 'The name of the tool that was run. ' arguments: type: string description: 'A JSON string of the arguments passed to the tool. ' output: anyOf: - type: string description: 'The output from the tool call. ' - type: 'null' error: anyOf: - type: string description: 'The error from the tool call, if any. ' - type: 'null' status: $ref: '#/components/schemas/MCPToolCallStatus' description: 'The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. ' approval_request_id: anyOf: - type: string description: 'Unique identifier for the MCP tool call approval request. Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call. ' - type: 'null' required: - type - id - server_label - name - arguments ComputerToolCallOutputResource: allOf: - $ref: '#/components/schemas/ComputerToolCallOutput' - type: object properties: id: type: string description: 'The unique ID of the computer call tool output. ' status: description: 'The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API. ' $ref: '#/components/schemas/ComputerCallOutputStatus' created_by: type: string description: 'The identifier of the actor that created the item. ' required: - id - status ComputerCallOutputStatus: type: string enum: - completed - incomplete - failed FilePath: type: object title: File path description: 'A path to a file. ' properties: type: type: string description: 'The type of the file path. Always `file_path`. ' enum: - file_path x-stainless-const: true file_id: type: string description: 'The ID of the file. ' index: type: integer description: 'The index of the file in the list of files. ' required: - type - file_id - index FunctionToolParam: properties: name: type: string maxLength: 128 minLength: 1 pattern: ^[a-zA-Z0-9_-]+$ description: anyOf: - type: string - type: 'null' parameters: anyOf: - $ref: '#/components/schemas/EmptyModelParam' - type: 'null' strict: anyOf: - type: boolean - type: 'null' type: type: string enum: - function default: function x-stainless-const: true defer_loading: type: boolean description: Whether this function should be deferred and discovered via tool search. type: object required: - name - type Metadata: anyOf: - type: object description: 'Set 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. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. ' additionalProperties: type: string x-oaiTypeLabel: map - type: 'null' WaitParam: properties: type: type: string enum: - wait description: Specifies the event type. For a wait action, this property is always set to `wait`. default: wait x-stainless-const: true type: object required: - type title: Wait description: A wait action. InputFidelity: type: string enum: - high - low description: Control 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`. ComputerScreenshotContent: properties: type: type: string enum: - computer_screenshot description: Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. default: computer_screenshot x-stainless-const: true image_url: anyOf: - type: string format: uri description: The URL of the screenshot image. - type: 'null' file_id: anyOf: - type: string description: The identifier of an uploaded file that contains the screenshot. - type: 'null' detail: $ref: '#/components/schemas/ImageDetail' description: The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. type: object required: - type - image_url - file_id - detail title: Computer screenshot description: A screenshot of a computer. ApplyPatchToolCall: properties: type: type: string enum: - apply_patch_call description: The type of the item. Always `apply_patch_call`. default: apply_patch_call x-stainless-const: true id: type: string description: The unique ID of the apply patch tool call. Populated when this item is returned via API. call_id: type: string description: The unique ID of the apply patch tool call generated by the model. status: $ref: '#/components/schemas/ApplyPatchCallStatus' description: The status of the apply patch tool call. One of `in_progress` or `completed`. operation: oneOf: - $ref: '#/components/schemas/ApplyPatchCreateFileOperation' - $ref: '#/components/schemas/ApplyPatchDeleteFileOperation' - $ref: '#/components/schemas/ApplyPatchUpdateFileOperation' title: Apply patch operation description: One of the create_file, delete_file, or update_file operations applied via apply_patch. discriminator: propertyName: type created_by: type: string description: The ID of the entity that created this tool call. type: object required: - type - id - call_id - status - operation title: Apply patch tool call description: A tool call that applies file diffs by creating, deleting, or updating files. ImageDetail: type: string enum: - low - high - auto - original WebSearchApproximateLocation: anyOf: - type: object title: Web search approximate location description: 'The approximate location of the user. ' properties: type: type: string enum: - approximate description: The type of location approximation. Always `approximate`. default: approximate x-stainless-const: true country: anyOf: - type: string description: The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - type: 'null' region: anyOf: - type: string description: Free text input for the region of the user, e.g. `California`. - type: 'null' city: anyOf: - type: string description: Free text input for the city of the user, e.g. `San Francisco`. - type: 'null' timezone: anyOf: - type: string description: The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - type: 'null' - type: 'null' UpdateConversationBody: properties: metadata: $ref: '#/components/schemas/Metadata' description: "Set 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.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." type: object required: - metadata IncludeEnum: type: string enum: - file_search_call.results - web_search_call.results - web_search_call.action.sources - message.input_image.image_url - computer_call_output.output.image_url - code_interpreter_call.outputs - reasoning.encrypted_content - message.output_text.logprobs description: 'Specify additional output data to include in the model response. Currently supported values are: - `web_search_call.results`: Include the search results of the web search tool call. - `web_search_call.action.sources`: Include the sources of the web search tool call. - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items. - `computer_call_output.output.image_url`: Include image urls from the computer call output. - `file_search_call.results`: Include the search results of the file search tool call. - `message.input_image.image_url`: Include image urls from the input message. - `message.output_text.logprobs`: Include logprobs with assistant messages. - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).' ScreenshotParam: properties: type: type: string enum: - screenshot description: Specifies the event type. For a screenshot action, this property is always set to `screenshot`. default: screenshot x-stainless-const: true type: object required: - type title: Screenshot description: A screenshot action. ApplyPatchDeleteFileOperationParam: properties: type: type: string enum: - delete_file description: The operation type. Always `delete_file`. default: delete_file x-stainless-const: true path: type: string minLength: 1 description: Path of the file to delete relative to the workspace root. type: object required: - type - path title: Apply patch delete file operation description: Instruction for deleting an existing file via the apply_patch tool. ContainerReferenceParam: properties: type: type: string enum: - container_reference description: References a container created with the /v1/containers endpoint default: container_reference x-stainless-const: true container_id: type: string description: The ID of the referenced container. example: cntr_123 type: object required: - type - container_id MessagePhase-2: type: string enum: - commentary - final_answer TextContent: properties: type: type: string enum: - text default: text x-stainless-const: true text: type: string type: object required: - type - text title: Text Content description: A text content. ApplyPatchCallStatusParam: type: string enum: - in_progress - completed title: Apply patch call status description: Status values reported for apply_patch tool calls. CustomGrammarFormatParam: properties: type: type: string enum: - grammar description: Grammar format. Always `grammar`. default: grammar x-stainless-const: true syntax: $ref: '#/components/schemas/GrammarSyntax1' description: The syntax of the grammar definition. One of `lark` or `regex`. definition: type: string description: The grammar definition. type: object required: - type - syntax - definition title: Grammar format description: A grammar defined by the user. ImageGenTool: type: object title: Image generation tool description: 'A tool that generates images using the GPT image models. ' properties: type: type: string enum: - image_generation description: 'The type of the image generation tool. Always `image_generation`. ' x-stainless-const: true model: anyOf: - type: string - type: string enum: - gpt-image-1 - gpt-image-1-mini - gpt-image-1.5 description: 'The image generation model to use. Default: `gpt-image-1`. ' default: gpt-image-1 quality: type: string enum: - low - medium - high - auto description: 'The quality of the generated image. One of `low`, `medium`, `high`, or `auto`. Default: `auto`. ' default: auto size: anyOf: - type: string - type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 - auto description: The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, 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`. default: auto output_format: type: string enum: - png - webp - jpeg description: 'The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`. ' default: png output_compression: type: integer minimum: 0 maximum: 100 description: 'Compression level for the output image. Default: 100. ' default: 100 moderation: type: string enum: - auto - low description: 'Moderation level for the generated image. Default: `auto`. ' default: auto background: type: string enum: - transparent - opaque - auto description: 'Background type for the generated image. One of `transparent`, `opaque`, or `auto`. Default: `auto`. ' default: auto input_fidelity: anyOf: - $ref: '#/components/schemas/InputFidelity' - type: 'null' input_image_mask: type: object description: 'Optional mask for inpainting. Contains `image_url` (string, optional) and `file_id` (string, optional). ' properties: image_url: type: string description: 'Base64-encoded mask image. ' file_id: type: string description: 'File ID for the mask image. ' required: [] additionalProperties: false partial_images: type: integer minimum: 0 maximum: 3 description: 'Number of partial images to generate in streaming mode, from 0 (default value) to 3. ' default: 0 action: description: 'Whether to generate a new image or edit an existing image. Default: `auto`. ' $ref: '#/components/schemas/ImageGenActionEnum' required: - type securitySchemes: ApiKeyAuth: type: http scheme: bearer x-oaiMeta: groups: - id: audio title: Audio description: 'Learn how to turn audio into text or text into audio. Related guide: [Speech to text](/docs/guides/speech-to-text) ' sections: - type: endpoint key: createSpeech path: createSpeech - type: endpoint key: createTranscription path: createTranscription - type: endpoint key: createTranslation path: createTranslation - id: chat title: Chat description: 'Given a list of messages comprising a conversation, the model will return a response. Related guide: [Chat Completions](/docs/guides/text-generation) ' sections: - type: endpoint key: createChatCompletion path: create - type: object key: CreateChatCompletionResponse path: object - type: object key: CreateChatCompletionStreamResponse path: streaming - id: embeddings title: Embeddings description: 'Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. Related guide: [Embeddings](/docs/guides/embeddings) ' sections: - type: endpoint key: createEmbedding path: create - type: object key: Embedding path: object - id: fine-tuning title: Fine-tuning description: 'Manage fine-tuning jobs to tailor a model to your specific training data. Related guide: [Fine-tune models](/docs/guides/fine-tuning) ' sections: - type: endpoint key: createFineTuningJob path: create - type: endpoint key: listPaginatedFineTuningJobs path: list - type: endpoint key: listFineTuningEvents path: list-events - type: endpoint key: retrieveFineTuningJob path: retrieve - type: endpoint key: cancelFineTuningJob path: cancel - type: object key: FineTuningJob path: object - type: object key: FineTuningJobEvent path: event-object - id: files title: Files description: 'Files are used to upload documents that can be used with features like [Assistants](/docs/api-reference/assistants) and [Fine-tuning](/docs/api-reference/fine-tuning). ' sections: - type: endpoint key: createFile path: create - type: endpoint key: listFiles path: list - type: endpoint key: retrieveFile path: retrieve - type: endpoint key: deleteFile path: delete - type: endpoint key: downloadFile path: retrieve-contents - type: object key: OpenAIFile path: object - id: images title: Images description: 'Given a prompt and/or an input image, the model will generate a new image. Related guide: [Image generation](/docs/guides/images) ' sections: - type: endpoint key: createImage path: create - type: endpoint key: createImageEdit path: createEdit - type: endpoint key: createImageVariation path: createVariation - type: object key: Image path: object - id: models title: Models description: 'List and describe the various models available in the API. You can refer to the [Models](/docs/models) documentation to understand what models are available and the differences between them. ' sections: - type: endpoint key: listModels path: list - type: endpoint key: retrieveModel path: retrieve - type: endpoint key: deleteModel path: delete - type: object key: Model path: object - id: moderations title: Moderations description: 'Given a input text, outputs if the model classifies it as violating OpenAI''s content policy. Related guide: [Moderations](/docs/guides/moderation) ' sections: - type: endpoint key: createModeration path: create - type: object key: CreateModerationResponse path: object - id: assistants title: Assistants beta: true description: 'Build assistants that can call models and use tools to perform tasks. [Get started with the Assistants API](/docs/assistants) ' sections: - type: endpoint key: createAssistant path: createAssistant - type: endpoint key: createAssistantFile path: createAssistantFile - type: endpoint key: listAssistants path: listAssistants - type: endpoint key: listAssistantFiles path: listAssistantFiles - type: endpoint key: getAssistant path: getAssistant - type: endpoint key: getAssistantFile path: getAssistantFile - type: endpoint key: modifyAssistant path: modifyAssistant - type: endpoint key: deleteAssistant path: deleteAssistant - type: endpoint key: deleteAssistantFile path: deleteAssistantFile - type: object key: AssistantObject path: object - type: object key: AssistantFileObject path: file-object - id: threads title: Threads beta: true description: 'Create threads that assistants can interact with. Related guide: [Assistants](/docs/assistants/overview) ' sections: - type: endpoint key: createThread path: createThread - type: endpoint key: getThread path: getThread - type: endpoint key: modifyThread path: modifyThread - type: endpoint key: deleteThread path: deleteThread - type: object key: ThreadObject path: object - id: messages title: Messages beta: true description: 'Create messages within threads Related guide: [Assistants](/docs/assistants/overview) ' sections: - type: endpoint key: createMessage path: createMessage - type: endpoint key: listMessages path: listMessages - type: endpoint key: listMessageFiles path: listMessageFiles - type: endpoint key: getMessage path: getMessage - type: endpoint key: getMessageFile path: getMessageFile - type: endpoint key: modifyMessage path: modifyMessage - type: object key: MessageObject path: object - type: object key: MessageFileObject path: file-object - id: runs title: Runs beta: true description: 'Represents an execution run on a thread. Related guide: [Assistants](/docs/assistants/overview) ' sections: - type: endpoint key: createRun path: createRun - type: endpoint key: createThreadAndRun path: createThreadAndRun - type: endpoint key: listRuns path: listRuns - type: endpoint key: listRunSteps path: listRunSteps - type: endpoint key: getRun path: getRun - type: endpoint key: getRunStep path: getRunStep - type: endpoint key: modifyRun path: modifyRun - type: endpoint key: submitToolOuputsToRun path: submitToolOutputs - type: endpoint key: cancelRun path: cancelRun - type: object key: RunObject path: object - type: object key: RunStepObject path: step-object - id: completions title: Completions legacy: true description: 'Given a prompt, the model will return one or more predicted completions along with the probabilities of alternative tokens at each position. Most developer should use our [Chat Completions API](/docs/guides/text-generation/text-generation-models) to leverage our best and newest models. Most models that support the legacy Completions endpoint [will be shut off on January 4th, 2024](/docs/deprecations/2023-07-06-gpt-and-embeddings). ' sections: - type: endpoint key: createCompletion path: create - type: object key: CreateCompletionResponse path: object