[{"title":"","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Responses","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create a model response","method":"post","path":"https://api.openai.com/v1/responses","summary":"Creates a model response. Provide text or\nimage inputs to generate text\nor JSON outputs. Have the model call\nyour own custom code or use built-in\ntools like web search\nor file search to use your own data\nas input for the model's response.","parameters":{"responses-create__table":[{"name":"background","type":"boolean or null","required":false,"default":"false","description":"Whether to run the model response in the background. Learn more."},{"name":"include","type":"array or null","required":false,"description":"Specify additional output data to include in the model response. Currently supported values are: 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. computer_call_output.output.image_url: Include image urls from the computer call output. 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). code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items."},{"name":"input","type":"string or array","required":false,"description":"Text, image, or file inputs to the model, used to generate a response. Learn more: Text inputs and outputs Image inputs File inputs Conversation state Function calling"},{"name":"instructions","type":"string or null","required":false,"description":"A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses."},{"name":"max_output_tokens","type":"integer or null","required":false,"description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens."},{"name":"metadata","type":"map","required":false,"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."},{"name":"model","type":"string","required":false,"description":"Model ID used to generate the response, like gpt-4o or o3. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models."},{"name":"parallel_tool_calls","type":"boolean or null","required":false,"default":"true","description":"Whether to allow the model to run tool calls in parallel."},{"name":"previous_response_id","type":"string or null","required":false,"description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state."},{"name":"prompt","type":"object or null","required":false,"description":"Reference to a prompt template and its variables. Learn more."},{"name":"reasoning","type":"object or null","required":false,"description":"o-series models only Configuration options for reasoning models."},{"name":"service_tier","type":"string or null","required":false,"default":"auto","description":"Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service: If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'flex', the request will be processed with the Flex Processing service tier. Learn more. When not set, the default behavior is 'auto'. When this parameter is set, the response body will include the service_tier utilized."},{"name":"store","type":"boolean or null","required":false,"default":"true","description":"Whether to store the generated model response for later retrieval via API."},{"name":"stream","type":"boolean or null","required":false,"default":"false","description":"If set to true, the model response data will be streamed to the client as it is generated using server-sent events. See the Streaming section below for more information."},{"name":"temperature","type":"number or null","required":false,"default":"1","description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both."},{"name":"text","type":"object","required":false,"description":"Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: Text inputs and outputs Structured Outputs"},{"name":"tool_choice","type":"string or object","required":false,"description":"How the model should select which tool (or tools) to use when generating a response. See the tools parameter to see how to specify which tools the model can call."},{"name":"tools","type":"array","required":false,"description":"An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. The two categories of tools you can provide the model are: Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools. Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling."},{"name":"top_p","type":"number or null","required":false,"default":"1","description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."},{"name":"truncation","type":"string or null","required":false,"default":"disabled","description":"The truncation strategy to use for the model response. auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error."},{"name":"user","type":"string","required":false,"description":"A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more."}]},"returns":"boolean or null","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n\ncurl https://api.openai.com/v1/responses \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"model\": \"gpt-4.1\",\n    \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n\n{\n  \"id\": \"resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b\",\n  \"object\": \"response\",\n  \"created_at\": 1741476542,\n  \"status\": \"completed\",\n  \"error\": null,\n  \"incomplete_details\": null,\n  \"instructions\": null,\n  \"max_output_tokens\": null,\n  \"model\": \"gpt-4.1-2025-04-14\",\n  \"output\": [\n    {\n      \"type\": \"message\",\n      \"id\": \"msg_67ccd2bf17f0819081ff3bb2cf6508e60bb6a6b452d3795b\",\n      \"status\": \"completed\",\n      \"role\": \"assistant\",\n      \"content\": [\n        {\n          \"type\": \"output_text\",\n          \"text\": \"In a peaceful grove beneath a silver moon, a unicorn named Lumina discovered a hidden pool that reflected the stars. As she dipped her horn into the water, the pool began to shimmer, revealing a pathway to a magical realm of endless night skies. Filled with wonder, Lumina whispered a wish for all who dream to find their own hidden magic, and as she glanced back, her hoofprints sparkled like stardust.\",\n          \"annotations\": []\n        }\n      ]\n    }\n  ],\n  \"parallel_tool_calls\": true,\n  \"previous_response_id\": null,\n  \"reasoning\": {\n    \"effort\": null,\n    \"summary\": null\n  },\n  \"store\": true,\n  \"temperature\": 1.0,\n  \"text\": {\n    \"format\": {\n      \"type\": \"text\"\n    }\n  },\n  \"tool_choice\": \"auto\",\n  \"tools\": [],\n  \"top_p\": 1.0,\n  \"truncation\": \"disabled\",\n  \"usage\": {\n    \"input_tokens\": 36,\n    \"input_tokens_details\": {\n      \"cached_tokens\": 0\n    },\n    \"output_tokens\": 87,\n    \"output_tokens_details\": {\n      \"reasoning_tokens\": 0\n    },\n    \"total_tokens\": 123\n  },\n  \"user\": null,\n  \"metadata\": {}\n}"},{"title":"Get a model response","method":"get","path":"https://api.openai.com/v1/responses/{response_id}","summary":"Retrieves a model response with the given ID.","parameters":{"responses-get__table":[{"name":"include","type":"array","required":false,"description":"Additional fields to include in the response. See the include parameter for Response creation above for more information."},{"name":"starting_after","type":"integer","required":false,"description":"The sequence number of the event after which to start streaming."},{"name":"stream","type":"boolean","required":false,"description":"If set to true, the model response data will be streamed to the client as it is generated using server-sent events. See the Streaming section below for more information."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/responses/resp_123 \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n\n{\n  \"id\": \"resp_67cb71b351908190a308f3859487620d06981a8637e6bc44\",\n  \"object\": \"response\",\n  \"created_at\": 1741386163,\n  \"status\": \"completed\",\n  \"error\": null,\n  \"incomplete_details\": null,\n  \"instructions\": null,\n  \"max_output_tokens\": null,\n  \"model\": \"gpt-4o-2024-08-06\",\n  \"output\": [\n    {\n      \"type\": \"message\",\n      \"id\": \"msg_67cb71b3c2b0819084d481baaaf148f206981a8637e6bc44\",\n      \"status\": \"completed\",\n      \"role\": \"assistant\",\n      \"content\": [\n        {\n          \"type\": \"output_text\",\n          \"text\": \"Silent circuits hum,  \\nThoughts emerge in data streams—  \\nDigital dawn breaks.\",\n          \"annotations\": []\n        }\n      ]\n    }\n  ],\n  \"parallel_tool_calls\": true,\n  \"previous_response_id\": null,\n  \"reasoning\": {\n    \"effort\": null,\n    \"summary\": null\n  },\n  \"store\": true,\n  \"temperature\": 1.0,\n  \"text\": {\n    \"format\": {\n      \"type\": \"text\"\n    }\n  },\n  \"tool_choice\": \"auto\",\n  \"tools\": [],\n  \"top_p\": 1.0,\n  \"truncation\": \"disabled\",\n  \"usage\": {\n    \"input_tokens\": 32,\n    \"input_tokens_details\": {\n      \"cached_tokens\": 0\n    },\n    \"output_tokens\": 18,\n    \"output_tokens_details\": {\n      \"reasoning_tokens\": 0\n    },\n    \"total_tokens\": 50\n  },\n  \"user\": null,\n  \"metadata\": {}\n}"},{"title":"Delete a model response","method":"delete","path":"https://api.openai.com/v1/responses/{response_id}","summary":"Deletes a model response with the given ID.","parameters":{"responses-delete__table":[{"name":"response_id","type":"string","required":true,"description":"The ID of the response to delete."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X DELETE https://api.openai.com/v1/responses/resp_123 \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"id\": \"resp_6786a1bec27481909a17d673315b29f6\",\n  \"object\": \"response\",\n  \"deleted\": true\n}"},{"title":"Cancel a response","method":"post","path":"https://api.openai.com/v1/responses/{response_id}/cancel","summary":"Cancels a model response with the given ID. Only responses created with\nthe background parameter set to true can be cancelled.\nLearn more.","parameters":{"responses-cancel__table":[{"name":"response_id","type":"string","required":true,"description":"The ID of the response to cancel."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X POST https://api.openai.com/v1/responses/resp_123/cancel \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n\n{\n  \"id\": \"resp_67cb71b351908190a308f3859487620d06981a8637e6bc44\",\n  \"object\": \"response\",\n  \"created_at\": 1741386163,\n  \"status\": \"completed\",\n  \"error\": null,\n  \"incomplete_details\": null,\n  \"instructions\": null,\n  \"max_output_tokens\": null,\n  \"model\": \"gpt-4o-2024-08-06\",\n  \"output\": [\n    {\n      \"type\": \"message\",\n      \"id\": \"msg_67cb71b3c2b0819084d481baaaf148f206981a8637e6bc44\",\n      \"status\": \"completed\",\n      \"role\": \"assistant\",\n      \"content\": [\n        {\n          \"type\": \"output_text\",\n          \"text\": \"Silent circuits hum,  \\nThoughts emerge in data streams—  \\nDigital dawn breaks.\",\n          \"annotations\": []\n        }\n      ]\n    }\n  ],\n  \"parallel_tool_calls\": true,\n  \"previous_response_id\": null,\n  \"reasoning\": {\n    \"effort\": null,\n    \"summary\": null\n  },\n  \"store\": true,\n  \"temperature\": 1.0,\n  \"text\": {\n    \"format\": {\n      \"type\": \"text\"\n    }\n  },\n  \"tool_choice\": \"auto\",\n  \"tools\": [],\n  \"top_p\": 1.0,\n  \"truncation\": \"disabled\",\n  \"usage\": {\n    \"input_tokens\": 32,\n    \"input_tokens_details\": {\n      \"cached_tokens\": 0\n    },\n    \"output_tokens\": 18,\n    \"output_tokens_details\": {\n      \"reasoning_tokens\": 0\n    },\n    \"total_tokens\": 50\n  },\n  \"user\": null,\n  \"metadata\": {}\n}"},{"title":"List input items","method":"get","path":"https://api.openai.com/v1/responses/{response_id}/input_items","summary":"Returns a list of input items for a given response.","parameters":{"responses-input-items__table":[{"name":"after","type":"string","required":false,"description":"An item ID to list items after, used in pagination."},{"name":"before","type":"string","required":false,"description":"An item ID to list items before, used in pagination."},{"name":"include","type":"array","required":false,"description":"Additional fields to include in the response. See the include parameter for Response creation above for more information."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"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."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/responses/resp_abc123/input_items \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"msg_abc123\",\n      \"type\": \"message\",\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"input_text\",\n          \"text\": \"Tell me a three sentence bedtime story about a unicorn.\"\n        }\n      ]\n    }\n  ],\n  \"first_id\": \"msg_abc123\",\n  \"last_id\": \"msg_abc123\",\n  \"has_more\": false\n}"},{"title":"The response object","method":"","path":"","summary":"","parameters":{"responses/object__table":[{"name":"background","type":"boolean or null","required":false,"description":"Whether to run the model response in the background. Learn more."},{"name":"created_at","type":"number","required":false,"description":"Unix timestamp (in seconds) of when this Response was created."},{"name":"error","type":"object or null","required":false,"description":"An error object returned when the model fails to generate a Response."},{"name":"id","type":"string","required":false,"description":"Unique identifier for this Response."},{"name":"incomplete_details","type":"object or null","required":false,"description":"Details about why the response is incomplete."},{"name":"instructions","type":"string or array","required":false,"description":"A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses."},{"name":"max_output_tokens","type":"integer or null","required":false,"description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens."},{"name":"metadata","type":"map","required":false,"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."},{"name":"model","type":"string","required":false,"description":"Model ID used to generate the response, like gpt-4o or o3. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models."},{"name":"object","type":"string","required":false,"description":"The object type of this resource - always set to response."},{"name":"output","type":"array","required":false,"description":"An array of content items generated by the model. The length and order of items in the output array is dependent on the model's response. Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs."},{"name":"output_text","type":"string or null","required":false,"description":"SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs."},{"name":"parallel_tool_calls","type":"boolean","required":false,"description":"Whether to allow the model to run tool calls in parallel."},{"name":"previous_response_id","type":"string or null","required":false,"description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state."},{"name":"prompt","type":"object or null","required":false,"description":"Reference to a prompt template and its variables. Learn more."},{"name":"reasoning","type":"object or null","required":false,"description":"o-series models only Configuration options for reasoning models."},{"name":"service_tier","type":"string or null","required":false,"description":"Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service: If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'flex', the request will be processed with the Flex Processing service tier. Learn more. When not set, the default behavior is 'auto'. When this parameter is set, the response body will include the service_tier utilized."},{"name":"status","type":"string","required":false,"description":"The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete."},{"name":"temperature","type":"number or null","required":false,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both."},{"name":"text","type":"object","required":false,"description":"Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: Text inputs and outputs Structured Outputs"},{"name":"tool_choice","type":"string or object","required":false,"description":"How the model should select which tool (or tools) to use when generating a response. See the tools parameter to see how to specify which tools the model can call."},{"name":"tools","type":"array","required":false,"description":"An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. The two categories of tools you can provide the model are: Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools. Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling."},{"name":"top_p","type":"number or null","required":false,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."},{"name":"truncation","type":"string or null","required":false,"description":"The truncation strategy to use for the model response. auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error."},{"name":"usage","type":"object","required":false,"description":"Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used."},{"name":"user","type":"string","required":false,"description":"A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n\n{\n  \"id\": \"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41\",\n  \"object\": \"response\",\n  \"created_at\": 1741476777,\n  \"status\": \"completed\",\n  \"error\": null,\n  \"incomplete_details\": null,\n  \"instructions\": null,\n  \"max_output_tokens\": null,\n  \"model\": \"gpt-4o-2024-08-06\",\n  \"output\": [\n    {\n      \"type\": \"message\",\n      \"id\": \"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41\",\n      \"status\": \"completed\",\n      \"role\": \"assistant\",\n      \"content\": [\n        {\n          \"type\": \"output_text\",\n          \"text\": \"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.\",\n          \"annotations\": []\n        }\n      ]\n    }\n  ],\n  \"parallel_tool_calls\": true,\n  \"previous_response_id\": null,\n  \"reasoning\": {\n    \"effort\": null,\n    \"summary\": null\n  },\n  \"store\": true,\n  \"temperature\": 1,\n  \"text\": {\n    \"format\": {\n      \"type\": \"text\"\n    }\n  },\n  \"tool_choice\": \"auto\",\n  \"tools\": [],\n  \"top_p\": 1,\n  \"truncation\": \"disabled\",\n  \"usage\": {\n    \"input_tokens\": 328,\n    \"input_tokens_details\": {\n      \"cached_tokens\": 0\n    },\n    \"output_tokens\": 52,\n    \"output_tokens_details\": {\n      \"reasoning_tokens\": 0\n    },\n    \"total_tokens\": 380\n  },\n  \"user\": null,\n  \"metadata\": {}\n}"},{"title":"The input item list","method":"","path":"","summary":"","parameters":{"responses/list__table":[{"name":"data","type":"array","required":false,"description":"A list of items used to generate this response."},{"name":"first_id","type":"string","required":false,"description":"The ID of the first item in the list."},{"name":"has_more","type":"boolean","required":false,"description":"Whether there are more items available."},{"name":"last_id","type":"string","required":false,"description":"The ID of the last item in the list."},{"name":"object","type":"string","required":false,"description":"The type of object returned, must be list."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Streaming","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"response.created","method":"","path":"","summary":"","parameters":{"responses-streaming/response/created__table":[{"name":"response","type":"object","required":false,"description":"The response that was created."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number for this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.created."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n\n{\n  \"type\": \"response.created\",\n  \"response\": {\n    \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n    \"object\": \"response\",\n    \"created_at\": 1741487325,\n    \"status\": \"in_progress\",\n    \"error\": null,\n    \"incomplete_details\": null,\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-2024-08-06\",\n    \"output\": [],\n    \"parallel_tool_calls\": true,\n    \"previous_response_id\": null,\n    \"reasoning\": {\n      \"effort\": null,\n      \"summary\": null\n    },\n    \"store\": true,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": null,\n    \"user\": null,\n    \"metadata\": {}\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.in_progress","method":"","path":"","summary":"","parameters":{"responses-streaming/response/in_progress__table":[{"name":"response","type":"object","required":false,"description":"The response that is in progress."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.in_progress."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n\n{\n  \"type\": \"response.in_progress\",\n  \"response\": {\n    \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n    \"object\": \"response\",\n    \"created_at\": 1741487325,\n    \"status\": \"in_progress\",\n    \"error\": null,\n    \"incomplete_details\": null,\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-2024-08-06\",\n    \"output\": [],\n    \"parallel_tool_calls\": true,\n    \"previous_response_id\": null,\n    \"reasoning\": {\n      \"effort\": null,\n      \"summary\": null\n    },\n    \"store\": true,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": null,\n    \"user\": null,\n    \"metadata\": {}\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.completed","method":"","path":"","summary":"","parameters":{"responses-streaming/response/completed__table":[{"name":"response","type":"object","required":false,"description":"Properties of the completed response."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number for this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.completed."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n\n{\n  \"type\": \"response.completed\",\n  \"response\": {\n    \"id\": \"resp_123\",\n    \"object\": \"response\",\n    \"created_at\": 1740855869,\n    \"status\": \"completed\",\n    \"error\": null,\n    \"incomplete_details\": null,\n    \"input\": [],\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-mini-2024-07-18\",\n    \"output\": [\n      {\n        \"id\": \"msg_123\",\n        \"type\": \"message\",\n        \"role\": \"assistant\",\n        \"content\": [\n          {\n            \"type\": \"output_text\",\n            \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n            \"annotations\": []\n          }\n        ]\n      }\n    ],\n    \"previous_response_id\": null,\n    \"reasoning_effort\": null,\n    \"store\": false,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": {\n      \"input_tokens\": 0,\n      \"output_tokens\": 0,\n      \"output_tokens_details\": {\n        \"reasoning_tokens\": 0\n      },\n      \"total_tokens\": 0\n    },\n    \"user\": null,\n    \"metadata\": {}\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.failed","method":"","path":"","summary":"","parameters":{"responses-streaming/response/failed__table":[{"name":"response","type":"object","required":false,"description":"The response that failed."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.failed."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n\n{\n  \"type\": \"response.failed\",\n  \"response\": {\n    \"id\": \"resp_123\",\n    \"object\": \"response\",\n    \"created_at\": 1740855869,\n    \"status\": \"failed\",\n    \"error\": {\n      \"code\": \"server_error\",\n      \"message\": \"The model failed to generate a response.\"\n    },\n    \"incomplete_details\": null,\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-mini-2024-07-18\",\n    \"output\": [],\n    \"previous_response_id\": null,\n    \"reasoning_effort\": null,\n    \"store\": false,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": null,\n    \"user\": null,\n    \"metadata\": {}\n  }\n}"},{"title":"response.incomplete","method":"","path":"","summary":"","parameters":{"responses-streaming/response/incomplete__table":[{"name":"response","type":"object","required":false,"description":"The response that was incomplete."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.incomplete."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n\n{\n  \"type\": \"response.incomplete\",\n  \"response\": {\n    \"id\": \"resp_123\",\n    \"object\": \"response\",\n    \"created_at\": 1740855869,\n    \"status\": \"incomplete\",\n    \"error\": null, \n    \"incomplete_details\": {\n      \"reason\": \"max_tokens\"\n    },\n    \"instructions\": null,\n    \"max_output_tokens\": null,\n    \"model\": \"gpt-4o-mini-2024-07-18\",\n    \"output\": [],\n    \"previous_response_id\": null,\n    \"reasoning_effort\": null,\n    \"store\": false,\n    \"temperature\": 1,\n    \"text\": {\n      \"format\": {\n        \"type\": \"text\"\n      }\n    },\n    \"tool_choice\": \"auto\",\n    \"tools\": [],\n    \"top_p\": 1,\n    \"truncation\": \"disabled\",\n    \"usage\": null,\n    \"user\": null,\n    \"metadata\": {}\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.output_item.added","method":"","path":"","summary":"","parameters":{"responses-streaming/response/output_item/added__table":[{"name":"item","type":"object","required":false,"description":"The output item that was added."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that was added."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.output_item.added."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n  \"type\": \"response.output_item.added\",\n  \"output_index\": 0,\n  \"item\": {\n    \"id\": \"msg_123\",\n    \"status\": \"in_progress\",\n    \"type\": \"message\",\n    \"role\": \"assistant\",\n    \"content\": []\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.output_item.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/output_item/done__table":[{"name":"item","type":"object","required":false,"description":"The output item that was marked done."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that was marked done."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.output_item.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n\n{\n  \"type\": \"response.output_item.done\",\n  \"output_index\": 0,\n  \"item\": {\n    \"id\": \"msg_123\",\n    \"status\": \"completed\",\n    \"type\": \"message\",\n    \"role\": \"assistant\",\n    \"content\": [\n      {\n        \"type\": \"output_text\",\n        \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n        \"annotations\": []\n      }\n    ]\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.content_part.added","method":"","path":"","summary":"","parameters":{"responses-streaming/response/content_part/added__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part that was added."},{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the content part was added to."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the content part was added to."},{"name":"part","type":"object","required":false,"description":"The content part that was added."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.content_part.added."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n  \"type\": \"response.content_part.added\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"part\": {\n    \"type\": \"output_text\",\n    \"text\": \"\",\n    \"annotations\": []\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.content_part.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/content_part/done__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part that is done."},{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the content part was added to."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the content part was added to."},{"name":"part","type":"object","required":false,"description":"The content part that is done."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.content_part.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n  \"type\": \"response.content_part.done\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"sequence_number\": 1,\n  \"part\": {\n    \"type\": \"output_text\",\n    \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n    \"annotations\": []\n  }\n}"},{"title":"response.output_text.delta","method":"","path":"","summary":"","parameters":{"responses-streaming/response/output_text/delta__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part that the text delta was added to."},{"name":"delta","type":"string","required":false,"description":"The text delta that was added."},{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the text delta was added to."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the text delta was added to."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number for this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.output_text.delta."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"type\": \"response.output_text.delta\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"delta\": \"In\",\n  \"sequence_number\": 1\n}"},{"title":"response.output_text.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/output_text/done__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part that the text content is finalized."},{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the text content is finalized."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the text content is finalized."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number for this event."},{"name":"text","type":"string","required":false,"description":"The text content that is finalized."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.output_text.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"type\": \"response.output_text.done\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n  \"sequence_number\": 1\n}"},{"title":"response.refusal.delta","method":"","path":"","summary":"","parameters":{"responses-streaming/response/refusal/delta__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part that the refusal text is added to."},{"name":"delta","type":"string","required":false,"description":"The refusal text that is added."},{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the refusal text is added to."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the refusal text is added to."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.refusal.delta."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"type\": \"response.refusal.delta\",\n  \"item_id\": \"msg_123\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"delta\": \"refusal text so far\",\n  \"sequence_number\": 1\n}"},{"title":"response.refusal.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/refusal/done__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part that the refusal text is finalized."},{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the refusal text is finalized."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the refusal text is finalized."},{"name":"refusal","type":"string","required":false,"description":"The refusal text that is finalized."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.refusal.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"type\": \"response.refusal.done\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 1,\n  \"content_index\": 2,\n  \"refusal\": \"final refusal text\",\n  \"sequence_number\": 1\n}"},{"title":"response.function_call_arguments.delta","method":"","path":"","summary":"","parameters":{"responses-streaming/response/function_call_arguments/delta__table":[{"name":"delta","type":"string","required":false,"description":"The function-call arguments delta that is added."},{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the function-call arguments delta is added to."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the function-call arguments delta is added to."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.function_call_arguments.delta."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n\n{\n  \"type\": \"response.function_call_arguments.delta\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 0,\n  \"delta\": \"{ \\\"arg\\\":\"\n  \"sequence_number\": 1\n}"},{"title":"response.function_call_arguments.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/function_call_arguments/done__table":[{"name":"arguments","type":"string","required":false,"description":"The function-call arguments."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":""}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n\n{\n  \"type\": \"response.function_call_arguments.done\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 1,\n  \"arguments\": \"{ \\\"arg\\\": 123 }\",\n  \"sequence_number\": 1\n}"},{"title":"response.file_search_call.in_progress","method":"","path":"","summary":"","parameters":{"responses-streaming/response/file_search_call/in_progress__table":[{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the file search call is initiated."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the file search call is initiated."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.file_search_call.in_progress."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.file_search_call.in_progress\",\n  \"output_index\": 0,\n  \"item_id\": \"fs_123\",\n  \"sequence_number\": 1\n}"},{"title":"response.file_search_call.searching","method":"","path":"","summary":"","parameters":{"responses-streaming/response/file_search_call/searching__table":[{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the file search call is initiated."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the file search call is searching."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.file_search_call.searching."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.file_search_call.searching\",\n  \"output_index\": 0,\n  \"item_id\": \"fs_123\",\n  \"sequence_number\": 1\n}"},{"title":"response.file_search_call.completed","method":"","path":"","summary":"","parameters":{"responses-streaming/response/file_search_call/completed__table":[{"name":"item_id","type":"string","required":false,"description":"The ID of the output item that the file search call is initiated."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the file search call is initiated."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.file_search_call.completed."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.file_search_call.completed\",\n  \"output_index\": 0,\n  \"item_id\": \"fs_123\",\n  \"sequence_number\": 1\n}"},{"title":"response.web_search_call.in_progress","method":"","path":"","summary":"","parameters":{"responses-streaming/response/web_search_call/in_progress__table":[{"name":"item_id","type":"string","required":false,"description":"Unique ID for the output item associated with the web search call."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the web search call is associated with."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of the web search call being processed."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.web_search_call.in_progress."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.web_search_call.in_progress\",\n  \"output_index\": 0,\n  \"item_id\": \"ws_123\",\n  \"sequence_number\": 0\n}"},{"title":"response.web_search_call.searching","method":"","path":"","summary":"","parameters":{"responses-streaming/response/web_search_call/searching__table":[{"name":"item_id","type":"string","required":false,"description":"Unique ID for the output item associated with the web search call."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the web search call is associated with."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of the web search call being processed."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.web_search_call.searching."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.web_search_call.searching\",\n  \"output_index\": 0,\n  \"item_id\": \"ws_123\",\n  \"sequence_number\": 0\n}"},{"title":"response.web_search_call.completed","method":"","path":"","summary":"","parameters":{"responses-streaming/response/web_search_call/completed__table":[{"name":"item_id","type":"string","required":false,"description":"Unique ID for the output item associated with the web search call."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item that the web search call is associated with."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of the web search call being processed."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.web_search_call.completed."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.web_search_call.completed\",\n  \"output_index\": 0,\n  \"item_id\": \"ws_123\",\n  \"sequence_number\": 0\n}"},{"title":"response.reasoning_summary_part.added","method":"","path":"","summary":"","parameters":{"responses-streaming/response/reasoning_summary_part/added__table":[{"name":"item_id","type":"string","required":false,"description":"The ID of the item this summary part is associated with."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item this summary part is associated with."},{"name":"part","type":"object","required":false,"description":"The summary part that was added."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"summary_index","type":"integer","required":false,"description":"The index of the summary part within the reasoning summary."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.reasoning_summary_part.added."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n\n{\n  \"type\": \"response.reasoning_summary_part.added\",\n  \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"part\": {\n    \"type\": \"summary_text\",\n    \"text\": \"\"\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.reasoning_summary_part.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/reasoning_summary_part/done__table":[{"name":"item_id","type":"string","required":false,"description":"The ID of the item this summary part is associated with."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item this summary part is associated with."},{"name":"part","type":"object","required":false,"description":"The completed summary part."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"summary_index","type":"integer","required":false,"description":"The index of the summary part within the reasoning summary."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.reasoning_summary_part.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n\n{\n  \"type\": \"response.reasoning_summary_part.done\",\n  \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"part\": {\n    \"type\": \"summary_text\",\n    \"text\": \"**Responding to a greeting**\\n\\nThe user just said, \\\"Hello!\\\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \\\"Hello! How can I assist you today?\\\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\"\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.reasoning_summary_text.delta","method":"","path":"","summary":"","parameters":{"responses-streaming/response/reasoning_summary_text/delta__table":[{"name":"delta","type":"string","required":false,"description":"The text delta that was added to the summary."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item this summary text delta is associated with."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item this summary text delta is associated with."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"summary_index","type":"integer","required":false,"description":"The index of the summary part within the reasoning summary."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.reasoning_summary_text.delta."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"type\": \"response.reasoning_summary_text.delta\",\n  \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"delta\": \"**Responding to a greeting**\\n\\nThe user just said, \\\"Hello!\\\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \\\"Hello! How can I assist you today?\\\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n  \"sequence_number\": 1\n}"},{"title":"response.reasoning_summary_text.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/reasoning_summary_text/done__table":[{"name":"item_id","type":"string","required":false,"description":"The ID of the item this summary text is associated with."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item this summary text is associated with."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"summary_index","type":"integer","required":false,"description":"The index of the summary part within the reasoning summary."},{"name":"text","type":"string","required":false,"description":"The full text of the completed reasoning summary."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always response.reasoning_summary_text.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"type\": \"response.reasoning_summary_text.done\",\n  \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"text\": \"**Responding to a greeting**\\n\\nThe user just said, \\\"Hello!\\\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \\\"Hello! How can I assist you today?\\\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n  \"sequence_number\": 1\n}"},{"title":"response.image_generation_call.completed","method":"","path":"","summary":"","parameters":{"responses-streaming/response/image_generation_call/completed__table":[{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the image generation item being processed."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.image_generation_call.completed'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.image_generation_call.completed\",\n  \"output_index\": 0,\n  \"item_id\": \"item-123\",\n  \"sequence_number\": 1\n}"},{"title":"response.image_generation_call.generating","method":"","path":"","summary":"","parameters":{"responses-streaming/response/image_generation_call/generating__table":[{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the image generation item being processed."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of the image generation item being processed."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.image_generation_call.generating'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.image_generation_call.generating\",\n  \"output_index\": 0,\n  \"item_id\": \"item-123\",\n  \"sequence_number\": 0\n}"},{"title":"response.image_generation_call.in_progress","method":"","path":"","summary":"","parameters":{"responses-streaming/response/image_generation_call/in_progress__table":[{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the image generation item being processed."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of the image generation item being processed."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.image_generation_call.in_progress'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.image_generation_call.in_progress\",\n  \"output_index\": 0,\n  \"item_id\": \"item-123\",\n  \"sequence_number\": 0\n}"},{"title":"response.image_generation_call.partial_image","method":"","path":"","summary":"","parameters":{"responses-streaming/response/image_generation_call/partial_image__table":[{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the image generation item being processed."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"partial_image_b64","type":"string","required":false,"description":"Base64-encoded partial image data, suitable for rendering as an image."},{"name":"partial_image_index","type":"integer","required":false,"description":"0-based index for the partial image (backend is 1-based, but this is 0-based for the user)."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of the image generation item being processed."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.image_generation_call.partial_image'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"type\": \"response.image_generation_call.partial_image\",\n  \"output_index\": 0,\n  \"item_id\": \"item-123\",\n  \"sequence_number\": 0,\n  \"partial_image_index\": 0,\n  \"partial_image_b64\": \"...\"\n}"},{"title":"response.mcp_call.arguments.delta","method":"","path":"","summary":"","parameters":{"responses-streaming/response/mcp_call/arguments/delta__table":[{"name":"delta","type":"object","required":false,"description":"The partial update to the arguments for the MCP tool call."},{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the MCP tool call item being processed."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.mcp_call.arguments_delta'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"type\": \"response.mcp_call.arguments.delta\",\n  \"output_index\": 0,\n  \"item_id\": \"item-abc\",\n  \"delta\": {\n    \"arg1\": \"new_value1\",\n    \"arg2\": \"new_value2\"\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.mcp_call.arguments.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/mcp_call/arguments/done__table":[{"name":"arguments","type":"object","required":false,"description":"The finalized arguments for the MCP tool call."},{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the MCP tool call item being processed."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.mcp_call.arguments_done'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"type\": \"response.mcp_call.arguments.done\",\n  \"output_index\": 0,\n  \"item_id\": \"item-abc\",\n  \"arguments\": {\n    \"arg1\": \"value1\",\n    \"arg2\": \"value2\"\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.mcp_call.completed","method":"","path":"","summary":"","parameters":{"responses-streaming/response/mcp_call/completed__table":[{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.mcp_call.completed'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n\n{\n  \"type\": \"response.mcp_call.completed\",\n  \"sequence_number\": 1\n}"},{"title":"response.mcp_call.failed","method":"","path":"","summary":"","parameters":{"responses-streaming/response/mcp_call/failed__table":[{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.mcp_call.failed'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n\n{\n  \"type\": \"response.mcp_call.failed\",\n  \"sequence_number\": 1\n}"},{"title":"response.mcp_call.in_progress","method":"","path":"","summary":"","parameters":{"responses-streaming/response/mcp_call/in_progress__table":[{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the MCP tool call item being processed."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.mcp_call.in_progress'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"type\": \"response.mcp_call.in_progress\",\n  \"output_index\": 0,\n  \"item_id\": \"item-abc\",\n  \"sequence_number\": 1\n}"},{"title":"response.mcp_list_tools.completed","method":"","path":"","summary":"","parameters":{"responses-streaming/response/mcp_list_tools/completed__table":[{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.mcp_list_tools.completed'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n\n{\n  \"type\": \"response.mcp_list_tools.completed\",\n  \"sequence_number\": 1\n}"},{"title":"response.mcp_list_tools.failed","method":"","path":"","summary":"","parameters":{"responses-streaming/response/mcp_list_tools/failed__table":[{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.mcp_list_tools.failed'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n\n{\n  \"type\": \"response.mcp_list_tools.failed\",\n  \"sequence_number\": 1\n}"},{"title":"response.mcp_list_tools.in_progress","method":"","path":"","summary":"","parameters":{"responses-streaming/response/mcp_list_tools/in_progress__table":[{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.mcp_list_tools.in_progress'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n\n{\n  \"type\": \"response.mcp_list_tools.in_progress\",\n  \"sequence_number\": 1\n}"},{"title":"response.output_text_annotation.added","method":"","path":"","summary":"","parameters":{"responses-streaming/response/output_text_annotation/added__table":[{"name":"annotation","type":"object","required":false,"description":"The annotation object being added. (See annotation schema for details.)"},{"name":"annotation_index","type":"integer","required":false,"description":"The index of the annotation within the content part."},{"name":"content_index","type":"integer","required":false,"description":"The index of the content part within the output item."},{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the item to which the annotation is being added."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.output_text_annotation.added'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n{\n  \"type\": \"response.output_text_annotation.added\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"annotation_index\": 0,\n  \"annotation\": {\n    \"type\": \"text_annotation\",\n    \"text\": \"This is a test annotation\",\n    \"start\": 0,\n    \"end\": 10\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.queued","method":"","path":"","summary":"","parameters":{"responses-streaming/response/queued__table":[{"name":"response","type":"object","required":false,"description":"The full response object that is queued."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number for this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.queued'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"type\": \"response.queued\",\n  \"response\": {\n    \"id\": \"res_123\",\n    \"status\": \"queued\",\n    \"created_at\": \"2021-01-01T00:00:00Z\",\n    \"updated_at\": \"2021-01-01T00:00:00Z\"\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.reasoning.delta","method":"","path":"","summary":"","parameters":{"responses-streaming/response/reasoning/delta__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the reasoning content part within the output item."},{"name":"delta","type":"object","required":false,"description":"The partial update to the reasoning content."},{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the item for which reasoning is being updated."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.reasoning.delta'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"type\": \"response.reasoning.delta\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"delta\": {\n    \"text\": \"This is a test delta\"\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.reasoning.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/reasoning/done__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the reasoning content part within the output item."},{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the item for which reasoning is finalized."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"text","type":"string","required":false,"description":"The finalized reasoning text."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.reasoning.done'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"type\": \"response.reasoning.done\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 0,\n  \"content_index\": 0,\n  \"text\": \"This is a test reasoning\",\n  \"sequence_number\": 1\n}"},{"title":"response.reasoning_summary.delta","method":"","path":"","summary":"","parameters":{"responses-streaming/response/reasoning_summary/delta__table":[{"name":"delta","type":"object","required":false,"description":"The partial update to the reasoning summary content."},{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the item for which the reasoning summary is being updated."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"summary_index","type":"integer","required":false,"description":"The index of the summary part within the output item."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.reasoning_summary.delta'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"type\": \"response.reasoning_summary.delta\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"delta\": {\n    \"text\": \"delta text\"\n  },\n  \"sequence_number\": 1\n}"},{"title":"response.reasoning_summary.done","method":"","path":"","summary":"","parameters":{"responses-streaming/response/reasoning_summary/done__table":[{"name":"item_id","type":"string","required":false,"description":"The unique identifier of the item for which the reasoning summary is finalized."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response's output array."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"summary_index","type":"integer","required":false,"description":"The index of the summary part within the output item."},{"name":"text","type":"string","required":false,"description":"The finalized reasoning summary text."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always 'response.reasoning_summary.done'."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"type\": \"response.reasoning_summary.done\",\n  \"item_id\": \"item-abc\",\n  \"output_index\": 0,\n  \"summary_index\": 0,\n  \"text\": \"This is a test reasoning summary\",\n  \"sequence_number\": 1\n}"},{"title":"error","method":"","path":"","summary":"","parameters":{"responses-streaming/error__table":[{"name":"code","type":"string or null","required":false,"description":"The error code."},{"name":"message","type":"string","required":false,"description":"The error message."},{"name":"param","type":"string or null","required":false,"description":"The error parameter."},{"name":"sequence_number","type":"integer","required":false,"description":"The sequence number of this event."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always error."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Chat Completions","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create chat completion","method":"post","path":"https://api.openai.com/v1/chat/completions","summary":"Starting a new project? We recommend trying Responses\nto take advantage of the latest OpenAI platform features. Compare\nChat Completions with Responses.","parameters":{"chat-create__table":[{"name":"messages","type":"array","required":true,"description":"A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, images, and audio."},{"name":"model","type":"string","required":true,"description":"Model ID used to generate the response, like gpt-4o or o3. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models."},{"name":"audio","type":"object or null","required":false,"description":"Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."},{"name":"frequency_penalty","type":"number or null","required":false,"default":"0","description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim."},{"name":"function_call","type":"string or object","required":false,"description":"Deprecated in favor of tool_choice. Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. Specifying a particular function via {\"name\": \"my_function\"} forces the model to call that function. none is the default when no functions are present. auto is the default if functions are present."},{"name":"functions","type":"array","required":false,"description":"Deprecated in favor of tools. A list of functions the model may generate JSON inputs for."},{"name":"logit_bias","type":"map","required":false,"default":"null","description":"Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token."},{"name":"logprobs","type":"boolean or null","required":false,"default":"false","description":"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message."},{"name":"max_completion_tokens","type":"integer or null","required":false,"description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens."},{"name":"max_tokens","type":"integer or null","required":false,"description":"The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. This value is now deprecated in favor of max_completion_tokens, and is not compatible with o-series models."},{"name":"metadata","type":"map","required":false,"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."},{"name":"modalities","type":"array or null","required":false,"description":"Output types that you would like the model to generate. Most models are capable of generating text, which is the default: [\"text\"] The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: [\"text\", \"audio\"]"},{"name":"n","type":"integer or null","required":false,"default":"1","description":"How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs."},{"name":"parallel_tool_calls","type":"boolean","required":false,"default":"true","description":"Whether to enable parallel function calling during tool use."},{"name":"prediction","type":"object","required":false,"description":"Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content."},{"name":"presence_penalty","type":"number or null","required":false,"default":"0","description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics."},{"name":"reasoning_effort","type":"string or null","required":false,"default":"medium","description":"o-series models only Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response."},{"name":"response_format","type":"object","required":false,"description":"An object specifying the format that the model must output. Setting to { \"type\": \"json_schema\", \"json_schema\": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. Setting to { \"type\": \"json_object\" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it."},{"name":"seed","type":"integer or null","required":false,"description":"This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend."},{"name":"service_tier","type":"string or null","required":false,"default":"auto","description":"Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service: If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'flex', the request will be processed with the Flex Processing service tier. Learn more. When not set, the default behavior is 'auto'. When this parameter is set, the response body will include the service_tier utilized."},{"name":"stop","type":"string / array / null","required":false,"default":"null","description":"Not supported with latest reasoning models o3 and o4-mini. Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence."},{"name":"store","type":"boolean or null","required":false,"default":"false","description":"Whether or not to store the output of this chat completion request for use in our model distillation or evals products."},{"name":"stream","type":"boolean or null","required":false,"default":"false","description":"If set to true, the model response data will be streamed to the client as it is generated using server-sent events. See the Streaming section below for more information, along with the streaming responses guide for more information on how to handle the streaming events."},{"name":"stream_options","type":"object or null","required":false,"default":"null","description":"Options for streaming response. Only set this when you set stream: true."},{"name":"temperature","type":"number or null","required":false,"default":"1","description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both."},{"name":"tool_choice","type":"string or object","required":false,"description":"Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool. none is the default when no tools are present. auto is the default if tools are present."},{"name":"tools","type":"array","required":false,"description":"A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported."},{"name":"top_logprobs","type":"integer or null","required":false,"description":"An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used."},{"name":"top_p","type":"number or null","required":false,"default":"1","description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."},{"name":"user","type":"string","required":false,"description":"A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more."},{"name":"web_search_options","type":"object","required":false,"description":"This tool searches the web for relevant results to use in a response. Learn more about the web search tool."}]},"returns":"array","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n\ncurl https://api.openai.com/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"model\": \"gpt-4.1\",\n    \"messages\": [\n      {\n        \"role\": \"developer\",\n        \"content\": \"You are a helpful assistant.\"\n      },\n      {\n        \"role\": \"user\",\n        \"content\": \"Hello!\"\n      }\n    ]\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n\n{\n  \"id\": \"chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT\",\n  \"object\": \"chat.completion\",\n  \"created\": 1741569952,\n  \"model\": \"gpt-4.1-2025-04-14\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"Hello! How can I assist you today?\",\n        \"refusal\": null,\n        \"annotations\": []\n      },\n      \"logprobs\": null,\n      \"finish_reason\": \"stop\"\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 19,\n    \"completion_tokens\": 10,\n    \"total_tokens\": 29,\n    \"prompt_tokens_details\": {\n      \"cached_tokens\": 0,\n      \"audio_tokens\": 0\n    },\n    \"completion_tokens_details\": {\n      \"reasoning_tokens\": 0,\n      \"audio_tokens\": 0,\n      \"accepted_prediction_tokens\": 0,\n      \"rejected_prediction_tokens\": 0\n    }\n  },\n  \"service_tier\": \"default\"\n}"},{"title":"Get chat completion","method":"get","path":"https://api.openai.com/v1/chat/completions/{completion_id}","summary":"Get a stored chat completion. Only Chat Completions that have been created\nwith the store parameter set to true will be returned.","parameters":{"chat-get__table":[{"name":"completion_id","type":"string","required":true,"description":"The ID of the chat completion to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/chat/completions/chatcmpl-abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n\n{\n  \"object\": \"chat.completion\",\n  \"id\": \"chatcmpl-abc123\",\n  \"model\": \"gpt-4o-2024-08-06\",\n  \"created\": 1738960610,\n  \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n  \"tool_choice\": null,\n  \"usage\": {\n    \"total_tokens\": 31,\n    \"completion_tokens\": 18,\n    \"prompt_tokens\": 13\n  },\n  \"seed\": 4944116822809979520,\n  \"top_p\": 1.0,\n  \"temperature\": 1.0,\n  \"presence_penalty\": 0.0,\n  \"frequency_penalty\": 0.0,\n  \"system_fingerprint\": \"fp_50cad350e4\",\n  \"input_user\": null,\n  \"service_tier\": \"default\",\n  \"tools\": null,\n  \"metadata\": {},\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"content\": \"Mind of circuits hum,  \\nLearning patterns in silence—  \\nFuture's quiet spark.\",\n        \"role\": \"assistant\",\n        \"tool_calls\": null,\n        \"function_call\": null\n      },\n      \"finish_reason\": \"stop\",\n      \"logprobs\": null\n    }\n  ],\n  \"response_format\": null\n}"},{"title":"Get chat messages","method":"get","path":"https://api.openai.com/v1/chat/completions/{completion_id}/messages","summary":"Get the messages in a stored chat completion. Only Chat Completions that\nhave been created with the store parameter set to true will be\nreturned.","parameters":{"chat-getmessages__table":[{"name":"after","type":"string","required":false,"description":"Identifier for the last message from the previous pagination request."},{"name":"limit","type":"integer","required":false,"default":"20","description":"Number of messages to retrieve."},{"name":"order","type":"string","required":false,"default":"asc","description":"Sort order for messages by timestamp. Use asc for ascending order or desc for descending order. Defaults to asc."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/chat/completions/chat_abc123/messages \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n      \"role\": \"user\",\n      \"content\": \"write a haiku about ai\",\n      \"name\": null,\n      \"content_parts\": null\n    }\n  ],\n  \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n  \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n  \"has_more\": false\n}"},{"title":"List Chat Completions","method":"get","path":"https://api.openai.com/v1/chat/completions","summary":"List stored Chat Completions. Only Chat Completions that have been stored\nwith the store parameter set to true will be returned.","parameters":{"chat-list__table":[{"name":"after","type":"string","required":false,"description":"Identifier for the last chat completion from the previous pagination request."},{"name":"limit","type":"integer","required":false,"default":"20","description":"Number of Chat Completions to retrieve."},{"name":"metadata","type":"map","required":false,"description":"A list of metadata keys to filter the Chat Completions by. Example: metadata[key1]=value1&metadata[key2]=value2"},{"name":"model","type":"string","required":false,"description":"The model used to generate the Chat Completions."},{"name":"order","type":"string","required":false,"default":"asc","description":"Sort order for Chat Completions by timestamp. Use asc for ascending order or desc for descending order. Defaults to asc."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/chat/completions \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"chat.completion\",\n      \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n      \"model\": \"gpt-4.1-2025-04-14\",\n      \"created\": 1738960610,\n      \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n      \"tool_choice\": null,\n      \"usage\": {\n        \"total_tokens\": 31,\n        \"completion_tokens\": 18,\n        \"prompt_tokens\": 13\n      },\n      \"seed\": 4944116822809979520,\n      \"top_p\": 1.0,\n      \"temperature\": 1.0,\n      \"presence_penalty\": 0.0,\n      \"frequency_penalty\": 0.0,\n      \"system_fingerprint\": \"fp_50cad350e4\",\n      \"input_user\": null,\n      \"service_tier\": \"default\",\n      \"tools\": null,\n      \"metadata\": {},\n      \"choices\": [\n        {\n          \"index\": 0,\n          \"message\": {\n            \"content\": \"Mind of circuits hum,  \\nLearning patterns in silence—  \\nFuture's quiet spark.\",\n            \"role\": \"assistant\",\n            \"tool_calls\": null,\n            \"function_call\": null\n          },\n          \"finish_reason\": \"stop\",\n          \"logprobs\": null\n        }\n      ],\n      \"response_format\": null\n    }\n  ],\n  \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n  \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n  \"has_more\": false\n}"},{"title":"Update chat completion","method":"post","path":"https://api.openai.com/v1/chat/completions/{completion_id}","summary":"Modify a stored chat completion. Only Chat Completions that have been\ncreated with the store parameter set to true can be modified. Currently,\nthe only supported modification is to update the metadata field.","parameters":{"chat-update__table":[{"name":"metadata","type":"map","required":true,"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."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl -X POST https://api.openai.com/v1/chat/completions/chat_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"metadata\": {\"foo\": \"bar\"}}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n\n{\n  \"object\": \"chat.completion\",\n  \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n  \"model\": \"gpt-4o-2024-08-06\",\n  \"created\": 1738960610,\n  \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n  \"tool_choice\": null,\n  \"usage\": {\n    \"total_tokens\": 31,\n    \"completion_tokens\": 18,\n    \"prompt_tokens\": 13\n  },\n  \"seed\": 4944116822809979520,\n  \"top_p\": 1.0,\n  \"temperature\": 1.0,\n  \"presence_penalty\": 0.0,\n  \"frequency_penalty\": 0.0,\n  \"system_fingerprint\": \"fp_50cad350e4\",\n  \"input_user\": null,\n  \"service_tier\": \"default\",\n  \"tools\": null,\n  \"metadata\": {\n    \"foo\": \"bar\"\n  },\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"content\": \"Mind of circuits hum,  \\nLearning patterns in silence—  \\nFuture's quiet spark.\",\n        \"role\": \"assistant\",\n        \"tool_calls\": null,\n        \"function_call\": null\n      },\n      \"finish_reason\": \"stop\",\n      \"logprobs\": null\n    }\n  ],\n  \"response_format\": null\n}"},{"title":"Delete chat completion","method":"delete","path":"https://api.openai.com/v1/chat/completions/{completion_id}","summary":"Delete a stored chat completion. Only Chat Completions that have been\ncreated with the store parameter set to true can be deleted.","parameters":{"chat-delete__table":[{"name":"completion_id","type":"string","required":true,"description":"The ID of the chat completion to delete."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X DELETE https://api.openai.com/v1/chat/completions/chat_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"object\": \"chat.completion.deleted\",\n  \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n  \"deleted\": true\n}"},{"title":"The chat completion object","method":"","path":"","summary":"","parameters":{"chat/object__table":[{"name":"choices","type":"array","required":false,"description":"A list of chat completion choices. Can be more than one if n is greater than 1."},{"name":"created","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the chat completion was created."},{"name":"id","type":"string","required":false,"description":"A unique identifier for the chat completion."},{"name":"model","type":"string","required":false,"description":"The model used for the chat completion."},{"name":"object","type":"string","required":false,"description":"The object type, which is always chat.completion."},{"name":"service_tier","type":"string or null","required":false,"description":"Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service: If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'flex', the request will be processed with the Flex Processing service tier. Learn more. When not set, the default behavior is 'auto'. When this parameter is set, the response body will include the service_tier utilized."},{"name":"system_fingerprint","type":"string","required":false,"description":"This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism."},{"name":"usage","type":"object","required":false,"description":"Usage statistics for the completion request."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The chat completion list object","method":"","path":"","summary":"","parameters":{"chat/list-object__table":[{"name":"data","type":"array","required":false,"description":"An array of chat completion objects."},{"name":"first_id","type":"string","required":false,"description":"The identifier of the first chat completion in the data array."},{"name":"has_more","type":"boolean","required":false,"description":"Indicates whether there are more Chat Completions available."},{"name":"last_id","type":"string","required":false,"description":"The identifier of the last chat completion in the data array."},{"name":"object","type":"string","required":false,"description":"The type of this object. It is always set to \"list\"."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The chat completion message list object","method":"","path":"","summary":"","parameters":{"chat/message-list__table":[{"name":"data","type":"array","required":false,"description":"An array of chat completion message objects."},{"name":"first_id","type":"string","required":false,"description":"The identifier of the first chat message in the data array."},{"name":"has_more","type":"boolean","required":false,"description":"Indicates whether there are more chat messages available."},{"name":"last_id","type":"string","required":false,"description":"The identifier of the last chat message in the data array."},{"name":"object","type":"string","required":false,"description":"The type of this object. It is always set to \"list\"."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Streaming","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The chat completion chunk object","method":"","path":"","summary":"","parameters":{"chat-streaming/streaming__table":[{"name":"choices","type":"array","required":false,"description":"A list of chat completion choices. Can contain more than one elements if n is greater than 1. Can also be empty for the last chunk if you set stream_options: {\"include_usage\": true}."},{"name":"created","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp."},{"name":"id","type":"string","required":false,"description":"A unique identifier for the chat completion. Each chunk has the same ID."},{"name":"model","type":"string","required":false,"description":"The model to generate the completion."},{"name":"object","type":"string","required":false,"description":"The object type, which is always chat.completion.chunk."},{"name":"service_tier","type":"string or null","required":false,"description":"Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service: If set to 'auto', and the Project is Scale tier enabled, the system will utilize scale tier credits until they are exhausted. If set to 'auto', and the Project is not Scale tier enabled, the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarantee. If set to 'flex', the request will be processed with the Flex Processing service tier. Learn more. When not set, the default behavior is 'auto'. When this parameter is set, the response body will include the service_tier utilized."},{"name":"system_fingerprint","type":"string","required":false,"description":"This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism."},{"name":"usage","type":"object or null","required":false,"description":"Usage statistics for the completion request."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"RealtimeBeta","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Session tokens","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create session","method":"post","path":"https://api.openai.com/v1/realtime/sessions","summary":"Create an ephemeral API token for use in client-side applications with the\nRealtime API. Can be configured with the same session parameters as the\nsession.update client event.","parameters":{"realtime-sessions-create__table":[{"name":"client_secret","type":"object","required":false,"description":"Configuration options for the generated client secret."},{"name":"input_audio_format","type":"string","required":false,"default":"pcm16","description":"The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, input audio must be 16-bit PCM at a 24kHz sample rate, single channel (mono), and little-endian byte order."},{"name":"input_audio_noise_reduction","type":"object","required":false,"default":"null","description":"Configuration for input audio noise reduction. This can be set to null to turn off. Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio."},{"name":"input_audio_transcription","type":"object","required":false,"description":"Configuration for input audio transcription, defaults to off and can be set to null to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through the /audio/transcriptions endpoint and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service."},{"name":"instructions","type":"string","required":false,"description":"The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the session.created event at the start of the session."},{"name":"max_response_output_tokens","type":"integer or \"inf\"","required":false,"description":"Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or inf for the maximum available tokens for a given model. Defaults to inf."},{"name":"modalities","type":"","required":false,"description":"The set of modalities the model can respond with. To disable audio, set this to [\"text\"]."},{"name":"model","type":"string","required":false,"description":"The Realtime model used for this session."},{"name":"output_audio_format","type":"string","required":false,"default":"pcm16","description":"The format of output audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, output audio is sampled at a rate of 24kHz."},{"name":"speed","type":"number","required":false,"default":"1","description":"The speed of the model's spoken response. 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress."},{"name":"temperature","type":"number","required":false,"default":"0.8","description":"Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance."},{"name":"tool_choice","type":"string","required":false,"default":"auto","description":"How the model chooses tools. Options are auto, none, required, or specify a function."},{"name":"tools","type":"array","required":false,"description":"Tools (functions) available to the model."},{"name":"tracing","type":"\"auto\" or object","required":false,"description":"Configuration options for tracing. Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified. auto will create a trace for the session with default values for the workflow name, group id, and metadata."},{"name":"turn_detection","type":"object","required":false,"description":"Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to null to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjuction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with \"uhhm\", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency."},{"name":"voice","type":"string","required":false,"description":"The voice the model uses to respond. Voice cannot be changed during the session once the model has responded with audio at least once. Current voice options are alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, and verse."}]},"returns":"object","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n\ncurl -X POST https://api.openai.com/v1/realtime/sessions \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gpt-4o-realtime-preview\",\n    \"modalities\": [\"audio\", \"text\"],\n    \"instructions\": \"You are a friendly assistant.\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n\n{\n  \"id\": \"sess_001\",\n  \"object\": \"realtime.session\",\n  \"model\": \"gpt-4o-realtime-preview\",\n  \"modalities\": [\"audio\", \"text\"],\n  \"instructions\": \"You are a friendly assistant.\",\n  \"voice\": \"alloy\",\n  \"input_audio_format\": \"pcm16\",\n  \"output_audio_format\": \"pcm16\",\n  \"input_audio_transcription\": {\n      \"model\": \"whisper-1\"\n  },\n  \"turn_detection\": null,\n  \"tools\": [],\n  \"tool_choice\": \"none\",\n  \"temperature\": 0.7,\n  \"max_response_output_tokens\": 200,\n  \"speed\": 1.1,\n  \"tracing\": \"auto\",\n  \"client_secret\": {\n    \"value\": \"ek_abc123\", \n    \"expires_at\": 1234567890\n  }\n}"},{"title":"Create transcription session","method":"post","path":"https://api.openai.com/v1/realtime/transcription_sessions","summary":"Create an ephemeral API token for use in client-side applications with the\nRealtime API specifically for realtime transcriptions.\nCan be configured with the same session parameters as the transcription_session.update client event.","parameters":{"realtime-sessions-create-transcription__table":[{"name":"client_secret","type":"object","required":false,"description":"Configuration options for the generated client secret."},{"name":"include","type":"array","required":false,"description":"The set of items to include in the transcription. Current available items are: null."},{"name":"input_audio_format","type":"string","required":false,"default":"pcm16","description":"The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, input audio must be 16-bit PCM at a 24kHz sample rate, single channel (mono), and little-endian byte order."},{"name":"input_audio_noise_reduction","type":"object","required":false,"default":"null","description":"Configuration for input audio noise reduction. This can be set to null to turn off. Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio."},{"name":"input_audio_transcription","type":"object","required":false,"description":"Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service."},{"name":"modalities","type":"","required":false,"description":"The set of modalities the model can respond with. To disable audio, set this to [\"text\"]."},{"name":"turn_detection","type":"object","required":false,"description":"Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to null to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjuction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with \"uhhm\", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency."}]},"returns":"object","exampleRequest":"1\n2\n3\n4\n\ncurl -X POST https://api.openai.com/v1/realtime/transcription_sessions \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n\n{\n  \"id\": \"sess_BBwZc7cFV3XizEyKGDCGL\",\n  \"object\": \"realtime.transcription_session\",\n  \"modalities\": [\"audio\", \"text\"],\n  \"turn_detection\": {\n    \"type\": \"server_vad\",\n    \"threshold\": 0.5,\n    \"prefix_padding_ms\": 300,\n    \"silence_duration_ms\": 200\n  },\n  \"input_audio_format\": \"pcm16\",\n  \"input_audio_transcription\": {\n    \"model\": \"gpt-4o-transcribe\",\n    \"language\": null,\n    \"prompt\": \"\"\n  },\n  \"client_secret\": null\n}"},{"title":"The session object","method":"","path":"","summary":"","parameters":{"realtime-sessions/session_object__table":[{"name":"client_secret","type":"object","required":false,"description":"Ephemeral key returned by the API."},{"name":"input_audio_format","type":"string","required":false,"description":"The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw."},{"name":"input_audio_transcription","type":"object","required":false,"description":"Configuration for input audio transcription, defaults to off and can be set to null to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through Whisper and should be treated as rough guidance rather than the representation understood by the model."},{"name":"instructions","type":"string","required":false,"description":"The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. \"be extremely succinct\", \"act friendly\", \"here are examples of good responses\") and on audio behavior (e.g. \"talk quickly\", \"inject emotion into your voice\", \"laugh frequently\"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the session.created event at the start of the session."},{"name":"max_response_output_tokens","type":"integer or \"inf\"","required":false,"description":"Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or inf for the maximum available tokens for a given model. Defaults to inf."},{"name":"modalities","type":"","required":false,"description":"The set of modalities the model can respond with. To disable audio, set this to [\"text\"]."},{"name":"output_audio_format","type":"string","required":false,"description":"The format of output audio. Options are pcm16, g711_ulaw, or g711_alaw."},{"name":"speed","type":"number","required":false,"description":"The speed of the model's spoken response. 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress."},{"name":"temperature","type":"number","required":false,"description":"Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8."},{"name":"tool_choice","type":"string","required":false,"description":"How the model chooses tools. Options are auto, none, required, or specify a function."},{"name":"tools","type":"array","required":false,"description":"Tools (functions) available to the model."},{"name":"tracing","type":"\"auto\" or object","required":false,"description":"Configuration options for tracing. Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified. auto will create a trace for the session with default values for the workflow name, group id, and metadata."},{"name":"turn_detection","type":"object","required":false,"description":"Configuration for turn detection. Can be set to null to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech."},{"name":"voice","type":"string","required":false,"description":"The voice the model uses to respond. Voice cannot be changed during the session once the model has responded with audio at least once. Current voice options are alloy, ash, ballad, coral, echo sage, shimmer and verse."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The transcription session object","method":"","path":"","summary":"","parameters":{"realtime-sessions/transcription_session_object__table":[{"name":"client_secret","type":"object","required":false,"description":"Ephemeral key returned by the API. Only present when the session is created on the server via REST API."},{"name":"input_audio_format","type":"string","required":false,"description":"The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw."},{"name":"input_audio_transcription","type":"object","required":false,"description":"Configuration of the transcription model."},{"name":"modalities","type":"","required":false,"description":"The set of modalities the model can respond with. To disable audio, set this to [\"text\"]."},{"name":"turn_detection","type":"object","required":false,"description":"Configuration for turn detection. Can be set to null to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Client events","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"session.update","method":"","path":"","summary":"","parameters":{"realtime-client-events/session/update__table":[{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"session","type":"object","required":false,"description":"Realtime session object configuration."},{"name":"type","type":"string","required":false,"description":"The event type, must be session.update."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"input_audio_buffer.append","method":"","path":"","summary":"","parameters":{"realtime-client-events/input_audio_buffer/append__table":[{"name":"audio","type":"string","required":false,"description":"Base64-encoded audio bytes. This must be in the format specified by the input_audio_format field in the session configuration."},{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"type","type":"string","required":false,"description":"The event type, must be input_audio_buffer.append."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"input_audio_buffer.commit","method":"","path":"","summary":"","parameters":{"realtime-client-events/input_audio_buffer/commit__table":[{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"type","type":"string","required":false,"description":"The event type, must be input_audio_buffer.commit."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"input_audio_buffer.clear","method":"","path":"","summary":"","parameters":{"realtime-client-events/input_audio_buffer/clear__table":[{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"type","type":"string","required":false,"description":"The event type, must be input_audio_buffer.clear."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.create","method":"","path":"","summary":"","parameters":{"realtime-client-events/conversation/item/create__table":[{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"item","type":"object","required":false,"description":"The item to add to the conversation."},{"name":"previous_item_id","type":"string","required":false,"description":"The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set to root, the new item will be added to the beginning of the conversation. If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.create."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.retrieve","method":"","path":"","summary":"","parameters":{"realtime-client-events/conversation/item/retrieve__table":[{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item to retrieve."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.retrieve."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.truncate","method":"","path":"","summary":"","parameters":{"realtime-client-events/conversation/item/truncate__table":[{"name":"audio_end_ms","type":"integer","required":false,"description":"Inclusive duration up to which audio is truncated, in milliseconds. If the audio_end_ms is greater than the actual audio duration, the server will respond with an error."},{"name":"content_index","type":"integer","required":false,"description":"The index of the content part to truncate. Set this to 0."},{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the assistant message item to truncate. Only assistant message items can be truncated."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.truncate."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.delete","method":"","path":"","summary":"","parameters":{"realtime-client-events/conversation/item/delete__table":[{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item to delete."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.delete."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"response.create","method":"","path":"","summary":"","parameters":{"realtime-client-events/response/create__table":[{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"response","type":"object","required":false,"description":"Create a new Realtime response with these parameters"},{"name":"type","type":"string","required":false,"description":"The event type, must be response.create."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n\n{\n    \"event_id\": \"event_234\",\n    \"type\": \"response.create\",\n    \"response\": {\n        \"modalities\": [\"text\", \"audio\"],\n        \"instructions\": \"Please assist the user.\",\n        \"voice\": \"sage\",\n        \"output_audio_format\": \"pcm16\",\n        \"tools\": [\n            {\n                \"type\": \"function\",\n                \"name\": \"calculate_sum\",\n                \"description\": \"Calculates the sum of two numbers.\",\n                \"parameters\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"a\": { \"type\": \"number\" },\n                        \"b\": { \"type\": \"number\" }\n                    },\n                    \"required\": [\"a\", \"b\"]\n                }\n            }\n        ],\n        \"tool_choice\": \"auto\",\n        \"temperature\": 0.8,\n        \"max_output_tokens\": 1024\n    }\n}"},{"title":"response.cancel","method":"","path":"","summary":"","parameters":{"realtime-client-events/response/cancel__table":[{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"response_id","type":"string","required":false,"description":"A specific response ID to cancel - if not provided, will cancel an in-progress response in the default conversation."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.cancel."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n\n{\n    \"event_id\": \"event_567\",\n    \"type\": \"response.cancel\"\n}"},{"title":"transcription_session.update","method":"","path":"","summary":"","parameters":{"realtime-client-events/transcription_session/update__table":[{"name":"event_id","type":"string","required":false,"description":"Optional client-generated ID used to identify this event."},{"name":"session","type":"object","required":false,"description":"Realtime transcription session object configuration."},{"name":"type","type":"string","required":false,"description":"The event type, must be transcription_session.update."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"output_audio_buffer.clear","method":"","path":"","summary":"","parameters":{"realtime-client-events/output_audio_buffer/clear__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the client event used for error handling."},{"name":"type","type":"string","required":false,"description":"The event type, must be output_audio_buffer.clear."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Server events","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"error","method":"","path":"","summary":"","parameters":{"realtime-server-events/error__table":[{"name":"error","type":"object","required":false,"description":"Details of the error."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"type","type":"string","required":false,"description":"The event type, must be error."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"session.created","method":"","path":"","summary":"","parameters":{"realtime-server-events/session/created__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"session","type":"object","required":false,"description":"Realtime session object configuration."},{"name":"type","type":"string","required":false,"description":"The event type, must be session.created."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"session.updated","method":"","path":"","summary":"","parameters":{"realtime-server-events/session/updated__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"session","type":"object","required":false,"description":"Realtime session object configuration."},{"name":"type","type":"string","required":false,"description":"The event type, must be session.updated."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.created","method":"","path":"","summary":"","parameters":{"realtime-server-events/conversation/created__table":[{"name":"conversation","type":"object","required":false,"description":"The conversation resource."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.created."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.created","method":"","path":"","summary":"","parameters":{"realtime-server-events/conversation/item/created__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item","type":"object","required":false,"description":"The item to add to the conversation."},{"name":"previous_item_id","type":"string","required":false,"description":"The ID of the preceding item in the Conversation context, allows the client to understand the order of the conversation."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.created."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.retrieved","method":"","path":"","summary":"","parameters":{"realtime-server-events/conversation/item/retrieved__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item","type":"object","required":false,"description":"The item to add to the conversation."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.retrieved."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.input_audio_transcription.completed","method":"","path":"","summary":"","parameters":{"realtime-server-events/conversation/item/input_audio_transcription/completed__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part containing the audio."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the user message item containing the audio."},{"name":"logprobs","type":"array or null","required":false,"description":"The log probabilities of the transcription."},{"name":"transcript","type":"string","required":false,"description":"The transcribed text."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.input_audio_transcription.completed."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.input_audio_transcription.delta","method":"","path":"","summary":"","parameters":{"realtime-server-events/conversation/item/input_audio_transcription/delta__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part in the item's content array."},{"name":"delta","type":"string","required":false,"description":"The text delta."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item."},{"name":"logprobs","type":"array or null","required":false,"description":"The log probabilities of the transcription."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.input_audio_transcription.delta."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.input_audio_transcription.failed","method":"","path":"","summary":"","parameters":{"realtime-server-events/conversation/item/input_audio_transcription/failed__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part containing the audio."},{"name":"error","type":"object","required":false,"description":"Details of the transcription error."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the user message item."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.input_audio_transcription.failed."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.truncated","method":"","path":"","summary":"","parameters":{"realtime-server-events/conversation/item/truncated__table":[{"name":"audio_end_ms","type":"integer","required":false,"description":"The duration up to which the audio was truncated, in milliseconds."},{"name":"content_index","type":"integer","required":false,"description":"The index of the content part that was truncated."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the assistant message item that was truncated."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.truncated."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"conversation.item.deleted","method":"","path":"","summary":"","parameters":{"realtime-server-events/conversation/item/deleted__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item that was deleted."},{"name":"type","type":"string","required":false,"description":"The event type, must be conversation.item.deleted."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"input_audio_buffer.committed","method":"","path":"","summary":"","parameters":{"realtime-server-events/input_audio_buffer/committed__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the user message item that will be created."},{"name":"previous_item_id","type":"string","required":false,"description":"The ID of the preceding item after which the new item will be inserted."},{"name":"type","type":"string","required":false,"description":"The event type, must be input_audio_buffer.committed."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"input_audio_buffer.cleared","method":"","path":"","summary":"","parameters":{"realtime-server-events/input_audio_buffer/cleared__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"type","type":"string","required":false,"description":"The event type, must be input_audio_buffer.cleared."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"input_audio_buffer.speech_started","method":"","path":"","summary":"","parameters":{"realtime-server-events/input_audio_buffer/speech_started__table":[{"name":"audio_start_ms","type":"integer","required":false,"description":"Milliseconds from the start of all audio written to the buffer during the session when speech was first detected. This will correspond to the beginning of audio sent to the model, and thus includes the prefix_padding_ms configured in the Session."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the user message item that will be created when speech stops."},{"name":"type","type":"string","required":false,"description":"The event type, must be input_audio_buffer.speech_started."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"input_audio_buffer.speech_stopped","method":"","path":"","summary":"","parameters":{"realtime-server-events/input_audio_buffer/speech_stopped__table":[{"name":"audio_end_ms","type":"integer","required":false,"description":"Milliseconds since the session started when speech stopped. This will correspond to the end of audio sent to the model, and thus includes the min_silence_duration_ms configured in the Session."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the user message item that will be created."},{"name":"type","type":"string","required":false,"description":"The event type, must be input_audio_buffer.speech_stopped."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"response.created","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/created__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"response","type":"object","required":false,"description":"The response resource."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.created."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n    \"event_id\": \"event_2930\",\n    \"type\": \"response.created\",\n    \"response\": {\n        \"id\": \"resp_001\",\n        \"object\": \"realtime.response\",\n        \"status\": \"in_progress\",\n        \"status_details\": null,\n        \"output\": [],\n        \"usage\": null\n    }\n}"},{"title":"response.done","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/done__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"response","type":"object","required":false,"description":"The response resource."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n\n{\n    \"event_id\": \"event_3132\",\n    \"type\": \"response.done\",\n    \"response\": {\n        \"id\": \"resp_001\",\n        \"object\": \"realtime.response\",\n        \"status\": \"completed\",\n        \"status_details\": null,\n        \"output\": [\n            {\n                \"id\": \"msg_006\",\n                \"object\": \"realtime.item\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"role\": \"assistant\",\n                \"content\": [\n                    {\n                        \"type\": \"text\",\n                        \"text\": \"Sure, how can I assist you today?\"\n                    }\n                ]\n            }\n        ],\n        \"usage\": {\n            \"total_tokens\":275,\n            \"input_tokens\":127,\n            \"output_tokens\":148,\n            \"input_token_details\": {\n                \"cached_tokens\":384,\n                \"text_tokens\":119,\n                \"audio_tokens\":8,\n                \"cached_tokens_details\": {\n                    \"text_tokens\": 128,\n                    \"audio_tokens\": 256\n                }\n            },\n            \"output_token_details\": {\n              \"text_tokens\":36,\n              \"audio_tokens\":112\n            }\n        }\n    }\n}"},{"title":"response.output_item.added","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/output_item/added__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item","type":"object","required":false,"description":"The item to add to the conversation."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the Response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the Response to which the item belongs."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.output_item.added."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n{\n    \"event_id\": \"event_3334\",\n    \"type\": \"response.output_item.added\",\n    \"response_id\": \"resp_001\",\n    \"output_index\": 0,\n    \"item\": {\n        \"id\": \"msg_007\",\n        \"object\": \"realtime.item\",\n        \"type\": \"message\",\n        \"status\": \"in_progress\",\n        \"role\": \"assistant\",\n        \"content\": []\n    }\n}"},{"title":"response.output_item.done","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/output_item/done__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item","type":"object","required":false,"description":"The item to add to the conversation."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the Response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the Response to which the item belongs."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.output_item.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n\n{\n    \"event_id\": \"event_3536\",\n    \"type\": \"response.output_item.done\",\n    \"response_id\": \"resp_001\",\n    \"output_index\": 0,\n    \"item\": {\n        \"id\": \"msg_007\",\n        \"object\": \"realtime.item\",\n        \"type\": \"message\",\n        \"status\": \"completed\",\n        \"role\": \"assistant\",\n        \"content\": [\n            {\n                \"type\": \"text\",\n                \"text\": \"Sure, I can help with that.\"\n            }\n        ]\n    }\n}"},{"title":"response.content_part.added","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/content_part/added__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part in the item's content array."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item to which the content part was added."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"part","type":"object","required":false,"description":"The content part that was added."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.content_part.added."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n    \"event_id\": \"event_3738\",\n    \"type\": \"response.content_part.added\",\n    \"response_id\": \"resp_001\",\n    \"item_id\": \"msg_007\",\n    \"output_index\": 0,\n    \"content_index\": 0,\n    \"part\": {\n        \"type\": \"text\",\n        \"text\": \"\"\n    }\n}"},{"title":"response.content_part.done","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/content_part/done__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part in the item's content array."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"part","type":"object","required":false,"description":"The content part that is done."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.content_part.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n    \"event_id\": \"event_3940\",\n    \"type\": \"response.content_part.done\",\n    \"response_id\": \"resp_001\",\n    \"item_id\": \"msg_007\",\n    \"output_index\": 0,\n    \"content_index\": 0,\n    \"part\": {\n        \"type\": \"text\",\n        \"text\": \"Sure, I can help with that.\"\n    }\n}"},{"title":"response.text.delta","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/text/delta__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part in the item's content array."},{"name":"delta","type":"string","required":false,"description":"The text delta."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.text.delta."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n    \"event_id\": \"event_4142\",\n    \"type\": \"response.text.delta\",\n    \"response_id\": \"resp_001\",\n    \"item_id\": \"msg_007\",\n    \"output_index\": 0,\n    \"content_index\": 0,\n    \"delta\": \"Sure, I can h\"\n}"},{"title":"response.text.done","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/text/done__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part in the item's content array."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"text","type":"string","required":false,"description":"The final text content."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.text.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n    \"event_id\": \"event_4344\",\n    \"type\": \"response.text.done\",\n    \"response_id\": \"resp_001\",\n    \"item_id\": \"msg_007\",\n    \"output_index\": 0,\n    \"content_index\": 0,\n    \"text\": \"Sure, I can help with that.\"\n}"},{"title":"response.audio_transcript.delta","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/audio_transcript/delta__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part in the item's content array."},{"name":"delta","type":"string","required":false,"description":"The transcript delta."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.audio_transcript.delta."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n    \"event_id\": \"event_4546\",\n    \"type\": \"response.audio_transcript.delta\",\n    \"response_id\": \"resp_001\",\n    \"item_id\": \"msg_008\",\n    \"output_index\": 0,\n    \"content_index\": 0,\n    \"delta\": \"Hello, how can I a\"\n}"},{"title":"response.audio_transcript.done","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/audio_transcript/done__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part in the item's content array."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"transcript","type":"string","required":false,"description":"The final transcript of the audio."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.audio_transcript.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n    \"event_id\": \"event_4748\",\n    \"type\": \"response.audio_transcript.done\",\n    \"response_id\": \"resp_001\",\n    \"item_id\": \"msg_008\",\n    \"output_index\": 0,\n    \"content_index\": 0,\n    \"transcript\": \"Hello, how can I assist you today?\"\n}"},{"title":"response.audio.delta","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/audio/delta__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part in the item's content array."},{"name":"delta","type":"string","required":false,"description":"Base64-encoded audio data delta."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.audio.delta."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n    \"event_id\": \"event_4950\",\n    \"type\": \"response.audio.delta\",\n    \"response_id\": \"resp_001\",\n    \"item_id\": \"msg_008\",\n    \"output_index\": 0,\n    \"content_index\": 0,\n    \"delta\": \"Base64EncodedAudioDelta\"\n}"},{"title":"response.audio.done","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/audio/done__table":[{"name":"content_index","type":"integer","required":false,"description":"The index of the content part in the item's content array."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.audio.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n    \"event_id\": \"event_5152\",\n    \"type\": \"response.audio.done\",\n    \"response_id\": \"resp_001\",\n    \"item_id\": \"msg_008\",\n    \"output_index\": 0,\n    \"content_index\": 0\n}"},{"title":"response.function_call_arguments.delta","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/function_call_arguments/delta__table":[{"name":"call_id","type":"string","required":false,"description":"The ID of the function call."},{"name":"delta","type":"string","required":false,"description":"The arguments delta as a JSON string."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the function call item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.function_call_arguments.delta."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n    \"event_id\": \"event_5354\",\n    \"type\": \"response.function_call_arguments.delta\",\n    \"response_id\": \"resp_002\",\n    \"item_id\": \"fc_001\",\n    \"output_index\": 0,\n    \"call_id\": \"call_001\",\n    \"delta\": \"{\\\"location\\\": \\\"San\\\"\"\n}"},{"title":"response.function_call_arguments.done","method":"","path":"","summary":"","parameters":{"realtime-server-events/response/function_call_arguments/done__table":[{"name":"arguments","type":"string","required":false,"description":"The final arguments as a JSON string."},{"name":"call_id","type":"string","required":false,"description":"The ID of the function call."},{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"item_id","type":"string","required":false,"description":"The ID of the function call item."},{"name":"output_index","type":"integer","required":false,"description":"The index of the output item in the response."},{"name":"response_id","type":"string","required":false,"description":"The ID of the response."},{"name":"type","type":"string","required":false,"description":"The event type, must be response.function_call_arguments.done."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n    \"event_id\": \"event_5556\",\n    \"type\": \"response.function_call_arguments.done\",\n    \"response_id\": \"resp_002\",\n    \"item_id\": \"fc_001\",\n    \"output_index\": 0,\n    \"call_id\": \"call_001\",\n    \"arguments\": \"{\\\"location\\\": \\\"San Francisco\\\"}\"\n}"},{"title":"transcription_session.updated","method":"","path":"","summary":"","parameters":{"realtime-server-events/transcription_session/updated__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"session","type":"object","required":false,"description":"A new Realtime transcription session configuration. When a session is created on the server via REST API, the session object also contains an ephemeral key. Default TTL for keys is 10 minutes. This property is not present when a session is updated via the WebSocket API."},{"name":"type","type":"string","required":false,"description":"The event type, must be transcription_session.updated."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"rate_limits.updated","method":"","path":"","summary":"","parameters":{"realtime-server-events/rate_limits/updated__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"rate_limits","type":"array","required":false,"description":"List of rate limit information."},{"name":"type","type":"string","required":false,"description":"The event type, must be rate_limits.updated."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"output_audio_buffer.started","method":"","path":"","summary":"","parameters":{"realtime-server-events/output_audio_buffer/started__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"response_id","type":"string","required":false,"description":"The unique ID of the response that produced the audio."},{"name":"type","type":"string","required":false,"description":"The event type, must be output_audio_buffer.started."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"output_audio_buffer.stopped","method":"","path":"","summary":"","parameters":{"realtime-server-events/output_audio_buffer/stopped__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"response_id","type":"string","required":false,"description":"The unique ID of the response that produced the audio."},{"name":"type","type":"string","required":false,"description":"The event type, must be output_audio_buffer.stopped."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"output_audio_buffer.cleared","method":"","path":"","summary":"","parameters":{"realtime-server-events/output_audio_buffer/cleared__table":[{"name":"event_id","type":"string","required":false,"description":"The unique ID of the server event."},{"name":"response_id","type":"string","required":false,"description":"The unique ID of the response that produced the audio."},{"name":"type","type":"string","required":false,"description":"The event type, must be output_audio_buffer.cleared."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Audio","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create speech","method":"post","path":"https://api.openai.com/v1/audio/speech","summary":"Generates audio from the input text.","parameters":{"audio-createspeech__table":[{"name":"input","type":"string","required":true,"description":"The text to generate audio for. The maximum length is 4096 characters."},{"name":"model","type":"string","required":true,"description":"One of the available TTS models: tts-1, tts-1-hd or gpt-4o-mini-tts."},{"name":"voice","type":"string","required":true,"description":"The voice to use when generating the audio. Supported voices are alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, and verse. Previews of the voices are available in the Text to speech guide."},{"name":"instructions","type":"string","required":false,"description":"Control the voice of your generated audio with additional instructions. Does not work with tts-1 or tts-1-hd."},{"name":"response_format","type":"string","required":false,"default":"mp3","description":"The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm."},{"name":"speed","type":"number","required":false,"default":"1","description":"The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default."},{"name":"stream_format","type":"string","required":false,"default":"audio","description":"The format to stream the audio in. Supported formats are sse and audio. sse is not supported for tts-1 or tts-1-hd."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\ncurl https://api.openai.com/v1/audio/speech \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gpt-4o-mini-tts\",\n    \"input\": \"The quick brown fox jumped over the lazy dog.\",\n    \"voice\": \"alloy\"\n  }' \\\n  --output speech.mp3","exampleResponse":""},{"title":"Create transcription","method":"post","path":"https://api.openai.com/v1/audio/transcriptions","summary":"Transcribes audio into the input language.","parameters":{"audio-createtranscription__table":[{"name":"file","type":"file","required":true,"description":"The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm."},{"name":"model","type":"string","required":true,"description":"ID of the model to use. The options are gpt-4o-transcribe, gpt-4o-mini-transcribe, and whisper-1 (which is powered by our open source Whisper V2 model)."},{"name":"chunking_strategy","type":"\"auto\" or object","required":false,"description":"Controls how the audio is cut into chunks. When set to \"auto\", the server first normalizes loudness and then uses voice activity detection (VAD) to choose boundaries. server_vad object can be provided to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block."},{"name":"include[]","type":"array","required":false,"description":"Additional information to include in the transcription response. logprobs will return the log probabilities of the tokens in the response to understand the model's confidence in the transcription. logprobs only works with response_format set to json and only with the models gpt-4o-transcribe and gpt-4o-mini-transcribe."},{"name":"language","type":"string","required":false,"description":"The language of the input audio. Supplying the input language in ISO-639-1 (e.g. en) format will improve accuracy and latency."},{"name":"prompt","type":"string","required":false,"description":"An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language."},{"name":"response_format","type":"string","required":false,"default":"json","description":"The format of the output, in one of these options: json, text, srt, verbose_json, or vtt. For gpt-4o-transcribe and gpt-4o-mini-transcribe, the only supported format is json."},{"name":"stream","type":"boolean or null","required":false,"default":"false","description":"If set to true, the model response data will be streamed to the client as it is generated using server-sent events. See the Streaming section of the Speech-to-Text guide for more information. Note: Streaming is not supported for the whisper-1 model and will be ignored."},{"name":"temperature","type":"number","required":false,"default":"0","description":"The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit."},{"name":"timestamp_granularities[]","type":"array","required":false,"default":"segment","description":"The timestamp granularities to populate for this transcription. response_format must be set verbose_json to use timestamp granularities. Either or both of these options are supported: word, or segment. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency."}]},"returns":"file","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/audio/transcriptions \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: multipart/form-data\" \\\n  -F file=\"@/path/to/file/audio.mp3\" \\\n  -F model=\"gpt-4o-transcribe\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n\n{\n  \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\",\n  \"usage\": {\n    \"type\": \"tokens\",\n    \"input_tokens\": 14,\n    \"input_token_details\": {\n      \"text_tokens\": 0,\n      \"audio_tokens\": 14\n    },\n    \"output_tokens\": 45,\n    \"total_tokens\": 59\n  }\n}"},{"title":"Create translation","method":"post","path":"https://api.openai.com/v1/audio/translations","summary":"Translates audio into English.","parameters":{"audio-createtranslation__table":[{"name":"file","type":"file","required":true,"description":"The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm."},{"name":"model","type":"string or \"whisper-1\"","required":true,"description":"ID of the model to use. Only whisper-1 (which is powered by our open source Whisper V2 model) is currently available."},{"name":"prompt","type":"string","required":false,"description":"An optional text to guide the model's style or continue a previous audio segment. The prompt should be in English."},{"name":"response_format","type":"string","required":false,"default":"json","description":"The format of the output, in one of these options: json, text, srt, verbose_json, or vtt."},{"name":"temperature","type":"number","required":false,"default":"0","description":"The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit."}]},"returns":"file","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/audio/translations \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: multipart/form-data\" \\\n  -F file=\"@/path/to/file/german.m4a\" \\\n  -F model=\"whisper-1\"","exampleResponse":"1\n2\n3\n\n{\n  \"text\": \"Hello, my name is Wolfgang and I come from Germany. Where are you heading today?\"\n}"},{"title":"The transcription object (JSON)","method":"","path":"","summary":"","parameters":{"audio/json-object__table":[{"name":"logprobs","type":"array","required":false,"description":"The log probabilities of the tokens in the transcription. Only returned with the models gpt-4o-transcribe and gpt-4o-mini-transcribe if logprobs is added to the include array."},{"name":"text","type":"string","required":false,"description":"The transcribed text."},{"name":"usage","type":"object","required":false,"description":"Token usage statistics for the request."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The transcription object (Verbose JSON)","method":"","path":"","summary":"","parameters":{"audio/verbose-json-object__table":[{"name":"duration","type":"number","required":false,"description":"The duration of the input audio."},{"name":"language","type":"string","required":false,"description":"The language of the input audio."},{"name":"segments","type":"array","required":false,"description":"Segments of the transcribed text and their corresponding details."},{"name":"text","type":"string","required":false,"description":"The transcribed text."},{"name":"usage","type":"object","required":false,"description":"Usage statistics for models billed by audio input duration."},{"name":"words","type":"array","required":false,"description":"Extracted words and their corresponding timestamps."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Stream Event (speech.audio.delta)","method":"","path":"","summary":"","parameters":{"audio/speech-audio-delta-event__table":[{"name":"audio","type":"string","required":false,"description":"A chunk of Base64-encoded audio data."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always speech.audio.delta."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Stream Event (speech.audio.done)","method":"","path":"","summary":"","parameters":{"audio/speech-audio-done-event__table":[{"name":"type","type":"string","required":false,"description":"The type of the event. Always speech.audio.done."},{"name":"usage","type":"object","required":false,"description":"Token usage statistics for the request."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Stream Event (transcript.text.delta)","method":"","path":"","summary":"","parameters":{"audio/transcript-text-delta-event__table":[{"name":"delta","type":"string","required":false,"description":"The text delta that was additionally transcribed."},{"name":"logprobs","type":"array","required":false,"description":"The log probabilities of the delta. Only included if you create a transcription with the include[] parameter set to logprobs."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always transcript.text.delta."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Stream Event (transcript.text.done)","method":"","path":"","summary":"","parameters":{"audio/transcript-text-done-event__table":[{"name":"logprobs","type":"array","required":false,"description":"The log probabilities of the individual tokens in the transcription. Only included if you create a transcription with the include[] parameter set to logprobs."},{"name":"text","type":"string","required":false,"description":"The text that was transcribed."},{"name":"type","type":"string","required":false,"description":"The type of the event. Always transcript.text.done."},{"name":"usage","type":"object","required":false,"description":"Usage statistics for models billed by token usage."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Images","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create image","method":"post","path":"https://api.openai.com/v1/images/generations","summary":"Creates an image given a prompt. Learn more.","parameters":{"images-create__table":[{"name":"prompt","type":"string","required":true,"description":"A text description of the desired image(s). The maximum length is 32000 characters for gpt-image-1, 1000 characters for dall-e-2 and 4000 characters for dall-e-3."},{"name":"background","type":"string or null","required":false,"default":"auto","description":"Allows to set transparency for the background of the generated image(s). This parameter is only supported for gpt-image-1. Must be one of transparent, opaque or auto (default value). When auto is used, the model will automatically determine the best background for the image. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp."},{"name":"model","type":"string","required":false,"default":"dall-e-2","description":"The model to use for image generation. One of dall-e-2, dall-e-3, or gpt-image-1. Defaults to dall-e-2 unless a parameter specific to gpt-image-1 is used."},{"name":"moderation","type":"string or null","required":false,"default":"auto","description":"Control the content-moderation level for images generated by gpt-image-1. Must be either low for less restrictive filtering or auto (default value)."},{"name":"n","type":"integer or null","required":false,"default":"1","description":"The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported."},{"name":"output_compression","type":"integer or null","required":false,"default":"100","description":"The compression level (0-100%) for the generated images. This parameter is only supported for gpt-image-1 with the webp or jpeg output formats, and defaults to 100."},{"name":"output_format","type":"string or null","required":false,"default":"png","description":"The format in which the generated images are returned. This parameter is only supported for gpt-image-1. Must be one of png, jpeg, or webp."},{"name":"quality","type":"string or null","required":false,"default":"auto","description":"The quality of the image that will be generated. auto (default value) will automatically select the best quality for the given model. high, medium and low are supported for gpt-image-1. hd and standard are supported for dall-e-3. standard is the only option for dall-e-2."},{"name":"response_format","type":"string or null","required":false,"default":"url","description":"The format in which generated images with dall-e-2 and dall-e-3 are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for gpt-image-1 which will always return base64-encoded images."},{"name":"size","type":"string or null","required":false,"default":"auto","description":"The size of the generated images. Must be one of 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default value) for gpt-image-1, one of 256x256, 512x512, or 1024x1024 for dall-e-2, and one of 1024x1024, 1792x1024, or 1024x1792 for dall-e-3."},{"name":"style","type":"string or null","required":false,"default":"vivid","description":"The style of the generated images. This parameter is only supported for dall-e-3. Must be one of vivid or natural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images."},{"name":"user","type":"string","required":false,"description":"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\ncurl https://api.openai.com/v1/images/generations \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"model\": \"gpt-image-1\",\n    \"prompt\": \"A cute baby sea otter\",\n    \"n\": 1,\n    \"size\": \"1024x1024\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n\n{\n  \"created\": 1713833628,\n  \"data\": [\n    {\n      \"b64_json\": \"...\"\n    }\n  ],\n  \"usage\": {\n    \"total_tokens\": 100,\n    \"input_tokens\": 50,\n    \"output_tokens\": 50,\n    \"input_tokens_details\": {\n      \"text_tokens\": 10,\n      \"image_tokens\": 40\n    }\n  }\n}"},{"title":"Create image edit","method":"post","path":"https://api.openai.com/v1/images/edits","summary":"Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports gpt-image-1 and dall-e-2.","parameters":{"images-createedit__table":[{"name":"image","type":"string or array","required":true,"description":"The image(s) to edit. Must be a supported image file or an array of images. For gpt-image-1, each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images. For dall-e-2, you can only provide one image, and it should be a square png file less than 4MB."},{"name":"prompt","type":"string","required":true,"description":"A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2, and 32000 characters for gpt-image-1."},{"name":"background","type":"string or null","required":false,"default":"auto","description":"Allows to set transparency for the background of the generated image(s). This parameter is only supported for gpt-image-1. Must be one of transparent, opaque or auto (default value). When auto is used, the model will automatically determine the best background for the image. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp."},{"name":"mask","type":"file","required":false,"description":"An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image."},{"name":"model","type":"string","required":false,"default":"dall-e-2","description":"The model to use for image generation. Only dall-e-2 and gpt-image-1 are supported. Defaults to dall-e-2 unless a parameter specific to gpt-image-1 is used."},{"name":"n","type":"integer or null","required":false,"default":"1","description":"The number of images to generate. Must be between 1 and 10."},{"name":"output_compression","type":"integer or null","required":false,"default":"100","description":"The compression level (0-100%) for the generated images. This parameter is only supported for gpt-image-1 with the webp or jpeg output formats, and defaults to 100."},{"name":"output_format","type":"string or null","required":false,"default":"png","description":"The format in which the generated images are returned. This parameter is only supported for gpt-image-1. Must be one of png, jpeg, or webp. The default value is png."},{"name":"quality","type":"string or null","required":false,"default":"auto","description":"The quality of the image that will be generated. high, medium and low are only supported for gpt-image-1. dall-e-2 only supports standard quality. Defaults to auto."},{"name":"response_format","type":"string or null","required":false,"default":"url","description":"The format in which the generated images are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for dall-e-2, as gpt-image-1 will always return base64-encoded images."},{"name":"size","type":"string or null","required":false,"default":"1024x1024","description":"The size of the generated images. Must be one of 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default value) for gpt-image-1, and one of 256x256, 512x512, or 1024x1024 for dall-e-2."},{"name":"user","type":"string","required":false,"description":"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more."}]},"returns":"string or array","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\ncurl -s -D >(grep -i x-request-id >&2) \\\n  -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) \\\n  -X POST \"https://api.openai.com/v1/images/edits\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -F \"model=gpt-image-1\" \\\n  -F \"image[]=@body-lotion.png\" \\\n  -F \"image[]=@bath-bomb.png\" \\\n  -F \"image[]=@incense-kit.png\" \\\n  -F \"image[]=@soap.png\" \\\n  -F 'prompt=Create a lovely gift basket with these four items in it'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n\n{\n  \"created\": 1713833628,\n  \"data\": [\n    {\n      \"b64_json\": \"...\"\n    }\n  ],\n  \"usage\": {\n    \"total_tokens\": 100,\n    \"input_tokens\": 50,\n    \"output_tokens\": 50,\n    \"input_tokens_details\": {\n      \"text_tokens\": 10,\n      \"image_tokens\": 40\n    }\n  }\n}"},{"title":"Create image variation","method":"post","path":"https://api.openai.com/v1/images/variations","summary":"Creates a variation of a given image. This endpoint only supports dall-e-2.","parameters":{"images-createvariation__table":[{"name":"image","type":"file","required":true,"description":"The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square."},{"name":"model","type":"string or \"dall-e-2\"","required":false,"default":"dall-e-2","description":"The model to use for image generation. Only dall-e-2 is supported at this time."},{"name":"n","type":"integer or null","required":false,"default":"1","description":"The number of images to generate. Must be between 1 and 10."},{"name":"response_format","type":"string or null","required":false,"default":"url","description":"The format in which the generated images are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated."},{"name":"size","type":"string or null","required":false,"default":"1024x1024","description":"The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024."},{"name":"user","type":"string","required":false,"description":"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more."}]},"returns":"file","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/images/variations \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -F image=\"@otter.png\" \\\n  -F n=2 \\\n  -F size=\"1024x1024\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n\n{\n  \"created\": 1589478378,\n  \"data\": [\n    {\n      \"url\": \"https://...\"\n    },\n    {\n      \"url\": \"https://...\"\n    }\n  ]\n}"},{"title":"The image generation response","method":"","path":"","summary":"","parameters":{"images/object__table":[{"name":"created","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the image was created."},{"name":"data","type":"array","required":false,"description":"The list of generated images."},{"name":"usage","type":"object","required":false,"description":"For gpt-image-1 only, the token usage information for the image generation."}]},"returns":"","exampleRequest":"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n\n{\n  \"created\": 1713833628,\n  \"data\": [\n    {\n      \"b64_json\": \"...\"\n    }\n  ],\n  \"usage\": {\n    \"total_tokens\": 100,\n    \"input_tokens\": 50,\n    \"output_tokens\": 50,\n    \"input_tokens_details\": {\n      \"text_tokens\": 10,\n      \"image_tokens\": 40\n    }\n  }\n}"},{"title":"Embeddings","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create embeddings","method":"post","path":"https://api.openai.com/v1/embeddings","summary":"Creates an embedding vector representing the input text.","parameters":{"embeddings-create__table":[{"name":"input","type":"string or array","required":true,"description":"Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. Example Python code for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request."},{"name":"model","type":"string","required":true,"description":"ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them."},{"name":"dimensions","type":"integer","required":false,"description":"The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models."},{"name":"encoding_format","type":"string","required":false,"default":"float","description":"The format to return the embeddings in. Can be either float or base64."},{"name":"user","type":"string","required":false,"description":"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more."}]},"returns":"string or array","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n\ncurl https://api.openai.com/v1/embeddings \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"input\": \"The food was delicious and the waiter...\",\n    \"model\": \"text-embedding-ada-002\",\n    \"encoding_format\": \"float\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"embedding\",\n      \"embedding\": [\n        0.0023064255,\n        -0.009327292,\n        .... (1536 floats total for ada-002)\n        -0.0028842222,\n      ],\n      \"index\": 0\n    }\n  ],\n  \"model\": \"text-embedding-ada-002\",\n  \"usage\": {\n    \"prompt_tokens\": 8,\n    \"total_tokens\": 8\n  }\n}"},{"title":"The embedding object","method":"","path":"","summary":"","parameters":{"embeddings/object__table":[{"name":"embedding","type":"array","required":false,"description":"The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the embedding guide."},{"name":"index","type":"integer","required":false,"description":"The index of the embedding in the list of embeddings."},{"name":"object","type":"string","required":false,"description":"The object type, which is always \"embedding\"."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Evals","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create eval","method":"post","path":"https://api.openai.com/v1/evals","summary":"Create the structure of an evaluation that can be used to test a model's performance.\nAn evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.\nFor more information, see the Evals guide.","parameters":{"evals-create__table":[{"name":"data_source_config","type":"object","required":true,"description":"The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation."},{"name":"testing_criteria","type":"array","required":true,"description":"A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like {{item.variable_name}}. To reference the model's output, use the sample namespace (ie, {{sample.output_text}})."},{"name":"metadata","type":"map","required":false,"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."},{"name":"name","type":"string","required":false,"description":"The name of the evaluation."}]},"returns":"object","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n\ncurl https://api.openai.com/v1/evals \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n        \"name\": \"Sentiment\",\n        \"data_source_config\": {\n          \"type\": \"stored_completions\",\n          \"metadata\": {\n              \"usecase\": \"chatbot\"\n          }\n        },\n        \"testing_criteria\": [\n          {\n            \"type\": \"label_model\",\n            \"model\": \"o3-mini\",\n            \"input\": [\n              {\n                \"role\": \"developer\",\n                \"content\": \"Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'\"\n              },\n              {\n                \"role\": \"user\",\n                \"content\": \"Statement: {{item.input}}\"\n              }\n            ],\n            \"passing_labels\": [\n              \"positive\"\n            ],\n            \"labels\": [\n              \"positive\",\n              \"neutral\",\n              \"negative\"\n            ],\n            \"name\": \"Example label grader\"\n          }\n        ]\n      }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n\n{\n  \"object\": \"eval\",\n  \"id\": \"eval_67b7fa9a81a88190ab4aa417e397ea21\",\n  \"data_source_config\": {\n    \"type\": \"stored_completions\",\n    \"metadata\": {\n      \"usecase\": \"chatbot\"\n    },\n    \"schema\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"item\": {\n          \"type\": \"object\"\n        },\n        \"sample\": {\n          \"type\": \"object\"\n        }\n      },\n      \"required\": [\n        \"item\",\n        \"sample\"\n      ]\n  },\n  \"testing_criteria\": [\n    {\n      \"name\": \"Example label grader\",\n      \"type\": \"label_model\",\n      \"model\": \"o3-mini\",\n      \"input\": [\n        {\n          \"type\": \"message\",\n          \"role\": \"developer\",\n          \"content\": {\n            \"type\": \"input_text\",\n            \"text\": \"Classify the sentiment of the following statement as one of positive, neutral, or negative\"\n          }\n        },\n        {\n          \"type\": \"message\",\n          \"role\": \"user\",\n          \"content\": {\n            \"type\": \"input_text\",\n            \"text\": \"Statement: {{item.input}}\"\n          }\n        }\n      ],\n      \"passing_labels\": [\n        \"positive\"\n      ],\n      \"labels\": [\n        \"positive\",\n        \"neutral\",\n        \"negative\"\n      ]\n    }\n  ],\n  \"name\": \"Sentiment\",\n  \"created_at\": 1740110490,\n  \"metadata\": {\n    \"description\": \"An eval for sentiment analysis\"\n  }\n}"},{"title":"Get an eval","method":"get","path":"https://api.openai.com/v1/evals/{eval_id}","summary":"Get an evaluation by ID.","parameters":{"evals-get__table":[{"name":"eval_id","type":"string","required":true,"description":"The ID of the evaluation to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n\n{\n  \"object\": \"eval\",\n  \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n  \"data_source_config\": {\n    \"type\": \"custom\",\n    \"schema\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"item\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"input\": {\n              \"type\": \"string\"\n            },\n            \"ground_truth\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"input\",\n            \"ground_truth\"\n          ]\n        }\n      },\n      \"required\": [\n        \"item\"\n      ]\n    }\n  },\n  \"testing_criteria\": [\n    {\n      \"name\": \"String check\",\n      \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\",\n      \"type\": \"string_check\",\n      \"input\": \"{{item.input}}\",\n      \"reference\": \"{{item.ground_truth}}\",\n      \"operation\": \"eq\"\n    }\n  ],\n  \"name\": \"External Data Eval\",\n  \"created_at\": 1739314509,\n  \"metadata\": {},\n}"},{"title":"Update an eval","method":"post","path":"https://api.openai.com/v1/evals/{eval_id}","summary":"Update certain properties of an evaluation.","parameters":{"evals-update__table":[{"name":"metadata","type":"map","required":false,"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."},{"name":"name","type":"string","required":false,"description":"Rename the evaluation."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"Updated Eval\", \"metadata\": {\"description\": \"Updated description\"}}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n\n{\n  \"object\": \"eval\",\n  \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n  \"data_source_config\": {\n    \"type\": \"custom\",\n    \"schema\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"item\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"input\": {\n              \"type\": \"string\"\n            },\n            \"ground_truth\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"input\",\n            \"ground_truth\"\n          ]\n        }\n      },\n      \"required\": [\n        \"item\"\n      ]\n    }\n  },\n  \"testing_criteria\": [\n    {\n      \"name\": \"String check\",\n      \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\",\n      \"type\": \"string_check\",\n      \"input\": \"{{item.input}}\",\n      \"reference\": \"{{item.ground_truth}}\",\n      \"operation\": \"eq\"\n    }\n  ],\n  \"name\": \"Updated Eval\",\n  \"created_at\": 1739314509,\n  \"metadata\": {\"description\": \"Updated description\"},\n}"},{"title":"Delete an eval","method":"delete","path":"https://api.openai.com/v1/evals/{eval_id}","summary":"Delete an evaluation.","parameters":{"evals-delete__table":[{"name":"eval_id","type":"string","required":true,"description":"The ID of the evaluation to delete."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/evals/eval_abc123 \\\n  -X DELETE \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"object\": \"eval.deleted\",\n  \"deleted\": true,\n  \"eval_id\": \"eval_abc123\"\n}"},{"title":"List evals","method":"get","path":"https://api.openai.com/v1/evals","summary":"List evaluations for a project.","parameters":{"evals-list__table":[{"name":"after","type":"string","required":false,"description":"Identifier for the last eval from the previous pagination request."},{"name":"limit","type":"integer","required":false,"default":"20","description":"Number of evals to retrieve."},{"name":"order","type":"string","required":false,"default":"asc","description":"Sort order for evals by timestamp. Use asc for ascending order or desc for descending order."},{"name":"order_by","type":"string","required":false,"default":"created_at","description":"Evals can be ordered by creation time or last updated time. Use created_at for creation time or updated_at for last updated time."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/evals?limit=1 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n      \"object\": \"eval\",\n      \"data_source_config\": {\n        \"type\": \"stored_completions\",\n        \"metadata\": {\n          \"usecase\": \"push_notifications_summarizer\"\n        },\n        \"schema\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"item\": {\n              \"type\": \"object\"\n            },\n            \"sample\": {\n              \"type\": \"object\"\n            }\n          },\n          \"required\": [\n            \"item\",\n            \"sample\"\n          ]\n        }\n      },\n      \"testing_criteria\": [\n        {\n          \"name\": \"Push Notification Summary Grader\",\n          \"id\": \"Push Notification Summary Grader-9b876f24-4762-4be9-aff4-db7a9b31c673\",\n          \"type\": \"label_model\",\n          \"model\": \"o3-mini\",\n          \"input\": [\n            {\n              \"type\": \"message\",\n              \"role\": \"developer\",\n              \"content\": {\n                \"type\": \"input_text\",\n                \"text\": \"\\nLabel the following push notification summary as either correct or incorrect.\\nThe push notification and the summary will be provided below.\\nA good push notificiation summary is concise and snappy.\\nIf it is good, then label it as correct, if not, then incorrect.\\n\"\n              }\n            },\n            {\n              \"type\": \"message\",\n              \"role\": \"user\",\n              \"content\": {\n                \"type\": \"input_text\",\n                \"text\": \"\\nPush notifications: {{item.input}}\\nSummary: {{sample.output_text}}\\n\"\n              }\n            }\n          ],\n          \"passing_labels\": [\n            \"correct\"\n          ],\n          \"labels\": [\n            \"correct\",\n            \"incorrect\"\n          ],\n          \"sampling_params\": null\n        }\n      ],\n      \"name\": \"Push Notification Summary Grader\",\n      \"created_at\": 1739314509,\n      \"metadata\": {\n        \"description\": \"A stored completions eval for push notification summaries\"\n      }\n    }\n  ],\n  \"first_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n  \"last_id\": \"eval_67aa884cf6688190b58f657d4441c8b7\",\n  \"has_more\": true\n}"},{"title":"Get eval runs","method":"get","path":"https://api.openai.com/v1/evals/{eval_id}/runs","summary":"Get a list of runs for an evaluation.","parameters":{"evals-getruns__table":[{"name":"after","type":"string","required":false,"description":"Identifier for the last run from the previous pagination request."},{"name":"limit","type":"integer","required":false,"default":"20","description":"Number of runs to retrieve."},{"name":"order","type":"string","required":false,"default":"asc","description":"Sort order for runs by timestamp. Use asc for ascending order or desc for descending order. Defaults to asc."},{"name":"status","type":"string","required":false,"description":"Filter runs by status. One of queued | in_progress | failed | completed | canceled."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"eval.run\",\n      \"id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n      \"eval_id\": \"eval_67e0c726d560819083f19a957c4c640b\",\n      \"report_url\": \"https://platform.openai.com/evaluations/eval_67e0c726d560819083f19a957c4c640b\",\n      \"status\": \"completed\",\n      \"model\": \"o3-mini\",\n      \"name\": \"bulk_with_negative_examples_o3-mini\",\n      \"created_at\": 1742784467,\n      \"result_counts\": {\n        \"total\": 1,\n        \"errored\": 0,\n        \"failed\": 0,\n        \"passed\": 1\n      },\n      \"per_model_usage\": [\n        {\n          \"model_name\": \"o3-mini\",\n          \"invocation_count\": 1,\n          \"prompt_tokens\": 563,\n          \"completion_tokens\": 874,\n          \"total_tokens\": 1437,\n          \"cached_tokens\": 0\n        }\n      ],\n      \"per_testing_criteria_results\": [\n        {\n          \"testing_criteria\": \"Push Notification Summary Grader-1808cd0b-eeec-4e0b-a519-337e79f4f5d1\",\n          \"passed\": 1,\n          \"failed\": 0\n        }\n      ],\n      \"data_source\": {\n        \"type\": \"completions\",\n        \"source\": {\n          \"type\": \"file_content\",\n          \"content\": [\n            {\n              \"item\": {\n                \"notifications\": \"\\n- New message from Sarah: \\\"Can you call me later?\\\"\\n- Your package has been delivered!\\n- Flash sale: 20% off electronics for the next 2 hours!\\n\"\n              }\n            }\n          ]\n        },\n        \"input_messages\": {\n          \"type\": \"template\",\n          \"template\": [\n            {\n              \"type\": \"message\",\n              \"role\": \"developer\",\n              \"content\": {\n                \"type\": \"input_text\",\n                \"text\": \"\\n\\n\\n\\nYou are a helpful assistant that takes in an array of push notifications and returns a collapsed summary of them.\\nThe push notification will be provided as follows:\\n<push_notifications>\\n...notificationlist...\\n</push_notifications>\\n\\nYou should return just the summary and nothing else.\\n\\n\\nYou should return a summary that is concise and snappy.\\n\\n\\nHere is an example of a good summary:\\n<push_notifications>\\n- Traffic alert: Accident reported on Main Street.- Package out for delivery: Expected by 5 PM.- New friend suggestion: Connect with Emma.\\n</push_notifications>\\n<summary>\\nTraffic alert, package expected by 5pm, suggestion for new friend (Emily).\\n</summary>\\n\\n\\nHere is an example of a bad summary:\\n<push_notifications>\\n- Traffic alert: Accident reported on Main Street.- Package out for delivery: Expected by 5 PM.- New friend suggestion: Connect with Emma.\\n</push_notifications>\\n<summary>\\nTraffic alert reported on main street. You have a package that will arrive by 5pm, Emily is a new friend suggested for you.\\n</summary>\\n\"\n              }\n            },\n            {\n              \"type\": \"message\",\n              \"role\": \"user\",\n              \"content\": {\n                \"type\": \"input_text\",\n                \"text\": \"<push_notifications>{{item.notifications}}</push_notifications>\"\n              }\n            }\n          ]\n        },\n        \"model\": \"o3-mini\",\n        \"sampling_params\": null\n      },\n      \"error\": null,\n      \"metadata\": {}\n    }\n  ],\n  \"first_id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n  \"last_id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n  \"has_more\": true\n}"},{"title":"Get an eval run","method":"get","path":"https://api.openai.com/v1/evals/{eval_id}/runs/{run_id}","summary":"Get an evaluation run by ID.","parameters":{"evals-getrun__table":[{"name":"eval_id","type":"string","required":true,"description":"The ID of the evaluation to retrieve runs for."},{"name":"run_id","type":"string","required":true,"description":"The ID of the run to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91\n92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111\n112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131\n132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n\n{\n  \"object\": \"eval.run\",\n  \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n  \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n  \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n  \"status\": \"queued\",\n  \"model\": \"gpt-4o-mini\",\n  \"name\": \"gpt-4o-mini\",\n  \"created_at\": 1743092069,\n  \"result_counts\": {\n    \"total\": 0,\n    \"errored\": 0,\n    \"failed\": 0,\n    \"passed\": 0\n  },\n  \"per_model_usage\": null,\n  \"per_testing_criteria_results\": null,\n  \"data_source\": {\n    \"type\": \"completions\",\n    \"source\": {\n      \"type\": \"file_content\",\n      \"content\": [\n        {\n          \"item\": {\n            \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n            \"ground_truth\": \"Technology\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n            \"ground_truth\": \"Markets\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"International Summit Addresses Climate Change Strategies\",\n            \"ground_truth\": \"World\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n            \"ground_truth\": \"Business\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"National Team Qualifies for World Championship Finals\",\n            \"ground_truth\": \"Sports\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n            \"ground_truth\": \"Markets\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n            \"ground_truth\": \"Business\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n            \"ground_truth\": \"Technology\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"World Leaders Sign Historic Climate Agreement\",\n            \"ground_truth\": \"World\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n            \"ground_truth\": \"Sports\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n            \"ground_truth\": \"Business\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n            \"ground_truth\": \"Technology\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n            \"ground_truth\": \"Markets\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"International Cooperation Strengthened Through New Treaty\",\n            \"ground_truth\": \"World\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n            \"ground_truth\": \"Sports\"\n          }\n        }\n      ]\n    },\n    \"input_messages\": {\n      \"type\": \"template\",\n      \"template\": [\n        {\n          \"type\": \"message\",\n          \"role\": \"developer\",\n          \"content\": {\n            \"type\": \"input_text\",\n            \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n          }\n        },\n        {\n          \"type\": \"message\",\n          \"role\": \"user\",\n          \"content\": {\n            \"type\": \"input_text\",\n            \"text\": \"{{item.input}}\"\n          }\n        }\n      ]\n    },\n    \"model\": \"gpt-4o-mini\",\n    \"sampling_params\": {\n      \"seed\": 42,\n      \"temperature\": 1.0,\n      \"top_p\": 1.0,\n      \"max_completions_tokens\": 2048\n    }\n  },\n  \"error\": null,\n  \"metadata\": {}\n}"},{"title":"Create eval run","method":"post","path":"https://api.openai.com/v1/evals/{eval_id}/runs","summary":"Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation.","parameters":{"evals-createrun__table":[{"name":"data_source","type":"object","required":true,"description":"Details about the run's data source."},{"name":"metadata","type":"map","required":false,"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."},{"name":"name","type":"string","required":false,"description":"The name of the run."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/evals/eval_67e579652b548190aaa83ada4b125f47/runs \\\n  -X POST \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"gpt-4o-mini\",\"data_source\":{\"type\":\"completions\",\"input_messages\":{\"type\":\"template\",\"template\":[{\"role\":\"developer\",\"content\":\"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"} , {\"role\":\"user\",\"content\":\"{{item.input}}\"}]} ,\"sampling_params\":{\"temperature\":1,\"max_completions_tokens\":2048,\"top_p\":1,\"seed\":42},\"model\":\"gpt-4o-mini\",\"source\":{\"type\":\"file_content\",\"content\":[{\"item\":{\"input\":\"Tech Company Launches Advanced Artificial Intelligence Platform\",\"ground_truth\":\"Technology\"}}]}}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n\n{\n  \"object\": \"eval.run\",\n  \"id\": \"evalrun_67e57965b480819094274e3a32235e4c\",\n  \"eval_id\": \"eval_67e579652b548190aaa83ada4b125f47\",\n  \"report_url\": \"https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47&run_id=evalrun_67e57965b480819094274e3a32235e4c\",\n  \"status\": \"queued\",\n  \"model\": \"gpt-4o-mini\",\n  \"name\": \"gpt-4o-mini\",\n  \"created_at\": 1743092069,\n  \"result_counts\": {\n    \"total\": 0,\n    \"errored\": 0,\n    \"failed\": 0,\n    \"passed\": 0\n  },\n  \"per_model_usage\": null,\n  \"per_testing_criteria_results\": null,\n  \"data_source\": {\n    \"type\": \"completions\",\n    \"source\": {\n      \"type\": \"file_content\",\n      \"content\": [\n        {\n          \"item\": {\n            \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n            \"ground_truth\": \"Technology\"\n          }\n        }\n      ]\n    },\n    \"input_messages\": {\n      \"type\": \"template\",\n      \"template\": [\n        {\n          \"type\": \"message\",\n          \"role\": \"developer\",\n          \"content\": {\n            \"type\": \"input_text\",\n            \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n          }\n        },\n        {\n          \"type\": \"message\",\n          \"role\": \"user\",\n          \"content\": {\n            \"type\": \"input_text\",\n            \"text\": \"{{item.input}}\"\n          }\n        }\n      ]\n    },\n    \"model\": \"gpt-4o-mini\",\n    \"sampling_params\": {\n      \"seed\": 42,\n      \"temperature\": 1.0,\n      \"top_p\": 1.0,\n      \"max_completions_tokens\": 2048\n    }\n  },\n  \"error\": null,\n  \"metadata\": {}\n}"},{"title":"Cancel eval run","method":"post","path":"https://api.openai.com/v1/evals/{eval_id}/runs/{run_id}","summary":"Cancel an ongoing evaluation run.","parameters":{"evals-cancelrun__table":[{"name":"eval_id","type":"string","required":true,"description":"The ID of the evaluation whose run you want to cancel."},{"name":"run_id","type":"string","required":true,"description":"The ID of the run to cancel."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/cancel \\\n  -X POST \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91\n92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111\n112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131\n132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n\n{\n  \"object\": \"eval.run\",\n  \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n  \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n  \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n  \"status\": \"canceled\",\n  \"model\": \"gpt-4o-mini\",\n  \"name\": \"gpt-4o-mini\",\n  \"created_at\": 1743092069,\n  \"result_counts\": {\n    \"total\": 0,\n    \"errored\": 0,\n    \"failed\": 0,\n    \"passed\": 0\n  },\n  \"per_model_usage\": null,\n  \"per_testing_criteria_results\": null,\n  \"data_source\": {\n    \"type\": \"completions\",\n    \"source\": {\n      \"type\": \"file_content\",\n      \"content\": [\n        {\n          \"item\": {\n            \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n            \"ground_truth\": \"Technology\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n            \"ground_truth\": \"Markets\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"International Summit Addresses Climate Change Strategies\",\n            \"ground_truth\": \"World\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n            \"ground_truth\": \"Business\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"National Team Qualifies for World Championship Finals\",\n            \"ground_truth\": \"Sports\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n            \"ground_truth\": \"Markets\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n            \"ground_truth\": \"Business\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n            \"ground_truth\": \"Technology\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"World Leaders Sign Historic Climate Agreement\",\n            \"ground_truth\": \"World\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n            \"ground_truth\": \"Sports\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n            \"ground_truth\": \"Business\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n            \"ground_truth\": \"Technology\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n            \"ground_truth\": \"Markets\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"International Cooperation Strengthened Through New Treaty\",\n            \"ground_truth\": \"World\"\n          }\n        },\n        {\n          \"item\": {\n            \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n            \"ground_truth\": \"Sports\"\n          }\n        }\n      ]\n    },\n    \"input_messages\": {\n      \"type\": \"template\",\n      \"template\": [\n        {\n          \"type\": \"message\",\n          \"role\": \"developer\",\n          \"content\": {\n            \"type\": \"input_text\",\n            \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n          }\n        },\n        {\n          \"type\": \"message\",\n          \"role\": \"user\",\n          \"content\": {\n            \"type\": \"input_text\",\n            \"text\": \"{{item.input}}\"\n          }\n        }\n      ]\n    },\n    \"model\": \"gpt-4o-mini\",\n    \"sampling_params\": {\n      \"seed\": 42,\n      \"temperature\": 1.0,\n      \"top_p\": 1.0,\n      \"max_completions_tokens\": 2048\n    }\n  },\n  \"error\": null,\n  \"metadata\": {}\n}"},{"title":"Delete eval run","method":"delete","path":"https://api.openai.com/v1/evals/{eval_id}/runs/{run_id}","summary":"Delete an eval run.","parameters":{"evals-deleterun__table":[{"name":"eval_id","type":"string","required":true,"description":"The ID of the evaluation to delete the run from."},{"name":"run_id","type":"string","required":true,"description":"The ID of the run to delete."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/evals/eval_123abc/runs/evalrun_abc456 \\\n  -X DELETE \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"object\": \"eval.run.deleted\",\n  \"deleted\": true,\n  \"run_id\": \"evalrun_abc456\"\n}"},{"title":"Get an output item of an eval run","method":"get","path":"https://api.openai.com/v1/evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}","summary":"Get an evaluation run output item by ID.","parameters":{"evals-getrunoutputitem__table":[{"name":"eval_id","type":"string","required":true,"description":"The ID of the evaluation to retrieve runs for."},{"name":"output_item_id","type":"string","required":true,"description":"The ID of the output item to retrieve."},{"name":"run_id","type":"string","required":true,"description":"The ID of the run to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/output_items/outputitem_67abd55eb6548190bb580745d5644a33 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n\n{\n  \"object\": \"eval.run.output_item\",\n  \"id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n  \"created_at\": 1743092076,\n  \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n  \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n  \"status\": \"pass\",\n  \"datasource_item_id\": 5,\n  \"datasource_item\": {\n    \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n    \"ground_truth\": \"Markets\"\n  },\n  \"results\": [\n    {\n      \"name\": \"String check-a2486074-d803-4445-b431-ad2262e85d47\",\n      \"sample\": null,\n      \"passed\": true,\n      \"score\": 1.0\n    }\n  ],\n  \"sample\": {\n    \"input\": [\n      {\n        \"role\": \"developer\",\n        \"content\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\",\n        \"tool_call_id\": null,\n        \"tool_calls\": null,\n        \"function_call\": null\n      },\n      {\n        \"role\": \"user\",\n        \"content\": \"Stock Markets Rally After Positive Economic Data Released\",\n        \"tool_call_id\": null,\n        \"tool_calls\": null,\n        \"function_call\": null\n      }\n    ],\n    \"output\": [\n      {\n        \"role\": \"assistant\",\n        \"content\": \"Markets\",\n        \"tool_call_id\": null,\n        \"tool_calls\": null,\n        \"function_call\": null\n      }\n    ],\n    \"finish_reason\": \"stop\",\n    \"model\": \"gpt-4o-mini-2024-07-18\",\n    \"usage\": {\n      \"total_tokens\": 325,\n      \"completion_tokens\": 2,\n      \"prompt_tokens\": 323,\n      \"cached_tokens\": 0\n    },\n    \"error\": null,\n    \"temperature\": 1.0,\n    \"max_completion_tokens\": 2048,\n    \"top_p\": 1.0,\n    \"seed\": 42\n  }\n}"},{"title":"Get eval run output items","method":"get","path":"https://api.openai.com/v1/evals/{eval_id}/runs/{run_id}/output_items","summary":"Get a list of output items for an evaluation run.","parameters":{"evals-getrunoutputitems__table":[{"name":"after","type":"string","required":false,"description":"Identifier for the last output item from the previous pagination request."},{"name":"limit","type":"integer","required":false,"default":"20","description":"Number of output items to retrieve."},{"name":"order","type":"string","required":false,"default":"asc","description":"Sort order for output items by timestamp. Use asc for ascending order or desc for descending order. Defaults to asc."},{"name":"status","type":"string","required":false,"description":"Filter output items by status. Use failed to filter by failed output items or pass to filter by passed output items."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs/erun_67abd54d60ec8190832b46859da808f7/output_items \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"eval.run.output_item\",\n      \"id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n      \"created_at\": 1743092076,\n      \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n      \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n      \"status\": \"pass\",\n      \"datasource_item_id\": 5,\n      \"datasource_item\": {\n        \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n        \"ground_truth\": \"Markets\"\n      },\n      \"results\": [\n        {\n          \"name\": \"String check-a2486074-d803-4445-b431-ad2262e85d47\",\n          \"sample\": null,\n          \"passed\": true,\n          \"score\": 1.0\n        }\n      ],\n      \"sample\": {\n        \"input\": [\n          {\n            \"role\": \"developer\",\n            \"content\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\"  \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\"  \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\"  \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\"  \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\"  \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\",\n            \"tool_call_id\": null,\n            \"tool_calls\": null,\n            \"function_call\": null\n          },\n          {\n            \"role\": \"user\",\n            \"content\": \"Stock Markets Rally After Positive Economic Data Released\",\n            \"tool_call_id\": null,\n            \"tool_calls\": null,\n            \"function_call\": null\n          }\n        ],\n        \"output\": [\n          {\n            \"role\": \"assistant\",\n            \"content\": \"Markets\",\n            \"tool_call_id\": null,\n            \"tool_calls\": null,\n            \"function_call\": null\n          }\n        ],\n        \"finish_reason\": \"stop\",\n        \"model\": \"gpt-4o-mini-2024-07-18\",\n        \"usage\": {\n          \"total_tokens\": 325,\n          \"completion_tokens\": 2,\n          \"prompt_tokens\": 323,\n          \"cached_tokens\": 0\n        },\n        \"error\": null,\n        \"temperature\": 1.0,\n        \"max_completion_tokens\": 2048,\n        \"top_p\": 1.0,\n        \"seed\": 42\n      }\n    }\n  ],\n  \"first_id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n  \"last_id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n  \"has_more\": true\n}"},{"title":"The eval object","method":"","path":"","summary":"","parameters":{"evals/object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the eval was created."},{"name":"data_source_config","type":"object","required":false,"description":"Configuration of data sources used in runs of the evaluation."},{"name":"id","type":"string","required":false,"description":"Unique identifier for the evaluation."},{"name":"metadata","type":"map","required":false,"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."},{"name":"name","type":"string","required":false,"description":"The name of the evaluation."},{"name":"object","type":"string","required":false,"description":"The object type."},{"name":"testing_criteria","type":"array","required":false,"description":"A list of testing criteria."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The eval run object","method":"","path":"","summary":"","parameters":{"evals/run-object__table":[{"name":"created_at","type":"integer","required":false,"description":"Unix timestamp (in seconds) when the evaluation run was created."},{"name":"data_source","type":"object","required":false,"description":"Information about the run's data source."},{"name":"error","type":"object","required":false,"description":"An object representing an error response from the Eval API."},{"name":"eval_id","type":"string","required":false,"description":"The identifier of the associated evaluation."},{"name":"id","type":"string","required":false,"description":"Unique identifier for the evaluation run."},{"name":"metadata","type":"map","required":false,"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."},{"name":"model","type":"string","required":false,"description":"The model that is evaluated, if applicable."},{"name":"name","type":"string","required":false,"description":"The name of the evaluation run."},{"name":"object","type":"string","required":false,"description":"The type of the object. Always \"eval.run\"."},{"name":"per_model_usage","type":"array","required":false,"description":"Usage statistics for each model during the evaluation run."},{"name":"per_testing_criteria_results","type":"array","required":false,"description":"Results per testing criteria applied during the evaluation run."},{"name":"report_url","type":"string","required":false,"description":"The URL to the rendered evaluation run report on the UI dashboard."},{"name":"result_counts","type":"object","required":false,"description":"Counters summarizing the outcomes of the evaluation run."},{"name":"status","type":"string","required":false,"description":"The status of the evaluation run."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The eval run output item object","method":"","path":"","summary":"","parameters":{"evals/run-output-item-object__table":[{"name":"created_at","type":"integer","required":false,"description":"Unix timestamp (in seconds) when the evaluation run was created."},{"name":"datasource_item","type":"object","required":false,"description":"Details of the input data source item."},{"name":"datasource_item_id","type":"integer","required":false,"description":"The identifier for the data source item."},{"name":"eval_id","type":"string","required":false,"description":"The identifier of the evaluation group."},{"name":"id","type":"string","required":false,"description":"Unique identifier for the evaluation run output item."},{"name":"object","type":"string","required":false,"description":"The type of the object. Always \"eval.run.output_item\"."},{"name":"results","type":"array","required":false,"description":"A list of results from the evaluation run."},{"name":"run_id","type":"string","required":false,"description":"The identifier of the evaluation run associated with this output item."},{"name":"sample","type":"object","required":false,"description":"A sample containing the input and output of the evaluation run."},{"name":"status","type":"string","required":false,"description":"The status of the evaluation run."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Fine-tuning","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create fine-tuning job","method":"post","path":"https://api.openai.com/v1/fine_tuning/jobs","summary":"Creates a fine-tuning job which begins the process of creating a new model from a given dataset.","parameters":{"fine-tuning-create__table":[{"name":"model","type":"string","required":true,"description":"The name of the model to fine-tune. You can select one of the supported models."},{"name":"training_file","type":"string","required":true,"description":"The ID of an uploaded file that contains training data. See upload file for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose fine-tune. The contents of the file should differ depending on if the model uses the chat, completions format, or if the fine-tuning method uses the preference format. See the fine-tuning guide for more details."},{"name":"hyperparameters","type":"object","required":false,"description":"The hyperparameters used for the fine-tuning job. This value is now deprecated in favor of method, and should be passed in under the method parameter."},{"name":"integrations","type":"array or null","required":false,"description":"A list of integrations to enable for your fine-tuning job."},{"name":"metadata","type":"map","required":false,"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."},{"name":"method","type":"object","required":false,"description":"The method used for fine-tuning."},{"name":"seed","type":"integer or null","required":false,"description":"The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you."},{"name":"suffix","type":"string or null","required":false,"default":"null","description":"A string of up to 64 characters that will be added to your fine-tuned model name. For example, a suffix of \"custom-model-name\" would produce a model name like ft:gpt-4o-mini:openai:custom-model-name:7p4lURel."},{"name":"validation_file","type":"string or null","required":false,"description":"The ID of an uploaded file that contains validation data. If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should not be present in both train and validation files. Your dataset must be formatted as a JSONL file. You must upload your file with the purpose fine-tune. See the fine-tuning guide for more details."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n\ncurl https://api.openai.com/v1/fine_tuning/jobs \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"training_file\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n    \"model\": \"gpt-4o-mini\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n\n{\n  \"object\": \"fine_tuning.job\",\n  \"id\": \"ftjob-abc123\",\n  \"model\": \"gpt-4o-mini-2024-07-18\",\n  \"created_at\": 1721764800,\n  \"fine_tuned_model\": null,\n  \"organization_id\": \"org-123\",\n  \"result_files\": [],\n  \"status\": \"queued\",\n  \"validation_file\": null,\n  \"training_file\": \"file-abc123\",\n  \"method\": {\n    \"type\": \"supervised\",\n    \"supervised\": {\n      \"hyperparameters\": {\n        \"batch_size\": \"auto\",\n        \"learning_rate_multiplier\": \"auto\",\n        \"n_epochs\": \"auto\",\n      }\n    }\n  },\n  \"metadata\": null\n}"},{"title":"List fine-tuning jobs","method":"get","path":"https://api.openai.com/v1/fine_tuning/jobs","summary":"List your organization's fine-tuning jobs","parameters":{"fine-tuning-list__table":[{"name":"after","type":"string","required":false,"description":"Identifier for the last job from the previous pagination request."},{"name":"limit","type":"integer","required":false,"default":"20","description":"Number of fine-tuning jobs to retrieve."},{"name":"metadata","type":"object or null","required":false,"description":"Optional metadata filter. To filter, use the syntax metadata[k]=v. Alternatively, set metadata=null to indicate no metadata."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/fine_tuning/jobs?limit=2&metadata[key]=value \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"fine_tuning.job\",\n      \"id\": \"ftjob-abc123\",\n      \"model\": \"gpt-4o-mini-2024-07-18\",\n      \"created_at\": 1721764800,\n      \"fine_tuned_model\": null,\n      \"organization_id\": \"org-123\",\n      \"result_files\": [],\n      \"status\": \"queued\",\n      \"validation_file\": null,\n      \"training_file\": \"file-abc123\",\n      \"metadata\": {\n        \"key\": \"value\"\n      }\n    },\n    { ... },\n    { ... }\n  ], \"has_more\": true\n}"},{"title":"List fine-tuning events","method":"get","path":"https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id}/events","summary":"Get status updates for a fine-tuning job.","parameters":{"fine-tuning-list-events__table":[{"name":"after","type":"string","required":false,"description":"Identifier for the last event from the previous pagination request."},{"name":"limit","type":"integer","required":false,"default":"20","description":"Number of events to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/events \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"fine_tuning.job.event\",\n      \"id\": \"ft-event-ddTJfwuMVpfLXseO0Am0Gqjm\",\n      \"created_at\": 1721764800,\n      \"level\": \"info\",\n      \"message\": \"Fine tuning job successfully completed\",\n      \"data\": null,\n      \"type\": \"message\"\n    },\n    {\n      \"object\": \"fine_tuning.job.event\",\n      \"id\": \"ft-event-tyiGuB72evQncpH87xe505Sv\",\n      \"created_at\": 1721764800,\n      \"level\": \"info\",\n      \"message\": \"New fine-tuned model created: ft:gpt-4o-mini:openai::7p4lURel\",\n      \"data\": null,\n      \"type\": \"message\"\n    }\n  ],\n  \"has_more\": true\n}"},{"title":"List fine-tuning checkpoints","method":"get","path":"https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints","summary":"List checkpoints for a fine-tuning job.","parameters":{"fine-tuning-list-checkpoints__table":[{"name":"after","type":"string","required":false,"description":"Identifier for the last checkpoint ID from the previous pagination request."},{"name":"limit","type":"integer","required":false,"default":"10","description":"Number of checkpoints to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/checkpoints \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"fine_tuning.job.checkpoint\",\n      \"id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\",\n      \"created_at\": 1721764867,\n      \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:96olL566:ckpt-step-2000\",\n      \"metrics\": {\n        \"full_valid_loss\": 0.134,\n        \"full_valid_mean_token_accuracy\": 0.874\n      },\n      \"fine_tuning_job_id\": \"ftjob-abc123\",\n      \"step_number\": 2000\n    },\n    {\n      \"object\": \"fine_tuning.job.checkpoint\",\n      \"id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\",\n      \"created_at\": 1721764800,\n      \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000\",\n      \"metrics\": {\n        \"full_valid_loss\": 0.167,\n        \"full_valid_mean_token_accuracy\": 0.781\n      },\n      \"fine_tuning_job_id\": \"ftjob-abc123\",\n      \"step_number\": 1000\n    }\n  ],\n  \"first_id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\",\n  \"last_id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\",\n  \"has_more\": true\n}"},{"title":"List checkpoint permissions","method":"get","path":"https://api.openai.com/v1/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions","summary":"NOTE: This endpoint requires an admin API key.","parameters":{"fine-tuning-list-permissions__table":[{"name":"after","type":"string","required":false,"description":"Identifier for the last permission ID from the previous pagination request."},{"name":"limit","type":"integer","required":false,"default":"10","description":"Number of permissions to retrieve."},{"name":"order","type":"string","required":false,"default":"descending","description":"The order in which to retrieve permissions."},{"name":"project_id","type":"string","required":false,"description":"The ID of the project to get permissions for."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"checkpoint.permission\",\n      \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n      \"created_at\": 1721764867,\n      \"project_id\": \"proj_abGMw1llN8IrBb6SvvY5A1iH\"\n    },\n    {\n      \"object\": \"checkpoint.permission\",\n      \"id\": \"cp_enQCFmOTGj3syEpYVhBRLTSy\",\n      \"created_at\": 1721764800,\n      \"project_id\": \"proj_iqGMw1llN8IrBb6SvvY5A1oF\"\n    },\n  ],\n  \"first_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n  \"last_id\": \"cp_enQCFmOTGj3syEpYVhBRLTSy\",\n  \"has_more\": false\n}"},{"title":"Create checkpoint permissions","method":"post","path":"https://api.openai.com/v1/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions","summary":"NOTE: Calling this endpoint requires an admin API key.","parameters":{"fine-tuning-create-permission__table":[{"name":"project_ids","type":"array","required":true,"description":"The project identifiers to grant access to."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"\n  -d '{\"project_ids\": [\"proj_abGMw1llN8IrBb6SvvY5A1iH\"]}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"checkpoint.permission\",\n      \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n      \"created_at\": 1721764867,\n      \"project_id\": \"proj_abGMw1llN8IrBb6SvvY5A1iH\"\n    }\n  ],\n  \"first_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n  \"last_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n  \"has_more\": false\n}"},{"title":"Delete checkpoint permission","method":"delete","path":"https://api.openai.com/v1/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}","summary":"NOTE: This endpoint requires an admin API key.","parameters":{"fine-tuning-delete-permission__table":[{"name":"fine_tuned_model_checkpoint","type":"string","required":true,"description":"The ID of the fine-tuned model checkpoint to delete a permission for."},{"name":"permission_id","type":"string","required":true,"description":"The ID of the fine-tuned model checkpoint permission to delete."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions/cp_zc4Q7MP6XxulcVzj4MZdwsAB \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"object\": \"checkpoint.permission\",\n  \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n  \"deleted\": true\n}"},{"title":"Retrieve fine-tuning job","method":"get","path":"https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id}","summary":"Get info about a fine-tuning job.","parameters":{"fine-tuning-retrieve__table":[{"name":"fine_tuning_job_id","type":"string","required":true,"description":"The ID of the fine-tuning job."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/fine_tuning/jobs/ft-AF1WoRqd3aJAHsqc9NY7iL8F \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n\n{\n  \"object\": \"fine_tuning.job\",\n  \"id\": \"ftjob-abc123\",\n  \"model\": \"davinci-002\",\n  \"created_at\": 1692661014,\n  \"finished_at\": 1692661190,\n  \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n  \"organization_id\": \"org-123\",\n  \"result_files\": [\n      \"file-abc123\"\n  ],\n  \"status\": \"succeeded\",\n  \"validation_file\": null,\n  \"training_file\": \"file-abc123\",\n  \"hyperparameters\": {\n      \"n_epochs\": 4,\n      \"batch_size\": 1,\n      \"learning_rate_multiplier\": 1.0\n  },\n  \"trained_tokens\": 5768,\n  \"integrations\": [],\n  \"seed\": 0,\n  \"estimated_finish\": 0,\n  \"method\": {\n    \"type\": \"supervised\",\n    \"supervised\": {\n      \"hyperparameters\": {\n        \"n_epochs\": 4,\n        \"batch_size\": 1,\n        \"learning_rate_multiplier\": 1.0\n      }\n    }\n  }\n}"},{"title":"Cancel fine-tuning","method":"post","path":"https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel","summary":"Immediately cancel a fine-tune job.","parameters":{"fine-tuning-cancel__table":[{"name":"fine_tuning_job_id","type":"string","required":true,"description":"The ID of the fine-tuning job to cancel."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/cancel \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n  \"object\": \"fine_tuning.job\",\n  \"id\": \"ftjob-abc123\",\n  \"model\": \"gpt-4o-mini-2024-07-18\",\n  \"created_at\": 1721764800,\n  \"fine_tuned_model\": null,\n  \"organization_id\": \"org-123\",\n  \"result_files\": [],\n  \"status\": \"cancelled\",\n  \"validation_file\": \"file-abc123\",\n  \"training_file\": \"file-abc123\"\n}"},{"title":"Resume fine-tuning","method":"post","path":"https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id}/resume","summary":"Resume a fine-tune job.","parameters":{"fine-tuning-resume__table":[{"name":"fine_tuning_job_id","type":"string","required":true,"description":"The ID of the fine-tuning job to resume."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/resume \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n  \"object\": \"fine_tuning.job\",\n  \"id\": \"ftjob-abc123\",\n  \"model\": \"gpt-4o-mini-2024-07-18\",\n  \"created_at\": 1721764800,\n  \"fine_tuned_model\": null,\n  \"organization_id\": \"org-123\",\n  \"result_files\": [],\n  \"status\": \"queued\",\n  \"validation_file\": \"file-abc123\",\n  \"training_file\": \"file-abc123\"\n}"},{"title":"Pause fine-tuning","method":"post","path":"https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id}/pause","summary":"Pause a fine-tune job.","parameters":{"fine-tuning-pause__table":[{"name":"fine_tuning_job_id","type":"string","required":true,"description":"The ID of the fine-tuning job to pause."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/pause \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n  \"object\": \"fine_tuning.job\",\n  \"id\": \"ftjob-abc123\",\n  \"model\": \"gpt-4o-mini-2024-07-18\",\n  \"created_at\": 1721764800,\n  \"fine_tuned_model\": null,\n  \"organization_id\": \"org-123\",\n  \"result_files\": [],\n  \"status\": \"paused\",\n  \"validation_file\": \"file-abc123\",\n  \"training_file\": \"file-abc123\"\n}"},{"title":"Training format for chat models using the supervised method","method":"","path":"","summary":"","parameters":{"fine-tuning/chat-input__table":[{"name":"functions","type":"array","required":false,"description":"A list of functions the model may generate JSON inputs for."},{"name":"messages","type":"array","required":false,"description":""},{"name":"parallel_tool_calls","type":"boolean","required":false,"description":"Whether to enable parallel function calling during tool use."},{"name":"tools","type":"array","required":false,"description":"A list of tools the model may generate JSON inputs for."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Training format for chat models using the preference method","method":"","path":"","summary":"","parameters":{"fine-tuning/preference-input__table":[{"name":"input","type":"object","required":false,"description":""},{"name":"non_preferred_output","type":"array","required":false,"description":"The non-preferred completion message for the output."},{"name":"preferred_output","type":"array","required":false,"description":"The preferred completion message for the output."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Training format for reasoning models using the reinforcement method","method":"","path":"","summary":"","parameters":{"fine-tuning/reinforcement-input__table":[{"name":"messages","type":"array","required":false,"description":""},{"name":"tools","type":"array","required":false,"description":"A list of tools the model may generate JSON inputs for."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The fine-tuning job object","method":"","path":"","summary":"","parameters":{"fine-tuning/object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the fine-tuning job was created."},{"name":"error","type":"object or null","required":false,"description":"For fine-tuning jobs that have failed, this will contain more information on the cause of the failure."},{"name":"estimated_finish","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running."},{"name":"fine_tuned_model","type":"string or null","required":false,"description":"The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running."},{"name":"finished_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running."},{"name":"hyperparameters","type":"object","required":false,"description":"The hyperparameters used for the fine-tuning job. This value will only be returned when running supervised jobs."},{"name":"id","type":"string","required":false,"description":"The object identifier, which can be referenced in the API endpoints."},{"name":"integrations","type":"array or null","required":false,"description":"A list of integrations to enable for this fine-tuning job."},{"name":"metadata","type":"map","required":false,"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."},{"name":"method","type":"object","required":false,"description":"The method used for fine-tuning."},{"name":"model","type":"string","required":false,"description":"The base model that is being fine-tuned."},{"name":"object","type":"string","required":false,"description":"The object type, which is always \"fine_tuning.job\"."},{"name":"organization_id","type":"string","required":false,"description":"The organization that owns the fine-tuning job."},{"name":"result_files","type":"array","required":false,"description":"The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the Files API."},{"name":"seed","type":"integer","required":false,"description":"The seed used for the fine-tuning job."},{"name":"status","type":"string","required":false,"description":"The current status of the fine-tuning job, which can be either validating_files, queued, running, succeeded, failed, or cancelled."},{"name":"trained_tokens","type":"integer or null","required":false,"description":"The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running."},{"name":"training_file","type":"string","required":false,"description":"The file ID used for training. You can retrieve the training data with the Files API."},{"name":"validation_file","type":"string or null","required":false,"description":"The file ID used for validation. You can retrieve the validation results with the Files API."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The fine-tuning job event object","method":"","path":"","summary":"","parameters":{"fine-tuning/event-object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the fine-tuning job was created."},{"name":"data","type":"object","required":false,"description":"The data associated with the event."},{"name":"id","type":"string","required":false,"description":"The object identifier."},{"name":"level","type":"string","required":false,"description":"The log level of the event."},{"name":"message","type":"string","required":false,"description":"The message of the event."},{"name":"object","type":"string","required":false,"description":"The object type, which is always \"fine_tuning.job.event\"."},{"name":"type","type":"string","required":false,"description":"The type of event."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The fine-tuning job checkpoint object","method":"","path":"","summary":"","parameters":{"fine-tuning/checkpoint-object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the checkpoint was created."},{"name":"fine_tuned_model_checkpoint","type":"string","required":false,"description":"The name of the fine-tuned checkpoint model that is created."},{"name":"fine_tuning_job_id","type":"string","required":false,"description":"The name of the fine-tuning job that this checkpoint was created from."},{"name":"id","type":"string","required":false,"description":"The checkpoint identifier, which can be referenced in the API endpoints."},{"name":"metrics","type":"object","required":false,"description":"Metrics at the step number during the fine-tuning job."},{"name":"object","type":"string","required":false,"description":"The object type, which is always \"fine_tuning.job.checkpoint\"."},{"name":"step_number","type":"integer","required":false,"description":"The step number that the checkpoint was created at."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The fine-tuned model checkpoint permission object","method":"","path":"","summary":"","parameters":{"fine-tuning/permission-object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the permission was created."},{"name":"id","type":"string","required":false,"description":"The permission identifier, which can be referenced in the API endpoints."},{"name":"object","type":"string","required":false,"description":"The object type, which is always \"checkpoint.permission\"."},{"name":"project_id","type":"string","required":false,"description":"The project identifier that the permission is for."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Graders","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"String Check Grader","method":"","path":"","summary":"","parameters":{"graders/string-check__table":[{"name":"input","type":"string","required":false,"description":"The input text. This may include template strings."},{"name":"name","type":"string","required":false,"description":"The name of the grader."},{"name":"operation","type":"string","required":false,"description":"The string check operation to perform. One of eq, ne, like, or ilike."},{"name":"reference","type":"string","required":false,"description":"The reference text. This may include template strings."},{"name":"type","type":"string","required":false,"description":"The object type, which is always string_check."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Text Similarity Grader","method":"","path":"","summary":"","parameters":{"graders/text-similarity__table":[{"name":"evaluation_metric","type":"string","required":false,"description":"The evaluation metric to use. One of fuzzy_match, bleu, gleu, meteor, rouge_1, rouge_2, rouge_3, rouge_4, rouge_5, or rouge_l."},{"name":"input","type":"string","required":false,"description":"The text being graded."},{"name":"name","type":"string","required":false,"description":"The name of the grader."},{"name":"reference","type":"string","required":false,"description":"The text being graded against."},{"name":"type","type":"string","required":false,"description":"The type of grader."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Score Model Grader","method":"","path":"","summary":"","parameters":{"graders/score-model__table":[{"name":"input","type":"array","required":false,"description":"The input text. This may include template strings."},{"name":"model","type":"string","required":false,"description":"The model to use for the evaluation."},{"name":"name","type":"string","required":false,"description":"The name of the grader."},{"name":"range","type":"array","required":false,"description":"The range of the score. Defaults to [0, 1]."},{"name":"sampling_params","type":"object","required":false,"description":"The sampling parameters for the model."},{"name":"type","type":"string","required":false,"description":"The object type, which is always score_model."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Label Model Grader","method":"","path":"","summary":"","parameters":{"graders/label-model__table":[{"name":"input","type":"array","required":false,"description":""},{"name":"labels","type":"array","required":false,"description":"The labels to assign to each item in the evaluation."},{"name":"model","type":"string","required":false,"description":"The model to use for the evaluation. Must support structured outputs."},{"name":"name","type":"string","required":false,"description":"The name of the grader."},{"name":"passing_labels","type":"array","required":false,"description":"The labels that indicate a passing result. Must be a subset of labels."},{"name":"type","type":"string","required":false,"description":"The object type, which is always label_model."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Python Grader","method":"","path":"","summary":"","parameters":{"graders/python__table":[{"name":"image_tag","type":"string","required":false,"description":"The image tag to use for the python script."},{"name":"name","type":"string","required":false,"description":"The name of the grader."},{"name":"source","type":"string","required":false,"description":"The source code of the python script."},{"name":"type","type":"string","required":false,"description":"The object type, which is always python."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Multi Grader","method":"","path":"","summary":"","parameters":{"graders/multi__table":[{"name":"calculate_output","type":"string","required":false,"description":"A formula to calculate the output based on grader results."},{"name":"graders","type":"object","required":false,"description":""},{"name":"name","type":"string","required":false,"description":"The name of the grader."},{"name":"type","type":"string","required":false,"description":"The object type, which is always multi."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Run graderBeta","method":"post","path":"https://api.openai.com/v1/fine_tuning/alpha/graders/run","summary":"Run a grader.","parameters":{"graders-run__table":[{"name":"grader","type":"object","required":true,"description":"The grader used for the fine-tuning job."},{"name":"model_sample","type":"string","required":true,"description":"The model sample to be evaluated. This value will be used to populate the sample namespace. See the guide for more details. The output_json variable will be populated if the model sample is a valid JSON string."},{"name":"item","type":"object","required":false,"description":"The dataset item provided to the grader. This will be used to populate the item namespace. See the guide for more details."}]},"returns":"object","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n\ncurl -X POST https://api.openai.com/v1/fine_tuning/alpha/graders/run \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"grader\": {\n      \"type\": \"score_model\",\n      \"name\": \"Example score model grader\",\n      \"input\": [\n        {\n          \"role\": \"user\",\n          \"content\": \"Score how close the reference answer is to the model answer. Score 1.0 if they are the same and 0.0 if they are different. Return just a floating point score\\n\\nReference answer: {{item.reference_answer}}\\n\\nModel answer: {{sample.output_text}}\"\n        }\n      ],\n      \"model\": \"gpt-4o-2024-08-06\",\n      \"sampling_params\": {\n        \"temperature\": 1,\n        \"top_p\": 1,\n        \"seed\": 42\n      }\n    },\n    \"item\": {\n      \"reference_answer\": \"fuzzy wuzzy was a bear\"\n    },\n    \"model_sample\": \"fuzzy wuzzy was a bear\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n\n{\n  \"reward\": 1.0,\n  \"metadata\": {\n    \"name\": \"Example score model grader\",\n    \"type\": \"score_model\",\n    \"errors\": {\n      \"formula_parse_error\": false,\n      \"sample_parse_error\": false,\n      \"truncated_observation_error\": false,\n      \"unresponsive_reward_error\": false,\n      \"invalid_variable_error\": false,\n      \"other_error\": false,\n      \"python_grader_server_error\": false,\n      \"python_grader_server_error_type\": null,\n      \"python_grader_runtime_error\": false,\n      \"python_grader_runtime_error_details\": null,\n      \"model_grader_server_error\": false,\n      \"model_grader_refusal_error\": false,\n      \"model_grader_parse_error\": false,\n      \"model_grader_server_error_details\": null\n    },\n    \"execution_time\": 4.365238428115845,\n    \"scores\": {},\n    \"token_usage\": {\n      \"prompt_tokens\": 190,\n      \"total_tokens\": 324,\n      \"completion_tokens\": 134,\n      \"cached_tokens\": 0\n    },\n    \"sampled_model_name\": \"gpt-4o-2024-08-06\"\n  },\n  \"sub_rewards\": {},\n  \"model_grader_token_usage_per_model\": {\n    \"gpt-4o-2024-08-06\": {\n      \"prompt_tokens\": 190,\n      \"total_tokens\": 324,\n      \"completion_tokens\": 134,\n      \"cached_tokens\": 0\n    }\n  }\n}"},{"title":"Validate graderBeta","method":"post","path":"https://api.openai.com/v1/fine_tuning/alpha/graders/validate","summary":"Validate a grader.","parameters":{"graders-validate__table":[{"name":"grader","type":"object","required":true,"description":"The grader used for the fine-tuning job."}]},"returns":"object","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\ncurl https://api.openai.com/v1/fine_tuning/alpha/graders/validate \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"grader\": {\n      \"type\": \"string_check\",\n      \"name\": \"Example string check grader\",\n      \"input\": \"{{sample.output_text}}\",\n      \"reference\": \"{{item.label}}\",\n      \"operation\": \"eq\"\n    }\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n  \"grader\": {\n    \"type\": \"string_check\",\n    \"name\": \"Example string check grader\",\n    \"input\": \"{{sample.output_text}}\",\n    \"reference\": \"{{item.label}}\",\n    \"operation\": \"eq\"\n  }\n}"},{"title":"Batch","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create batch","method":"post","path":"https://api.openai.com/v1/batches","summary":"Creates and executes a batch from an uploaded file of requests","parameters":{"batch-create__table":[{"name":"completion_window","type":"string","required":true,"description":"The time frame within which the batch should be processed. Currently only 24h is supported."},{"name":"endpoint","type":"string","required":true,"description":"The endpoint to be used for all requests in the batch. Currently /v1/responses, /v1/chat/completions, /v1/embeddings, and /v1/completions are supported. Note that /v1/embeddings batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch."},{"name":"input_file_id","type":"string","required":true,"description":"The ID of an uploaded file that contains requests for the new batch. See upload file for how to upload a file. Your input file must be formatted as a JSONL file, and must be uploaded with the purpose batch. The file can contain up to 50,000 requests, and can be up to 200 MB in size."},{"name":"metadata","type":"map","required":false,"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."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n\ncurl https://api.openai.com/v1/batches \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"input_file_id\": \"file-abc123\",\n    \"endpoint\": \"/v1/chat/completions\",\n    \"completion_window\": \"24h\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n\n{\n  \"id\": \"batch_abc123\",\n  \"object\": \"batch\",\n  \"endpoint\": \"/v1/chat/completions\",\n  \"errors\": null,\n  \"input_file_id\": \"file-abc123\",\n  \"completion_window\": \"24h\",\n  \"status\": \"validating\",\n  \"output_file_id\": null,\n  \"error_file_id\": null,\n  \"created_at\": 1711471533,\n  \"in_progress_at\": null,\n  \"expires_at\": null,\n  \"finalizing_at\": null,\n  \"completed_at\": null,\n  \"failed_at\": null,\n  \"expired_at\": null,\n  \"cancelling_at\": null,\n  \"cancelled_at\": null,\n  \"request_counts\": {\n    \"total\": 0,\n    \"completed\": 0,\n    \"failed\": 0\n  },\n  \"metadata\": {\n    \"customer_id\": \"user_123456789\",\n    \"batch_description\": \"Nightly eval job\",\n  }\n}"},{"title":"Retrieve batch","method":"get","path":"https://api.openai.com/v1/batches/{batch_id}","summary":"Retrieves a batch.","parameters":{"batch-retrieve__table":[{"name":"batch_id","type":"string","required":true,"description":"The ID of the batch to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/batches/batch_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n\n{\n  \"id\": \"batch_abc123\",\n  \"object\": \"batch\",\n  \"endpoint\": \"/v1/completions\",\n  \"errors\": null,\n  \"input_file_id\": \"file-abc123\",\n  \"completion_window\": \"24h\",\n  \"status\": \"completed\",\n  \"output_file_id\": \"file-cvaTdG\",\n  \"error_file_id\": \"file-HOWS94\",\n  \"created_at\": 1711471533,\n  \"in_progress_at\": 1711471538,\n  \"expires_at\": 1711557933,\n  \"finalizing_at\": 1711493133,\n  \"completed_at\": 1711493163,\n  \"failed_at\": null,\n  \"expired_at\": null,\n  \"cancelling_at\": null,\n  \"cancelled_at\": null,\n  \"request_counts\": {\n    \"total\": 100,\n    \"completed\": 95,\n    \"failed\": 5\n  },\n  \"metadata\": {\n    \"customer_id\": \"user_123456789\",\n    \"batch_description\": \"Nightly eval job\",\n  }\n}"},{"title":"Cancel batch","method":"post","path":"https://api.openai.com/v1/batches/{batch_id}/cancel","summary":"Cancels an in-progress batch. The batch will be in status cancelling for up to 10 minutes, before changing to cancelled, where it will have partial results (if any) available in the output file.","parameters":{"batch-cancel__table":[{"name":"batch_id","type":"string","required":true,"description":"The ID of the batch to cancel."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/batches/batch_abc123/cancel \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -X POST","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n\n{\n  \"id\": \"batch_abc123\",\n  \"object\": \"batch\",\n  \"endpoint\": \"/v1/chat/completions\",\n  \"errors\": null,\n  \"input_file_id\": \"file-abc123\",\n  \"completion_window\": \"24h\",\n  \"status\": \"cancelling\",\n  \"output_file_id\": null,\n  \"error_file_id\": null,\n  \"created_at\": 1711471533,\n  \"in_progress_at\": 1711471538,\n  \"expires_at\": 1711557933,\n  \"finalizing_at\": null,\n  \"completed_at\": null,\n  \"failed_at\": null,\n  \"expired_at\": null,\n  \"cancelling_at\": 1711475133,\n  \"cancelled_at\": null,\n  \"request_counts\": {\n    \"total\": 100,\n    \"completed\": 23,\n    \"failed\": 1\n  },\n  \"metadata\": {\n    \"customer_id\": \"user_123456789\",\n    \"batch_description\": \"Nightly eval job\",\n  }\n}"},{"title":"List batch","method":"get","path":"https://api.openai.com/v1/batches","summary":"List your organization's batches.","parameters":{"batch-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/batches?limit=2 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"batch_abc123\",\n      \"object\": \"batch\",\n      \"endpoint\": \"/v1/chat/completions\",\n      \"errors\": null,\n      \"input_file_id\": \"file-abc123\",\n      \"completion_window\": \"24h\",\n      \"status\": \"completed\",\n      \"output_file_id\": \"file-cvaTdG\",\n      \"error_file_id\": \"file-HOWS94\",\n      \"created_at\": 1711471533,\n      \"in_progress_at\": 1711471538,\n      \"expires_at\": 1711557933,\n      \"finalizing_at\": 1711493133,\n      \"completed_at\": 1711493163,\n      \"failed_at\": null,\n      \"expired_at\": null,\n      \"cancelling_at\": null,\n      \"cancelled_at\": null,\n      \"request_counts\": {\n        \"total\": 100,\n        \"completed\": 95,\n        \"failed\": 5\n      },\n      \"metadata\": {\n        \"customer_id\": \"user_123456789\",\n        \"batch_description\": \"Nightly job\",\n      }\n    },\n    { ... },\n  ],\n  \"first_id\": \"batch_abc123\",\n  \"last_id\": \"batch_abc456\",\n  \"has_more\": true\n}"},{"title":"The batch object","method":"","path":"","summary":"","parameters":{"batch/object__table":[{"name":"cancelled_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the batch was cancelled."},{"name":"cancelling_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the batch started cancelling."},{"name":"completed_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the batch was completed."},{"name":"completion_window","type":"string","required":false,"description":"The time frame within which the batch should be processed."},{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the batch was created."},{"name":"endpoint","type":"string","required":false,"description":"The OpenAI API endpoint used by the batch."},{"name":"error_file_id","type":"string","required":false,"description":"The ID of the file containing the outputs of requests with errors."},{"name":"errors","type":"object","required":false,"description":""},{"name":"expired_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the batch expired."},{"name":"expires_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the batch will expire."},{"name":"failed_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the batch failed."},{"name":"finalizing_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the batch started finalizing."},{"name":"id","type":"string","required":false,"description":""},{"name":"in_progress_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the batch started processing."},{"name":"input_file_id","type":"string","required":false,"description":"The ID of the input file for the batch."},{"name":"metadata","type":"map","required":false,"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."},{"name":"object","type":"string","required":false,"description":"The object type, which is always batch."},{"name":"output_file_id","type":"string","required":false,"description":"The ID of the file containing the outputs of successfully executed requests."},{"name":"request_counts","type":"object","required":false,"description":"The request counts for different statuses within the batch."},{"name":"status","type":"string","required":false,"description":"The current status of the batch."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The request input object","method":"","path":"","summary":"","parameters":{"batch/request-input__table":[{"name":"custom_id","type":"string","required":false,"description":"A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch."},{"name":"method","type":"string","required":false,"description":"The HTTP method to be used for the request. Currently only POST is supported."},{"name":"url","type":"string","required":false,"description":"The OpenAI API relative URL to be used for the request. Currently /v1/chat/completions, /v1/embeddings, and /v1/completions are supported."}]},"returns":"","exampleRequest":"{\"custom_id\": \"request-1\", \"method\": \"POST\", \"url\": \"/v1/chat/completions\", \"body\": {\"model\": \"gpt-4o-mini\", \"messages\": [{\"role\": \"system\", \"content\": \"You are a helpful assistant.\"}, {\"role\": \"user\", \"content\": \"What is 2+2?\"}]}}","exampleResponse":""},{"title":"The request output object","method":"","path":"","summary":"","parameters":{"batch/request-output__table":[{"name":"custom_id","type":"string","required":false,"description":"A developer-provided per-request id that will be used to match outputs to inputs."},{"name":"error","type":"object or null","required":false,"description":"For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure."},{"name":"id","type":"string","required":false,"description":""},{"name":"response","type":"object or null","required":false,"description":""}]},"returns":"","exampleRequest":"{\"id\": \"batch_req_wnaDys\", \"custom_id\": \"request-2\", \"response\": {\"status_code\": 200, \"request_id\": \"req_c187b3\", \"body\": {\"id\": \"chatcmpl-9758Iw\", \"object\": \"chat.completion\", \"created\": 1711475054, \"model\": \"gpt-4o-mini\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"2 + 2 equals 4.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 24, \"completion_tokens\": 15, \"total_tokens\": 39}, \"system_fingerprint\": null}}, \"error\": null}","exampleResponse":""},{"title":"Files","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Upload file","method":"post","path":"https://api.openai.com/v1/files","summary":"Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 100 GB.","parameters":{"files-create__table":[{"name":"file","type":"file","required":true,"description":"The File object (not file name) to be uploaded."},{"name":"purpose","type":"string","required":true,"description":"The intended purpose of the uploaded file. One of: - assistants: Used in the Assistants API - batch: Used in the Batch API - fine-tune: Used for fine-tuning - vision: Images used for vision fine-tuning - user_data: Flexible file type for any purpose - evals: Used for eval data sets"}]},"returns":"file","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/files \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -F purpose=\"fine-tune\" \\\n  -F file=\"@mydata.jsonl\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"file\",\n  \"bytes\": 120000,\n  \"created_at\": 1677610602,\n  \"filename\": \"mydata.jsonl\",\n  \"purpose\": \"fine-tune\",\n}"},{"title":"List files","method":"get","path":"https://api.openai.com/v1/files","summary":"Returns a list of files.","parameters":{"files-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"10000","description":"A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."},{"name":"purpose","type":"string","required":false,"description":"Only return files with the given purpose."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/files \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n\n{\n  \"data\": [\n    {\n      \"id\": \"file-abc123\",\n      \"object\": \"file\",\n      \"bytes\": 175,\n      \"created_at\": 1613677385,\n      \"filename\": \"salesOverview.pdf\",\n      \"purpose\": \"assistants\",\n    },\n    {\n      \"id\": \"file-abc123\",\n      \"object\": \"file\",\n      \"bytes\": 140,\n      \"created_at\": 1613779121,\n      \"filename\": \"puppy.jsonl\",\n      \"purpose\": \"fine-tune\",\n    }\n  ],\n  \"object\": \"list\"\n}"},{"title":"Retrieve file","method":"get","path":"https://api.openai.com/v1/files/{file_id}","summary":"Returns information about a specific file.","parameters":{"files-retrieve__table":[{"name":"file_id","type":"string","required":true,"description":"The ID of the file to use for this request."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/files/file-abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"file\",\n  \"bytes\": 120000,\n  \"created_at\": 1677610602,\n  \"filename\": \"mydata.jsonl\",\n  \"purpose\": \"fine-tune\",\n}"},{"title":"Delete file","method":"delete","path":"https://api.openai.com/v1/files/{file_id}","summary":"Delete a file.","parameters":{"files-delete__table":[{"name":"file_id","type":"string","required":true,"description":"The ID of the file to use for this request."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/files/file-abc123 \\\n  -X DELETE \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"file\",\n  \"deleted\": true\n}"},{"title":"Retrieve file content","method":"get","path":"https://api.openai.com/v1/files/{file_id}/content","summary":"Returns the contents of the specified file.","parameters":{"files-retrieve-contents__table":[{"name":"file_id","type":"string","required":true,"description":"The ID of the file to use for this request."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/files/file-abc123/content \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" > file.jsonl","exampleResponse":""},{"title":"The file object","method":"","path":"","summary":"","parameters":{"files/object__table":[{"name":"bytes","type":"integer","required":false,"description":"The size of the file, in bytes."},{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the file was created."},{"name":"expires_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the file will expire."},{"name":"filename","type":"string","required":false,"description":"The name of the file."},{"name":"id","type":"string","required":false,"description":"The file identifier, which can be referenced in the API endpoints."},{"name":"object","type":"string","required":false,"description":"The object type, which is always file."},{"name":"purpose","type":"string","required":false,"description":"The intended purpose of the file. Supported values are assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results and vision."},{"name":"status","type":"string","required":false,"description":"Deprecated. The current status of the file, which can be either uploaded, processed, or error."},{"name":"status_details","type":"string","required":false,"description":"Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Uploads","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create upload","method":"post","path":"https://api.openai.com/v1/uploads","summary":"Creates an intermediate Upload object\nthat you can add Parts to.\nCurrently, an Upload can accept at most 8 GB in total and expires after an\nhour after you create it.","parameters":{"uploads-create__table":[{"name":"bytes","type":"integer","required":true,"description":"The number of bytes in the file you are uploading."},{"name":"filename","type":"string","required":true,"description":"The name of the file to upload."},{"name":"mime_type","type":"string","required":true,"description":"The MIME type of the file. This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision."},{"name":"purpose","type":"string","required":true,"description":"The intended purpose of the uploaded file. See the documentation on File purposes."}]},"returns":"integer","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n\ncurl https://api.openai.com/v1/uploads \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"purpose\": \"fine-tune\",\n    \"filename\": \"training_examples.jsonl\",\n    \"bytes\": 2147483648,\n    \"mime_type\": \"text/jsonl\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"id\": \"upload_abc123\",\n  \"object\": \"upload\",\n  \"bytes\": 2147483648,\n  \"created_at\": 1719184911,\n  \"filename\": \"training_examples.jsonl\",\n  \"purpose\": \"fine-tune\",\n  \"status\": \"pending\",\n  \"expires_at\": 1719127296\n}"},{"title":"Add upload part","method":"post","path":"https://api.openai.com/v1/uploads/{upload_id}/parts","summary":"Adds a Part to an Upload object. A Part represents a chunk of bytes from the file you are trying to upload.","parameters":{"uploads-add-part__table":[{"name":"data","type":"file","required":true,"description":"The chunk of bytes for this Part."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/uploads/upload_abc123/parts\n  -F data=\"aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS91cGxvYWRz...\"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"id\": \"part_def456\",\n  \"object\": \"upload.part\",\n  \"created_at\": 1719185911,\n  \"upload_id\": \"upload_abc123\"\n}"},{"title":"Complete upload","method":"post","path":"https://api.openai.com/v1/uploads/{upload_id}/complete","summary":"Completes the Upload.","parameters":{"uploads-complete__table":[{"name":"part_ids","type":"array","required":true,"description":"The ordered list of Part IDs."},{"name":"md5","type":"string","required":false,"description":"The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/uploads/upload_abc123/complete\n  -d '{\n    \"part_ids\": [\"part_def456\", \"part_ghi789\"]\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n\n{\n  \"id\": \"upload_abc123\",\n  \"object\": \"upload\",\n  \"bytes\": 2147483648,\n  \"created_at\": 1719184911,\n  \"filename\": \"training_examples.jsonl\",\n  \"purpose\": \"fine-tune\",\n  \"status\": \"completed\",\n  \"expires_at\": 1719127296,\n  \"file\": {\n    \"id\": \"file-xyz321\",\n    \"object\": \"file\",\n    \"bytes\": 2147483648,\n    \"created_at\": 1719186911,\n    \"filename\": \"training_examples.jsonl\",\n    \"purpose\": \"fine-tune\",\n  }\n}"},{"title":"Cancel upload","method":"post","path":"https://api.openai.com/v1/uploads/{upload_id}/cancel","summary":"Cancels the Upload. No Parts may be added after an Upload is cancelled.","parameters":{"uploads-cancel__table":[{"name":"upload_id","type":"string","required":true,"description":"The ID of the Upload."}]},"returns":"string","exampleRequest":"curl https://api.openai.com/v1/uploads/upload_abc123/cancel","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"id\": \"upload_abc123\",\n  \"object\": \"upload\",\n  \"bytes\": 2147483648,\n  \"created_at\": 1719184911,\n  \"filename\": \"training_examples.jsonl\",\n  \"purpose\": \"fine-tune\",\n  \"status\": \"cancelled\",\n  \"expires_at\": 1719127296\n}"},{"title":"The upload object","method":"","path":"","summary":"","parameters":{"uploads/object__table":[{"name":"bytes","type":"integer","required":false,"description":"The intended number of bytes to be uploaded."},{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the Upload was created."},{"name":"expires_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the Upload will expire."},{"name":"file","type":"undefined or null","required":false,"description":"The ready File object after the Upload is completed."},{"name":"filename","type":"string","required":false,"description":"The name of the file to be uploaded."},{"name":"id","type":"string","required":false,"description":"The Upload unique identifier, which can be referenced in API endpoints."},{"name":"object","type":"string","required":false,"description":"The object type, which is always \"upload\"."},{"name":"purpose","type":"string","required":false,"description":"The intended purpose of the file. Please refer here for acceptable values."},{"name":"status","type":"string","required":false,"description":"The status of the Upload."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The upload part object","method":"","path":"","summary":"","parameters":{"uploads/part-object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the Part was created."},{"name":"id","type":"string","required":false,"description":"The upload Part unique identifier, which can be referenced in API endpoints."},{"name":"object","type":"string","required":false,"description":"The object type, which is always upload.part."},{"name":"upload_id","type":"string","required":false,"description":"The ID of the Upload object that this Part was added to."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Models","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List models","method":"get","path":"https://api.openai.com/v1/models","summary":"Lists the currently available models, and provides basic information about each one such as the owner and availability.","parameters":{},"returns":"A list of model objects.","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/models \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"model-id-0\",\n      \"object\": \"model\",\n      \"created\": 1686935002,\n      \"owned_by\": \"organization-owner\"\n    },\n    {\n      \"id\": \"model-id-1\",\n      \"object\": \"model\",\n      \"created\": 1686935002,\n      \"owned_by\": \"organization-owner\",\n    },\n    {\n      \"id\": \"model-id-2\",\n      \"object\": \"model\",\n      \"created\": 1686935002,\n      \"owned_by\": \"openai\"\n    },\n  ],\n  \"object\": \"list\"\n}"},{"title":"Retrieve model","method":"get","path":"https://api.openai.com/v1/models/{model}","summary":"Retrieves a model instance, providing basic information about the model such as the owner and permissioning.","parameters":{"models-retrieve__table":[{"name":"model","type":"string","required":true,"description":"The ID of the model to use for this request"}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/models/gpt-4.1 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n\n{\n  \"id\": \"gpt-4.1\",\n  \"object\": \"model\",\n  \"created\": 1686935002,\n  \"owned_by\": \"openai\"\n}"},{"title":"Delete a fine-tuned model","method":"delete","path":"https://api.openai.com/v1/models/{model}","summary":"Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.","parameters":{"models-delete__table":[{"name":"model","type":"string","required":true,"description":"The model to delete"}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/models/ft:gpt-4o-mini:acemeco:suffix:abc123 \\\n  -X DELETE \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"id\": \"ft:gpt-4o-mini:acemeco:suffix:abc123\",\n  \"object\": \"model\",\n  \"deleted\": true\n}"},{"title":"The model object","method":"","path":"","summary":"","parameters":{"models/object__table":[{"name":"created","type":"integer","required":false,"description":"The Unix timestamp (in seconds) when the model was created."},{"name":"id","type":"string","required":false,"description":"The model identifier, which can be referenced in the API endpoints."},{"name":"object","type":"string","required":false,"description":"The object type, which is always \"model\"."},{"name":"owned_by","type":"string","required":false,"description":"The organization that owns the model."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Moderations","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create moderation","method":"post","path":"https://api.openai.com/v1/moderations","summary":"Classifies if text and/or image inputs are potentially harmful. Learn\nmore in the moderation guide.","parameters":{"moderations-create__table":[{"name":"input","type":"string or array","required":true,"description":"Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models."},{"name":"model","type":"string","required":false,"default":"omni-moderation-latest","description":"The content moderation model you would like to use. Learn more in the moderation guide, and learn about available models here."}]},"returns":"string or array","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl https://api.openai.com/v1/moderations \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"input\": \"I want to kill them.\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n\n{\n  \"id\": \"modr-AB8CjOTu2jiq12hp1AQPfeqFWaORR\",\n  \"model\": \"text-moderation-007\",\n  \"results\": [\n    {\n      \"flagged\": true,\n      \"categories\": {\n        \"sexual\": false,\n        \"hate\": false,\n        \"harassment\": true,\n        \"self-harm\": false,\n        \"sexual/minors\": false,\n        \"hate/threatening\": false,\n        \"violence/graphic\": false,\n        \"self-harm/intent\": false,\n        \"self-harm/instructions\": false,\n        \"harassment/threatening\": true,\n        \"violence\": true\n      },\n      \"category_scores\": {\n        \"sexual\": 0.000011726012417057063,\n        \"hate\": 0.22706663608551025,\n        \"harassment\": 0.5215635299682617,\n        \"self-harm\": 2.227119921371923e-6,\n        \"sexual/minors\": 7.107352217872176e-8,\n        \"hate/threatening\": 0.023547329008579254,\n        \"violence/graphic\": 0.00003391829886822961,\n        \"self-harm/intent\": 1.646940972932498e-6,\n        \"self-harm/instructions\": 1.1198755256458526e-9,\n        \"harassment/threatening\": 0.5694745779037476,\n        \"violence\": 0.9971134662628174\n      }\n    }\n  ]\n}"},{"title":"The moderation object","method":"","path":"","summary":"","parameters":{"moderations/object__table":[{"name":"id","type":"string","required":false,"description":"The unique identifier for the moderation request."},{"name":"model","type":"string","required":false,"description":"The model used to generate the moderation results."},{"name":"results","type":"array","required":false,"description":"A list of moderation objects."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Vector stores","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create vector store","method":"post","path":"https://api.openai.com/v1/vector_stores","summary":"Create a vector store.","parameters":{"vector-stores-create__table":[{"name":"chunking_strategy","type":"object","required":false,"description":"The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty."},{"name":"expires_after","type":"object","required":false,"description":"The expiration policy for a vector store."},{"name":"file_ids","type":"array","required":false,"description":"A list of File IDs that the vector store should use. Useful for tools like file_search that can access files."},{"name":"metadata","type":"map","required":false,"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."},{"name":"name","type":"string","required":false,"description":"The name of the vector store."}]},"returns":"object","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n\ncurl https://api.openai.com/v1/vector_stores \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n    \"name\": \"Support FAQ\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n{\n  \"id\": \"vs_abc123\",\n  \"object\": \"vector_store\",\n  \"created_at\": 1699061776,\n  \"name\": \"Support FAQ\",\n  \"bytes\": 139920,\n  \"file_counts\": {\n    \"in_progress\": 0,\n    \"completed\": 3,\n    \"failed\": 0,\n    \"cancelled\": 0,\n    \"total\": 3\n  }\n}"},{"title":"List vector stores","method":"get","path":"https://api.openai.com/v1/vector_stores","summary":"Returns a list of vector stores.","parameters":{"vector-stores-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"before","type":"string","required":false,"description":"A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/vector_stores \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"vs_abc123\",\n      \"object\": \"vector_store\",\n      \"created_at\": 1699061776,\n      \"name\": \"Support FAQ\",\n      \"bytes\": 139920,\n      \"file_counts\": {\n        \"in_progress\": 0,\n        \"completed\": 3,\n        \"failed\": 0,\n        \"cancelled\": 0,\n        \"total\": 3\n      }\n    },\n    {\n      \"id\": \"vs_abc456\",\n      \"object\": \"vector_store\",\n      \"created_at\": 1699061776,\n      \"name\": \"Support FAQ v2\",\n      \"bytes\": 139920,\n      \"file_counts\": {\n        \"in_progress\": 0,\n        \"completed\": 3,\n        \"failed\": 0,\n        \"cancelled\": 0,\n        \"total\": 3\n      }\n    }\n  ],\n  \"first_id\": \"vs_abc123\",\n  \"last_id\": \"vs_abc456\",\n  \"has_more\": false\n}"},{"title":"Retrieve vector store","method":"get","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}","summary":"Retrieves a vector store.","parameters":{"vector-stores-retrieve__table":[{"name":"vector_store_id","type":"string","required":true,"description":"The ID of the vector store to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"id\": \"vs_abc123\",\n  \"object\": \"vector_store\",\n  \"created_at\": 1699061776\n}"},{"title":"Modify vector store","method":"post","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}","summary":"Modifies a vector store.","parameters":{"vector-stores-modify__table":[{"name":"expires_after","type":"object or null","required":false,"description":"The expiration policy for a vector store."},{"name":"metadata","type":"map","required":false,"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."},{"name":"name","type":"string or null","required":false,"description":"The name of the vector store."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"\n  -d '{\n    \"name\": \"Support FAQ\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n{\n  \"id\": \"vs_abc123\",\n  \"object\": \"vector_store\",\n  \"created_at\": 1699061776,\n  \"name\": \"Support FAQ\",\n  \"bytes\": 139920,\n  \"file_counts\": {\n    \"in_progress\": 0,\n    \"completed\": 3,\n    \"failed\": 0,\n    \"cancelled\": 0,\n    \"total\": 3\n  }\n}"},{"title":"Delete vector store","method":"delete","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}","summary":"Delete a vector store.","parameters":{"vector-stores-delete__table":[{"name":"vector_store_id","type":"string","required":true,"description":"The ID of the vector store to delete."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -X DELETE","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  id: \"vs_abc123\",\n  object: \"vector_store.deleted\",\n  deleted: true\n}"},{"title":"Search vector store","method":"post","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/search","summary":"Search a vector store for relevant chunks based on a query and file attributes filter.","parameters":{"vector-stores-search__table":[{"name":"query","type":"string or array","required":true,"description":"A query string for a search"},{"name":"filters","type":"object","required":false,"description":"A filter to apply based on file attributes."},{"name":"max_num_results","type":"integer","required":false,"default":"10","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive."},{"name":"ranking_options","type":"object","required":false,"description":"Ranking options for search."},{"name":"rewrite_query","type":"boolean","required":false,"default":"false","description":"Whether to rewrite the natural language query for vector search."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n\ncurl -X POST \\\nhttps://api.openai.com/v1/vector_stores/vs_abc123/search \\\n-H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\"query\": \"What is the return policy?\", \"filters\": {...}}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n\n{\n  \"object\": \"vector_store.search_results.page\",\n  \"search_query\": \"What is the return policy?\",\n  \"data\": [\n    {\n      \"file_id\": \"file_123\",\n      \"filename\": \"document.pdf\",\n      \"score\": 0.95,\n      \"attributes\": {\n        \"author\": \"John Doe\",\n        \"date\": \"2023-01-01\"\n      },\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"Relevant chunk\"\n        }\n      ]\n    },\n    {\n      \"file_id\": \"file_456\",\n      \"filename\": \"notes.txt\",\n      \"score\": 0.89,\n      \"attributes\": {\n        \"author\": \"Jane Smith\",\n        \"date\": \"2023-01-02\"\n      },\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"Sample text content from the vector store.\"\n        }\n      ]\n    }\n  ],\n  \"has_more\": false,\n  \"next_page\": null\n}"},{"title":"The vector store object","method":"","path":"","summary":"","parameters":{"vector-stores/object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the vector store was created."},{"name":"expires_after","type":"object","required":false,"description":"The expiration policy for a vector store."},{"name":"expires_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the vector store will expire."},{"name":"file_counts","type":"object","required":false,"description":""},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints."},{"name":"last_active_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the vector store was last active."},{"name":"metadata","type":"map","required":false,"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."},{"name":"name","type":"string","required":false,"description":"The name of the vector store."},{"name":"object","type":"string","required":false,"description":"The object type, which is always vector_store."},{"name":"status","type":"string","required":false,"description":"The status of the vector store, which can be either expired, in_progress, or completed. A status of completed indicates that the vector store is ready for use."},{"name":"usage_bytes","type":"integer","required":false,"description":"The total number of bytes used by the files in the vector store."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Vector store files","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create vector store file","method":"post","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/files","summary":"Create a vector store file by attaching a File to a vector store.","parameters":{"vector-stores-files-createfile__table":[{"name":"file_id","type":"string","required":true,"description":"A File ID that the vector store should use. Useful for tools like file_search that can access files."},{"name":"attributes","type":"map","required":false,"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."},{"name":"chunking_strategy","type":"object","required":false,"description":"The chunking strategy used to chunk the file(s). If not set, will use the auto strategy."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123/files \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"OpenAI-Beta: assistants=v2\" \\\n    -d '{\n      \"file_id\": \"file-abc123\"\n    }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"vector_store.file\",\n  \"created_at\": 1699061776,\n  \"usage_bytes\": 1234,\n  \"vector_store_id\": \"vs_abcd\",\n  \"status\": \"completed\",\n  \"last_error\": null\n}"},{"title":"List vector store files","method":"get","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/files","summary":"Returns a list of vector store files.","parameters":{"vector-stores-files-listfiles__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"before","type":"string","required":false,"description":"A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list."},{"name":"filter","type":"string","required":false,"description":"Filter by file status. One of in_progress, completed, failed, cancelled."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123/files \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"file-abc123\",\n      \"object\": \"vector_store.file\",\n      \"created_at\": 1699061776,\n      \"vector_store_id\": \"vs_abc123\"\n    },\n    {\n      \"id\": \"file-abc456\",\n      \"object\": \"vector_store.file\",\n      \"created_at\": 1699061776,\n      \"vector_store_id\": \"vs_abc123\"\n    }\n  ],\n  \"first_id\": \"file-abc123\",\n  \"last_id\": \"file-abc456\",\n  \"has_more\": false\n}"},{"title":"Retrieve vector store file","method":"get","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id}","summary":"Retrieves a vector store file.","parameters":{"vector-stores-files-getfile__table":[{"name":"file_id","type":"string","required":true,"description":"The ID of the file being retrieved."},{"name":"vector_store_id","type":"string","required":true,"description":"The ID of the vector store that the file belongs to."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"vector_store.file\",\n  \"created_at\": 1699061776,\n  \"vector_store_id\": \"vs_abcd\",\n  \"status\": \"completed\",\n  \"last_error\": null\n}"},{"title":"Retrieve vector store file content","method":"get","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id}/content","summary":"Retrieve the parsed contents of a vector store file.","parameters":{"vector-stores-files-getcontent__table":[{"name":"file_id","type":"string","required":true,"description":"The ID of the file within the vector store."},{"name":"vector_store_id","type":"string","required":true,"description":"The ID of the vector store."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl \\\nhttps://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123/content \\\n-H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n  \"file_id\": \"file-abc123\",\n  \"filename\": \"example.txt\",\n  \"attributes\": {\"key\": \"value\"},\n  \"content\": [\n    {\"type\": \"text\", \"text\": \"...\"},\n    ...\n  ]\n}"},{"title":"Update vector store file attributes","method":"post","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id}","summary":"Update attributes on a vector store file.","parameters":{"vector-stores-files-updateattributes__table":[{"name":"attributes","type":"map","required":true,"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."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id} \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"attributes\": {\"key1\": \"value1\", \"key2\": 2}}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"vector_store.file\",\n  \"usage_bytes\": 1234,\n  \"created_at\": 1699061776,\n  \"vector_store_id\": \"vs_abcd\",\n  \"status\": \"completed\",\n  \"last_error\": null,\n  \"chunking_strategy\": {...},\n  \"attributes\": {\"key1\": \"value1\", \"key2\": 2}\n}"},{"title":"Delete vector store file","method":"delete","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/files/{file_id}","summary":"Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the delete file endpoint.","parameters":{"vector-stores-files-deletefile__table":[{"name":"file_id","type":"string","required":true,"description":"The ID of the file to delete."},{"name":"vector_store_id","type":"string","required":true,"description":"The ID of the vector store that the file belongs to."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -X DELETE","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  id: \"file-abc123\",\n  object: \"vector_store.file.deleted\",\n  deleted: true\n}"},{"title":"The vector store file objectBeta","method":"","path":"","summary":"","parameters":{"vector-stores-files/file-object__table":[{"name":"attributes","type":"map","required":false,"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."},{"name":"chunking_strategy","type":"object","required":false,"description":"The strategy used to chunk the file."},{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the vector store file was created."},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints."},{"name":"last_error","type":"object or null","required":false,"description":"The last error associated with this vector store file. Will be null if there are no errors."},{"name":"object","type":"string","required":false,"description":"The object type, which is always vector_store.file."},{"name":"status","type":"string","required":false,"description":"The status of the vector store file, which can be either in_progress, completed, cancelled, or failed. The status completed indicates that the vector store file is ready for use."},{"name":"usage_bytes","type":"integer","required":false,"description":"The total vector store usage in bytes. Note that this may be different from the original file size."},{"name":"vector_store_id","type":"string","required":false,"description":"The ID of the vector store that the File is attached to."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Vector store file batches","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create vector store file batch","method":"post","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/file_batches","summary":"Create a vector store file batch.","parameters":{"vector-stores-file-batches-createbatch__table":[{"name":"file_ids","type":"array","required":true,"description":"A list of File IDs that the vector store should use. Useful for tools like file_search that can access files."},{"name":"attributes","type":"map","required":false,"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."},{"name":"chunking_strategy","type":"object","required":false,"description":"The chunking strategy used to chunk the file(s). If not set, will use the auto strategy."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123/file_batches \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -H \"Content-Type: application/json \\\n    -H \"OpenAI-Beta: assistants=v2\" \\\n    -d '{\n      \"file_ids\": [\"file-abc123\", \"file-abc456\"]\n    }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n{\n  \"id\": \"vsfb_abc123\",\n  \"object\": \"vector_store.file_batch\",\n  \"created_at\": 1699061776,\n  \"vector_store_id\": \"vs_abc123\",\n  \"status\": \"in_progress\",\n  \"file_counts\": {\n    \"in_progress\": 1,\n    \"completed\": 1,\n    \"failed\": 0,\n    \"cancelled\": 0,\n    \"total\": 0,\n  }\n}"},{"title":"Retrieve vector store file batch","method":"get","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}","summary":"Retrieves a vector store file batch.","parameters":{"vector-stores-file-batches-getbatch__table":[{"name":"batch_id","type":"string","required":true,"description":"The ID of the file batch being retrieved."},{"name":"vector_store_id","type":"string","required":true,"description":"The ID of the vector store that the file batch belongs to."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n{\n  \"id\": \"vsfb_abc123\",\n  \"object\": \"vector_store.file_batch\",\n  \"created_at\": 1699061776,\n  \"vector_store_id\": \"vs_abc123\",\n  \"status\": \"in_progress\",\n  \"file_counts\": {\n    \"in_progress\": 1,\n    \"completed\": 1,\n    \"failed\": 0,\n    \"cancelled\": 0,\n    \"total\": 0,\n  }\n}"},{"title":"Cancel vector store file batch","method":"post","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel","summary":"Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.","parameters":{"vector-stores-file-batches-cancelbatch__table":[{"name":"batch_id","type":"string","required":true,"description":"The ID of the file batch to cancel."},{"name":"vector_store_id","type":"string","required":true,"description":"The ID of the vector store that the file batch belongs to."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/cancel \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -X POST","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n{\n  \"id\": \"vsfb_abc123\",\n  \"object\": \"vector_store.file_batch\",\n  \"created_at\": 1699061776,\n  \"vector_store_id\": \"vs_abc123\",\n  \"status\": \"in_progress\",\n  \"file_counts\": {\n    \"in_progress\": 12,\n    \"completed\": 3,\n    \"failed\": 0,\n    \"cancelled\": 0,\n    \"total\": 15,\n  }\n}"},{"title":"List vector store files in a batch","method":"get","path":"https://api.openai.com/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files","summary":"Returns a list of vector store files in a batch.","parameters":{"vector-stores-file-batches-listbatchfiles__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"before","type":"string","required":false,"description":"A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list."},{"name":"filter","type":"string","required":false,"description":"Filter by file status. One of in_progress, completed, failed, cancelled."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/files \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"file-abc123\",\n      \"object\": \"vector_store.file\",\n      \"created_at\": 1699061776,\n      \"vector_store_id\": \"vs_abc123\"\n    },\n    {\n      \"id\": \"file-abc456\",\n      \"object\": \"vector_store.file\",\n      \"created_at\": 1699061776,\n      \"vector_store_id\": \"vs_abc123\"\n    }\n  ],\n  \"first_id\": \"file-abc123\",\n  \"last_id\": \"file-abc456\",\n  \"has_more\": false\n}"},{"title":"The vector store files batch objectBeta","method":"","path":"","summary":"","parameters":{"vector-stores-file-batches/batch-object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the vector store files batch was created."},{"name":"file_counts","type":"object","required":false,"description":""},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints."},{"name":"object","type":"string","required":false,"description":"The object type, which is always vector_store.file_batch."},{"name":"status","type":"string","required":false,"description":"The status of the vector store files batch, which can be either in_progress, completed, cancelled or failed."},{"name":"vector_store_id","type":"string","required":false,"description":"The ID of the vector store that the File is attached to."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Containers","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create container","method":"post","path":"https://api.openai.com/v1/containers","summary":"Create Container","parameters":{"containers-createcontainers__table":[{"name":"name","type":"string","required":true,"description":"Name of the container to create."},{"name":"expires_after","type":"object","required":false,"description":"Container expiration time in seconds relative to the 'anchor' time."},{"name":"file_ids","type":"array","required":false,"description":"IDs of files to copy to the container."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl https://api.openai.com/v1/containers \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n        \"name\": \"My Container\"\n      }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n    \"id\": \"cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591\",\n    \"object\": \"container\",\n    \"created_at\": 1747857508,\n    \"status\": \"running\",\n    \"expires_after\": {\n        \"anchor\": \"last_active_at\",\n        \"minutes\": 20\n    },\n    \"last_active_at\": 1747857508,\n    \"name\": \"My Container\"\n}"},{"title":"List containers","method":"get","path":"https://api.openai.com/v1/containers","summary":"List Containers","parameters":{"containers-listcontainers__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/containers \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n        \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n        \"object\": \"container\",\n        \"created_at\": 1747844794,\n        \"status\": \"running\",\n        \"expires_after\": {\n            \"anchor\": \"last_active_at\",\n            \"minutes\": 20\n        },\n        \"last_active_at\": 1747844794,\n        \"name\": \"My Container\"\n    }\n  ],\n  \"first_id\": \"container_123\",\n  \"last_id\": \"container_123\",\n  \"has_more\": false\n}"},{"title":"Retrieve container","method":"get","path":"https://api.openai.com/v1/containers/{container_id}","summary":"Retrieve Container","parameters":{"containers-retrievecontainer__table":[{"name":"container_id","type":"string","required":true,"description":""}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\n{\n    \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n    \"object\": \"container\",\n    \"created_at\": 1747844794,\n    \"status\": \"running\",\n    \"expires_after\": {\n        \"anchor\": \"last_active_at\",\n        \"minutes\": 20\n    },\n    \"last_active_at\": 1747844794,\n    \"name\": \"My Container\"\n}"},{"title":"Delete a container","method":"delete","path":"https://api.openai.com/v1/containers/{container_id}","summary":"Delete Container","parameters":{"containers-deletecontainer__table":[{"name":"container_id","type":"string","required":true,"description":"The ID of the container to delete."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n    \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n    \"object\": \"container.deleted\",\n    \"deleted\": true\n}"},{"title":"The container object","method":"","path":"","summary":"","parameters":{"containers/object__table":[{"name":"created_at","type":"integer","required":false,"description":"Unix timestamp (in seconds) when the container was created."},{"name":"expires_after","type":"object","required":false,"description":"The container will expire after this time period. The anchor is the reference point for the expiration. The minutes is the number of minutes after the anchor before the container expires."},{"name":"id","type":"string","required":false,"description":"Unique identifier for the container."},{"name":"name","type":"string","required":false,"description":"Name of the container."},{"name":"object","type":"string","required":false,"description":"The type of this object."},{"name":"status","type":"string","required":false,"description":"Status of the container (e.g., active, deleted)."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Container Files","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create container file","method":"post","path":"https://api.openai.com/v1/containers/{container_id}/files","summary":"Create a Container File","parameters":{"container-files-createcontainerfile__table":[{"name":"file","type":"file","required":false,"description":"The File object (not file name) to be uploaded."},{"name":"file_id","type":"string","required":false,"description":"Name of the file to create."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -F file=\"@example.txt\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n  \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n  \"object\": \"container.file\",\n  \"created_at\": 1747848842,\n  \"bytes\": 880,\n  \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n  \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n  \"source\": \"user\"\n}"},{"title":"List container files","method":"get","path":"https://api.openai.com/v1/containers/{container_id}/files","summary":"List Container files","parameters":{"container-files-listcontainerfiles__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n\n{\n    \"object\": \"list\",\n    \"data\": [\n        {\n            \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n            \"object\": \"container.file\",\n            \"created_at\": 1747848842,\n            \"bytes\": 880,\n            \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n            \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n            \"source\": \"user\"\n        }\n    ],\n    \"first_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n    \"has_more\": false,\n    \"last_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\"\n}"},{"title":"Retrieve container file","method":"get","path":"https://api.openai.com/v1/containers/{container_id}/files/{file_id}","summary":"Retrieve Container File","parameters":{"container-files-retrievecontainerfile__table":[{"name":"container_id","type":"string","required":true,"description":""},{"name":"file_id","type":"string","required":true,"description":""}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/containers/container_123/files/file_456 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\n{\n    \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n    \"object\": \"container.file\",\n    \"created_at\": 1747848842,\n    \"bytes\": 880,\n    \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n    \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n    \"source\": \"user\"\n}"},{"title":"Retrieve container file content","method":"get","path":"https://api.openai.com/v1/containers/{container_id}/files/{file_id}/content","summary":"Retrieve Container File Content","parameters":{"container-files-retrievecontainerfilecontent__table":[{"name":"container_id","type":"string","required":true,"description":""},{"name":"file_id","type":"string","required":true,"description":""}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/containers/container_123/files/cfile_456/content \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"<binary content of the file>"},{"title":"Delete a container file","method":"delete","path":"https://api.openai.com/v1/containers/{container_id}/files/{file_id}","summary":"Delete Container File","parameters":{"container-files-deletecontainerfile__table":[{"name":"container_id","type":"string","required":true,"description":""},{"name":"file_id","type":"string","required":true,"description":""}]},"returns":"string","exampleRequest":"1\n2\n\ncurl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863/files/cfile_682e0e8a43c88191a7978f477a09bdf5 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n    \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n    \"object\": \"container.file.deleted\",\n    \"deleted\": true\n}"},{"title":"The container file object","method":"","path":"","summary":"","parameters":{"container-files/object__table":[{"name":"bytes","type":"integer","required":false,"description":"Size of the file in bytes."},{"name":"container_id","type":"string","required":false,"description":"The container this file belongs to."},{"name":"created_at","type":"integer","required":false,"description":"Unix timestamp (in seconds) when the file was created."},{"name":"id","type":"string","required":false,"description":"Unique identifier for the file."},{"name":"object","type":"string","required":false,"description":"The type of this object (container.file)."},{"name":"path","type":"string","required":false,"description":"Path of the file in the container."},{"name":"source","type":"string","required":false,"description":"Source of the file (e.g., user, assistant)."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"AssistantsBeta","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create assistantBeta","method":"post","path":"https://api.openai.com/v1/assistants","summary":"Create an assistant with a model and instructions.","parameters":{"assistants-createassistant__table":[{"name":"model","type":"string","required":true,"description":"ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them."},{"name":"description","type":"string or null","required":false,"description":"The description of the assistant. The maximum length is 512 characters."},{"name":"instructions","type":"string or null","required":false,"description":"The system instructions that the assistant uses. The maximum length is 256,000 characters."},{"name":"metadata","type":"map","required":false,"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."},{"name":"name","type":"string or null","required":false,"description":"The name of the assistant. The maximum length is 256 characters."},{"name":"reasoning_effort","type":"string or null","required":false,"default":"medium","description":"o-series models only Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response."},{"name":"response_format","type":"\"auto\" or object","required":false,"description":"Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106. Setting to { \"type\": \"json_schema\", \"json_schema\": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. Setting to { \"type\": \"json_object\" } enables JSON mode, which ensures the message the model generates is valid JSON. Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if finish_reason=\"length\", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length."},{"name":"temperature","type":"number or null","required":false,"default":"1","description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."},{"name":"tool_resources","type":"object or null","required":false,"description":"A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs."},{"name":"tools","type":"array","required":false,"default":"[]","description":"A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types code_interpreter, file_search, or function."},{"name":"top_p","type":"number or null","required":false,"default":"1","description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\ncurl \"https://api.openai.com/v1/assistants\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n    \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n    \"name\": \"Math Tutor\",\n    \"tools\": [{\"type\": \"code_interpreter\"}],\n    \"model\": \"gpt-4o\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n\n{\n  \"id\": \"asst_abc123\",\n  \"object\": \"assistant\",\n  \"created_at\": 1698984975,\n  \"name\": \"Math Tutor\",\n  \"description\": null,\n  \"model\": \"gpt-4o\",\n  \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n  \"tools\": [\n    {\n      \"type\": \"code_interpreter\"\n    }\n  ],\n  \"metadata\": {},\n  \"top_p\": 1.0,\n  \"temperature\": 1.0,\n  \"response_format\": \"auto\"\n}"},{"title":"List assistantsBeta","method":"get","path":"https://api.openai.com/v1/assistants","summary":"Returns a list of assistants.","parameters":{"assistants-listassistants__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"before","type":"string","required":false,"description":"A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl \"https://api.openai.com/v1/assistants?order=desc&limit=20\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"asst_abc123\",\n      \"object\": \"assistant\",\n      \"created_at\": 1698982736,\n      \"name\": \"Coding Tutor\",\n      \"description\": null,\n      \"model\": \"gpt-4o\",\n      \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n      \"tools\": [],\n      \"tool_resources\": {},\n      \"metadata\": {},\n      \"top_p\": 1.0,\n      \"temperature\": 1.0,\n      \"response_format\": \"auto\"\n    },\n    {\n      \"id\": \"asst_abc456\",\n      \"object\": \"assistant\",\n      \"created_at\": 1698982718,\n      \"name\": \"My Assistant\",\n      \"description\": null,\n      \"model\": \"gpt-4o\",\n      \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n      \"tools\": [],\n      \"tool_resources\": {},\n      \"metadata\": {},\n      \"top_p\": 1.0,\n      \"temperature\": 1.0,\n      \"response_format\": \"auto\"\n    },\n    {\n      \"id\": \"asst_abc789\",\n      \"object\": \"assistant\",\n      \"created_at\": 1698982643,\n      \"name\": null,\n      \"description\": null,\n      \"model\": \"gpt-4o\",\n      \"instructions\": null,\n      \"tools\": [],\n      \"tool_resources\": {},\n      \"metadata\": {},\n      \"top_p\": 1.0,\n      \"temperature\": 1.0,\n      \"response_format\": \"auto\"\n    }\n  ],\n  \"first_id\": \"asst_abc123\",\n  \"last_id\": \"asst_abc789\",\n  \"has_more\": false\n}"},{"title":"Retrieve assistantBeta","method":"get","path":"https://api.openai.com/v1/assistants/{assistant_id}","summary":"Retrieves an assistant.","parameters":{"assistants-getassistant__table":[{"name":"assistant_id","type":"string","required":true,"description":"The ID of the assistant to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/assistants/asst_abc123 \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n\n{\n  \"id\": \"asst_abc123\",\n  \"object\": \"assistant\",\n  \"created_at\": 1699009709,\n  \"name\": \"HR Helper\",\n  \"description\": null,\n  \"model\": \"gpt-4o\",\n  \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n  \"tools\": [\n    {\n      \"type\": \"file_search\"\n    }\n  ],\n  \"metadata\": {},\n  \"top_p\": 1.0,\n  \"temperature\": 1.0,\n  \"response_format\": \"auto\"\n}"},{"title":"Modify assistantBeta","method":"post","path":"https://api.openai.com/v1/assistants/{assistant_id}","summary":"Modifies an assistant.","parameters":{"assistants-modifyassistant__table":[{"name":"description","type":"string or null","required":false,"description":"The description of the assistant. The maximum length is 512 characters."},{"name":"instructions","type":"string or null","required":false,"description":"The system instructions that the assistant uses. The maximum length is 256,000 characters."},{"name":"metadata","type":"map","required":false,"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."},{"name":"model","type":"string","required":false,"description":"ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them."},{"name":"name","type":"string or null","required":false,"description":"The name of the assistant. The maximum length is 256 characters."},{"name":"reasoning_effort","type":"string or null","required":false,"default":"medium","description":"o-series models only Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response."},{"name":"response_format","type":"\"auto\" or object","required":false,"description":"Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106. Setting to { \"type\": \"json_schema\", \"json_schema\": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. Setting to { \"type\": \"json_object\" } enables JSON mode, which ensures the message the model generates is valid JSON. Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if finish_reason=\"length\", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length."},{"name":"temperature","type":"number or null","required":false,"default":"1","description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."},{"name":"tool_resources","type":"object or null","required":false,"description":"A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs."},{"name":"tools","type":"array","required":false,"default":"[]","description":"A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types code_interpreter, file_search, or function."},{"name":"top_p","type":"number or null","required":false,"default":"1","description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\ncurl https://api.openai.com/v1/assistants/asst_abc123 \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n      \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n      \"tools\": [{\"type\": \"file_search\"}],\n      \"model\": \"gpt-4o\"\n    }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n\n{\n  \"id\": \"asst_123\",\n  \"object\": \"assistant\",\n  \"created_at\": 1699009709,\n  \"name\": \"HR Helper\",\n  \"description\": null,\n  \"model\": \"gpt-4o\",\n  \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n  \"tools\": [\n    {\n      \"type\": \"file_search\"\n    }\n  ],\n  \"tool_resources\": {\n    \"file_search\": {\n      \"vector_store_ids\": []\n    }\n  },\n  \"metadata\": {},\n  \"top_p\": 1.0,\n  \"temperature\": 1.0,\n  \"response_format\": \"auto\"\n}"},{"title":"Delete assistantBeta","method":"delete","path":"https://api.openai.com/v1/assistants/{assistant_id}","summary":"Delete an assistant.","parameters":{"assistants-deleteassistant__table":[{"name":"assistant_id","type":"string","required":true,"description":"The ID of the assistant to delete."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/assistants/asst_abc123 \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -X DELETE","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"id\": \"asst_abc123\",\n  \"object\": \"assistant.deleted\",\n  \"deleted\": true\n}"},{"title":"The assistant objectBeta","method":"","path":"","summary":"","parameters":{"assistants/object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the assistant was created."},{"name":"description","type":"string or null","required":false,"description":"The description of the assistant. The maximum length is 512 characters."},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints."},{"name":"instructions","type":"string or null","required":false,"description":"The system instructions that the assistant uses. The maximum length is 256,000 characters."},{"name":"metadata","type":"map","required":false,"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."},{"name":"model","type":"string","required":false,"description":"ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them."},{"name":"name","type":"string or null","required":false,"description":"The name of the assistant. The maximum length is 256 characters."},{"name":"object","type":"string","required":false,"description":"The object type, which is always assistant."},{"name":"response_format","type":"\"auto\" or object","required":false,"description":"Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106. Setting to { \"type\": \"json_schema\", \"json_schema\": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. Setting to { \"type\": \"json_object\" } enables JSON mode, which ensures the message the model generates is valid JSON. Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if finish_reason=\"length\", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length."},{"name":"temperature","type":"number or null","required":false,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."},{"name":"tool_resources","type":"object or null","required":false,"description":"A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs."},{"name":"tools","type":"array","required":false,"description":"A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types code_interpreter, file_search, or function."},{"name":"top_p","type":"number or null","required":false,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"ThreadsBeta","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create threadBeta","method":"post","path":"https://api.openai.com/v1/threads","summary":"Create a thread.","parameters":{"threads-createthread__table":[{"name":"messages","type":"array","required":false,"description":"A list of messages to start the thread with."},{"name":"metadata","type":"map","required":false,"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."},{"name":"tool_resources","type":"object or null","required":false,"description":"A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs."}]},"returns":"array","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/threads \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d ''","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n\n{\n  \"id\": \"thread_abc123\",\n  \"object\": \"thread\",\n  \"created_at\": 1699012949,\n  \"metadata\": {},\n  \"tool_resources\": {}\n}"},{"title":"Retrieve threadBeta","method":"get","path":"https://api.openai.com/v1/threads/{thread_id}","summary":"Retrieves a thread.","parameters":{"threads-getthread__table":[{"name":"thread_id","type":"string","required":true,"description":"The ID of the thread to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/threads/thread_abc123 \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n\n{\n  \"id\": \"thread_abc123\",\n  \"object\": \"thread\",\n  \"created_at\": 1699014083,\n  \"metadata\": {},\n  \"tool_resources\": {\n    \"code_interpreter\": {\n      \"file_ids\": []\n    }\n  }\n}"},{"title":"Modify threadBeta","method":"post","path":"https://api.openai.com/v1/threads/{thread_id}","summary":"Modifies a thread.","parameters":{"threads-modifythread__table":[{"name":"metadata","type":"map","required":false,"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."},{"name":"tool_resources","type":"object or null","required":false,"description":"A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\ncurl https://api.openai.com/v1/threads/thread_abc123 \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n      \"metadata\": {\n        \"modified\": \"true\",\n        \"user\": \"abc123\"\n      }\n    }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"id\": \"thread_abc123\",\n  \"object\": \"thread\",\n  \"created_at\": 1699014083,\n  \"metadata\": {\n    \"modified\": \"true\",\n    \"user\": \"abc123\"\n  },\n  \"tool_resources\": {}\n}"},{"title":"Delete threadBeta","method":"delete","path":"https://api.openai.com/v1/threads/{thread_id}","summary":"Delete a thread.","parameters":{"threads-deletethread__table":[{"name":"thread_id","type":"string","required":true,"description":"The ID of the thread to delete."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n\ncurl https://api.openai.com/v1/threads/thread_abc123 \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -X DELETE","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"id\": \"thread_abc123\",\n  \"object\": \"thread.deleted\",\n  \"deleted\": true\n}"},{"title":"The thread objectBeta","method":"","path":"","summary":"","parameters":{"threads/object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the thread was created."},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints."},{"name":"metadata","type":"map","required":false,"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."},{"name":"object","type":"string","required":false,"description":"The object type, which is always thread."},{"name":"tool_resources","type":"object or null","required":false,"description":"A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"MessagesBeta","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create messageBeta","method":"post","path":"https://api.openai.com/v1/threads/{thread_id}/messages","summary":"Create a message.","parameters":{"messages-createmessage__table":[{"name":"content","type":"string or array","required":true,"description":""},{"name":"role","type":"string","required":true,"description":"The role of the entity that is creating the message. Allowed values include: user: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages. assistant: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation."},{"name":"attachments","type":"array or null","required":false,"description":"A list of files attached to the message, and the tools they should be added to."},{"name":"metadata","type":"map","required":false,"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."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n\ncurl https://api.openai.com/v1/threads/thread_abc123/messages \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n      \"role\": \"user\",\n      \"content\": \"How does AI work? Explain it in simple terms.\"\n    }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n\n{\n  \"id\": \"msg_abc123\",\n  \"object\": \"thread.message\",\n  \"created_at\": 1713226573,\n  \"assistant_id\": null,\n  \"thread_id\": \"thread_abc123\",\n  \"run_id\": null,\n  \"role\": \"user\",\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": {\n        \"value\": \"How does AI work? Explain it in simple terms.\",\n        \"annotations\": []\n      }\n    }\n  ],\n  \"attachments\": [],\n  \"metadata\": {}\n}"},{"title":"List messagesBeta","method":"get","path":"https://api.openai.com/v1/threads/{thread_id}/messages","summary":"Returns a list of messages for a given thread.","parameters":{"messages-listmessages__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"before","type":"string","required":false,"description":"A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."},{"name":"run_id","type":"string","required":false,"description":"Filter messages by the run ID that generated them."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/threads/thread_abc123/messages \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"msg_abc123\",\n      \"object\": \"thread.message\",\n      \"created_at\": 1699016383,\n      \"assistant_id\": null,\n      \"thread_id\": \"thread_abc123\",\n      \"run_id\": null,\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": {\n            \"value\": \"How does AI work? Explain it in simple terms.\",\n            \"annotations\": []\n          }\n        }\n      ],\n      \"attachments\": [],\n      \"metadata\": {}\n    },\n    {\n      \"id\": \"msg_abc456\",\n      \"object\": \"thread.message\",\n      \"created_at\": 1699016383,\n      \"assistant_id\": null,\n      \"thread_id\": \"thread_abc123\",\n      \"run_id\": null,\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": {\n            \"value\": \"Hello, what is AI?\",\n            \"annotations\": []\n          }\n        }\n      ],\n      \"attachments\": [],\n      \"metadata\": {}\n    }\n  ],\n  \"first_id\": \"msg_abc123\",\n  \"last_id\": \"msg_abc456\",\n  \"has_more\": false\n}"},{"title":"Retrieve messageBeta","method":"get","path":"https://api.openai.com/v1/threads/{thread_id}/messages/{message_id}","summary":"Retrieve a message.","parameters":{"messages-getmessage__table":[{"name":"message_id","type":"string","required":true,"description":"The ID of the message to retrieve."},{"name":"thread_id","type":"string","required":true,"description":"The ID of the thread to which this message belongs."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n\n{\n  \"id\": \"msg_abc123\",\n  \"object\": \"thread.message\",\n  \"created_at\": 1699017614,\n  \"assistant_id\": null,\n  \"thread_id\": \"thread_abc123\",\n  \"run_id\": null,\n  \"role\": \"user\",\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": {\n        \"value\": \"How does AI work? Explain it in simple terms.\",\n        \"annotations\": []\n      }\n    }\n  ],\n  \"attachments\": [],\n  \"metadata\": {}\n}"},{"title":"Modify messageBeta","method":"post","path":"https://api.openai.com/v1/threads/{thread_id}/messages/{message_id}","summary":"Modifies a message.","parameters":{"messages-modifymessage__table":[{"name":"metadata","type":"map","required":false,"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."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\ncurl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n      \"metadata\": {\n        \"modified\": \"true\",\n        \"user\": \"abc123\"\n      }\n    }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n\n{\n  \"id\": \"msg_abc123\",\n  \"object\": \"thread.message\",\n  \"created_at\": 1699017614,\n  \"assistant_id\": null,\n  \"thread_id\": \"thread_abc123\",\n  \"run_id\": null,\n  \"role\": \"user\",\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": {\n        \"value\": \"How does AI work? Explain it in simple terms.\",\n        \"annotations\": []\n      }\n    }\n  ],\n  \"file_ids\": [],\n  \"metadata\": {\n    \"modified\": \"true\",\n    \"user\": \"abc123\"\n  }\n}"},{"title":"Delete messageBeta","method":"delete","path":"https://api.openai.com/v1/threads/{thread_id}/messages/{message_id}","summary":"Deletes a message.","parameters":{"messages-deletemessage__table":[{"name":"message_id","type":"string","required":true,"description":"The ID of the message to delete."},{"name":"thread_id","type":"string","required":true,"description":"The ID of the thread to which this message belongs."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl -X DELETE https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"id\": \"msg_abc123\",\n  \"object\": \"thread.message.deleted\",\n  \"deleted\": true\n}"},{"title":"The message objectBeta","method":"","path":"","summary":"","parameters":{"messages/object__table":[{"name":"assistant_id","type":"string or null","required":false,"description":"If applicable, the ID of the assistant that authored this message."},{"name":"attachments","type":"array or null","required":false,"description":"A list of files attached to the message, and the tools they were added to."},{"name":"completed_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the message was completed."},{"name":"content","type":"array","required":false,"description":"The content of the message in array of text and/or images."},{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the message was created."},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints."},{"name":"incomplete_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the message was marked as incomplete."},{"name":"incomplete_details","type":"object or null","required":false,"description":"On an incomplete message, details about why the message is incomplete."},{"name":"metadata","type":"map","required":false,"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."},{"name":"object","type":"string","required":false,"description":"The object type, which is always thread.message."},{"name":"role","type":"string","required":false,"description":"The entity that produced the message. One of user or assistant."},{"name":"run_id","type":"string or null","required":false,"description":"The ID of the run associated with the creation of this message. Value is null when messages are created manually using the create message or create thread endpoints."},{"name":"status","type":"string","required":false,"description":"The status of the message, which can be either in_progress, incomplete, or completed."},{"name":"thread_id","type":"string","required":false,"description":"The thread ID that this message belongs to."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"RunsBeta","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create runBeta","method":"post","path":"https://api.openai.com/v1/threads/{thread_id}/runs","summary":"Create a run.","parameters":{"runs-createrun__table":[{"name":"assistant_id","type":"string","required":true,"description":"The ID of the assistant to use to execute this run."},{"name":"additional_instructions","type":"string or null","required":false,"description":"Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions."},{"name":"additional_messages","type":"array or null","required":false,"description":"Adds additional messages to the thread before creating the run."},{"name":"instructions","type":"string or null","required":false,"description":"Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis."},{"name":"max_completion_tokens","type":"integer or null","required":false,"description":"The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status incomplete. See incomplete_details for more info."},{"name":"max_prompt_tokens","type":"integer or null","required":false,"description":"The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status incomplete. See incomplete_details for more info."},{"name":"metadata","type":"map","required":false,"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."},{"name":"model","type":"string","required":false,"description":"The ID of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used."},{"name":"parallel_tool_calls","type":"boolean","required":false,"default":"true","description":"Whether to enable parallel function calling during tool use."},{"name":"reasoning_effort","type":"string or null","required":false,"default":"medium","description":"o-series models only Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response."},{"name":"response_format","type":"\"auto\" or object","required":false,"description":"Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106. Setting to { \"type\": \"json_schema\", \"json_schema\": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. Setting to { \"type\": \"json_object\" } enables JSON mode, which ensures the message the model generates is valid JSON. Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if finish_reason=\"length\", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length."},{"name":"stream","type":"boolean or null","required":false,"description":"If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message."},{"name":"temperature","type":"number or null","required":false,"default":"1","description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."},{"name":"tool_choice","type":"string or object","required":false,"description":"Controls which (if any) tool is called by the model. none means the model will not call any tools and instead generates a message. auto is the default value and means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools before responding to the user. Specifying a particular tool like {\"type\": \"file_search\"} or {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool."},{"name":"tools","type":"array or null","required":false,"description":"Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis."},{"name":"top_p","type":"number or null","required":false,"default":"1","description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."},{"name":"truncation_strategy","type":"object or null","required":false,"description":"Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n\ncurl https://api.openai.com/v1/threads/thread_abc123/runs \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n    \"assistant_id\": \"asst_abc123\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n\n{\n  \"id\": \"run_abc123\",\n  \"object\": \"thread.run\",\n  \"created_at\": 1699063290,\n  \"assistant_id\": \"asst_abc123\",\n  \"thread_id\": \"thread_abc123\",\n  \"status\": \"queued\",\n  \"started_at\": 1699063290,\n  \"expires_at\": null,\n  \"cancelled_at\": null,\n  \"failed_at\": null,\n  \"completed_at\": 1699063291,\n  \"last_error\": null,\n  \"model\": \"gpt-4o\",\n  \"instructions\": null,\n  \"incomplete_details\": null,\n  \"tools\": [\n    {\n      \"type\": \"code_interpreter\"\n    }\n  ],\n  \"metadata\": {},\n  \"usage\": null,\n  \"temperature\": 1.0,\n  \"top_p\": 1.0,\n  \"max_prompt_tokens\": 1000,\n  \"max_completion_tokens\": 1000,\n  \"truncation_strategy\": {\n    \"type\": \"auto\",\n    \"last_messages\": null\n  },\n  \"response_format\": \"auto\",\n  \"tool_choice\": \"auto\",\n  \"parallel_tool_calls\": true\n}"},{"title":"Create thread and runBeta","method":"post","path":"https://api.openai.com/v1/threads/runs","summary":"Create a thread and run it in one request.","parameters":{"runs-createthreadandrun__table":[{"name":"assistant_id","type":"string","required":true,"description":"The ID of the assistant to use to execute this run."},{"name":"instructions","type":"string or null","required":false,"description":"Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis."},{"name":"max_completion_tokens","type":"integer or null","required":false,"description":"The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status incomplete. See incomplete_details for more info."},{"name":"max_prompt_tokens","type":"integer or null","required":false,"description":"The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status incomplete. See incomplete_details for more info."},{"name":"metadata","type":"map","required":false,"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."},{"name":"model","type":"string","required":false,"description":"The ID of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used."},{"name":"parallel_tool_calls","type":"boolean","required":false,"default":"true","description":"Whether to enable parallel function calling during tool use."},{"name":"response_format","type":"\"auto\" or object","required":false,"description":"Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106. Setting to { \"type\": \"json_schema\", \"json_schema\": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. Setting to { \"type\": \"json_object\" } enables JSON mode, which ensures the message the model generates is valid JSON. Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if finish_reason=\"length\", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length."},{"name":"stream","type":"boolean or null","required":false,"description":"If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message."},{"name":"temperature","type":"number or null","required":false,"default":"1","description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."},{"name":"thread","type":"object","required":false,"description":"Options to create a new thread. If no thread is provided when running a request, an empty thread will be created."},{"name":"tool_choice","type":"string or object","required":false,"description":"Controls which (if any) tool is called by the model. none means the model will not call any tools and instead generates a message. auto is the default value and means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools before responding to the user. Specifying a particular tool like {\"type\": \"file_search\"} or {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool."},{"name":"tool_resources","type":"object or null","required":false,"description":"A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs."},{"name":"tools","type":"array or null","required":false,"description":"Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis."},{"name":"top_p","type":"number or null","required":false,"default":"1","description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."},{"name":"truncation_strategy","type":"object or null","required":false,"description":"Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\ncurl https://api.openai.com/v1/threads/runs \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n      \"assistant_id\": \"asst_abc123\",\n      \"thread\": {\n        \"messages\": [\n          {\"role\": \"user\", \"content\": \"Explain deep learning to a 5 year old.\"}\n        ]\n      }\n    }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n\n{\n  \"id\": \"run_abc123\",\n  \"object\": \"thread.run\",\n  \"created_at\": 1699076792,\n  \"assistant_id\": \"asst_abc123\",\n  \"thread_id\": \"thread_abc123\",\n  \"status\": \"queued\",\n  \"started_at\": null,\n  \"expires_at\": 1699077392,\n  \"cancelled_at\": null,\n  \"failed_at\": null,\n  \"completed_at\": null,\n  \"required_action\": null,\n  \"last_error\": null,\n  \"model\": \"gpt-4o\",\n  \"instructions\": \"You are a helpful assistant.\",\n  \"tools\": [],\n  \"tool_resources\": {},\n  \"metadata\": {},\n  \"temperature\": 1.0,\n  \"top_p\": 1.0,\n  \"max_completion_tokens\": null,\n  \"max_prompt_tokens\": null,\n  \"truncation_strategy\": {\n    \"type\": \"auto\",\n    \"last_messages\": null\n  },\n  \"incomplete_details\": null,\n  \"usage\": null,\n  \"response_format\": \"auto\",\n  \"tool_choice\": \"auto\",\n  \"parallel_tool_calls\": true\n}"},{"title":"List runsBeta","method":"get","path":"https://api.openai.com/v1/threads/{thread_id}/runs","summary":"Returns a list of runs belonging to a thread.","parameters":{"runs-listruns__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"before","type":"string","required":false,"description":"A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/threads/thread_abc123/runs \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91\n92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"run_abc123\",\n      \"object\": \"thread.run\",\n      \"created_at\": 1699075072,\n      \"assistant_id\": \"asst_abc123\",\n      \"thread_id\": \"thread_abc123\",\n      \"status\": \"completed\",\n      \"started_at\": 1699075072,\n      \"expires_at\": null,\n      \"cancelled_at\": null,\n      \"failed_at\": null,\n      \"completed_at\": 1699075073,\n      \"last_error\": null,\n      \"model\": \"gpt-4o\",\n      \"instructions\": null,\n      \"incomplete_details\": null,\n      \"tools\": [\n        {\n          \"type\": \"code_interpreter\"\n        }\n      ],\n      \"tool_resources\": {\n        \"code_interpreter\": {\n          \"file_ids\": [\n            \"file-abc123\",\n            \"file-abc456\"\n          ]\n        }\n      },\n      \"metadata\": {},\n      \"usage\": {\n        \"prompt_tokens\": 123,\n        \"completion_tokens\": 456,\n        \"total_tokens\": 579\n      },\n      \"temperature\": 1.0,\n      \"top_p\": 1.0,\n      \"max_prompt_tokens\": 1000,\n      \"max_completion_tokens\": 1000,\n      \"truncation_strategy\": {\n        \"type\": \"auto\",\n        \"last_messages\": null\n      },\n      \"response_format\": \"auto\",\n      \"tool_choice\": \"auto\",\n      \"parallel_tool_calls\": true\n    },\n    {\n      \"id\": \"run_abc456\",\n      \"object\": \"thread.run\",\n      \"created_at\": 1699063290,\n      \"assistant_id\": \"asst_abc123\",\n      \"thread_id\": \"thread_abc123\",\n      \"status\": \"completed\",\n      \"started_at\": 1699063290,\n      \"expires_at\": null,\n      \"cancelled_at\": null,\n      \"failed_at\": null,\n      \"completed_at\": 1699063291,\n      \"last_error\": null,\n      \"model\": \"gpt-4o\",\n      \"instructions\": null,\n      \"incomplete_details\": null,\n      \"tools\": [\n        {\n          \"type\": \"code_interpreter\"\n        }\n      ],\n      \"tool_resources\": {\n        \"code_interpreter\": {\n          \"file_ids\": [\n            \"file-abc123\",\n            \"file-abc456\"\n          ]\n        }\n      },\n      \"metadata\": {},\n      \"usage\": {\n        \"prompt_tokens\": 123,\n        \"completion_tokens\": 456,\n        \"total_tokens\": 579\n      },\n      \"temperature\": 1.0,\n      \"top_p\": 1.0,\n      \"max_prompt_tokens\": 1000,\n      \"max_completion_tokens\": 1000,\n      \"truncation_strategy\": {\n        \"type\": \"auto\",\n        \"last_messages\": null\n      },\n      \"response_format\": \"auto\",\n      \"tool_choice\": \"auto\",\n      \"parallel_tool_calls\": true\n    }\n  ],\n  \"first_id\": \"run_abc123\",\n  \"last_id\": \"run_abc456\",\n  \"has_more\": false\n}"},{"title":"Retrieve runBeta","method":"get","path":"https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}","summary":"Retrieves a run.","parameters":{"runs-getrun__table":[{"name":"run_id","type":"string","required":true,"description":"The ID of the run to retrieve."},{"name":"thread_id","type":"string","required":true,"description":"The ID of the thread that was run."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n\n{\n  \"id\": \"run_abc123\",\n  \"object\": \"thread.run\",\n  \"created_at\": 1699075072,\n  \"assistant_id\": \"asst_abc123\",\n  \"thread_id\": \"thread_abc123\",\n  \"status\": \"completed\",\n  \"started_at\": 1699075072,\n  \"expires_at\": null,\n  \"cancelled_at\": null,\n  \"failed_at\": null,\n  \"completed_at\": 1699075073,\n  \"last_error\": null,\n  \"model\": \"gpt-4o\",\n  \"instructions\": null,\n  \"incomplete_details\": null,\n  \"tools\": [\n    {\n      \"type\": \"code_interpreter\"\n    }\n  ],\n  \"metadata\": {},\n  \"usage\": {\n    \"prompt_tokens\": 123,\n    \"completion_tokens\": 456,\n    \"total_tokens\": 579\n  },\n  \"temperature\": 1.0,\n  \"top_p\": 1.0,\n  \"max_prompt_tokens\": 1000,\n  \"max_completion_tokens\": 1000,\n  \"truncation_strategy\": {\n    \"type\": \"auto\",\n    \"last_messages\": null\n  },\n  \"response_format\": \"auto\",\n  \"tool_choice\": \"auto\",\n  \"parallel_tool_calls\": true\n}"},{"title":"Modify runBeta","method":"post","path":"https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}","summary":"Modifies a run.","parameters":{"runs-modifyrun__table":[{"name":"metadata","type":"map","required":false,"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."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\ncurl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n    \"metadata\": {\n      \"user_id\": \"user_abc123\"\n    }\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n\n{\n  \"id\": \"run_abc123\",\n  \"object\": \"thread.run\",\n  \"created_at\": 1699075072,\n  \"assistant_id\": \"asst_abc123\",\n  \"thread_id\": \"thread_abc123\",\n  \"status\": \"completed\",\n  \"started_at\": 1699075072,\n  \"expires_at\": null,\n  \"cancelled_at\": null,\n  \"failed_at\": null,\n  \"completed_at\": 1699075073,\n  \"last_error\": null,\n  \"model\": \"gpt-4o\",\n  \"instructions\": null,\n  \"incomplete_details\": null,\n  \"tools\": [\n    {\n      \"type\": \"code_interpreter\"\n    }\n  ],\n  \"tool_resources\": {\n    \"code_interpreter\": {\n      \"file_ids\": [\n        \"file-abc123\",\n        \"file-abc456\"\n      ]\n    }\n  },\n  \"metadata\": {\n    \"user_id\": \"user_abc123\"\n  },\n  \"usage\": {\n    \"prompt_tokens\": 123,\n    \"completion_tokens\": 456,\n    \"total_tokens\": 579\n  },\n  \"temperature\": 1.0,\n  \"top_p\": 1.0,\n  \"max_prompt_tokens\": 1000,\n  \"max_completion_tokens\": 1000,\n  \"truncation_strategy\": {\n    \"type\": \"auto\",\n    \"last_messages\": null\n  },\n  \"response_format\": \"auto\",\n  \"tool_choice\": \"auto\",\n  \"parallel_tool_calls\": true\n}"},{"title":"Submit tool outputs to runBeta","method":"post","path":"https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}/submit_tool_outputs","summary":"When a run has the status: \"requires_action\" and required_action.type is submit_tool_outputs, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.","parameters":{"runs-submittooloutputs__table":[{"name":"tool_outputs","type":"array","required":true,"description":"A list of tools for which the outputs are being submitted."},{"name":"stream","type":"boolean or null","required":false,"description":"If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n\ncurl https://api.openai.com/v1/threads/thread_123/runs/run_123/submit_tool_outputs \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -d '{\n    \"tool_outputs\": [\n      {\n        \"tool_call_id\": \"call_001\",\n        \"output\": \"70 degrees and sunny.\"\n      }\n    ]\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n\n{\n  \"id\": \"run_123\",\n  \"object\": \"thread.run\",\n  \"created_at\": 1699075592,\n  \"assistant_id\": \"asst_123\",\n  \"thread_id\": \"thread_123\",\n  \"status\": \"queued\",\n  \"started_at\": 1699075592,\n  \"expires_at\": 1699076192,\n  \"cancelled_at\": null,\n  \"failed_at\": null,\n  \"completed_at\": null,\n  \"last_error\": null,\n  \"model\": \"gpt-4o\",\n  \"instructions\": null,\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_current_weather\",\n        \"description\": \"Get the current weather in a given location\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\",\n              \"description\": \"The city and state, e.g. San Francisco, CA\"\n            },\n            \"unit\": {\n              \"type\": \"string\",\n              \"enum\": [\"celsius\", \"fahrenheit\"]\n            }\n          },\n          \"required\": [\"location\"]\n        }\n      }\n    }\n  ],\n  \"metadata\": {},\n  \"usage\": null,\n  \"temperature\": 1.0,\n  \"top_p\": 1.0,\n  \"max_prompt_tokens\": 1000,\n  \"max_completion_tokens\": 1000,\n  \"truncation_strategy\": {\n    \"type\": \"auto\",\n    \"last_messages\": null\n  },\n  \"response_format\": \"auto\",\n  \"tool_choice\": \"auto\",\n  \"parallel_tool_calls\": true\n}"},{"title":"Cancel a runBeta","method":"post","path":"https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}/cancel","summary":"Cancels a run that is in_progress.","parameters":{"runs-cancelrun__table":[{"name":"run_id","type":"string","required":true,"description":"The ID of the run to cancel."},{"name":"thread_id","type":"string","required":true,"description":"The ID of the thread to which this run belongs."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/cancel \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"OpenAI-Beta: assistants=v2\" \\\n  -X POST","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n\n{\n  \"id\": \"run_abc123\",\n  \"object\": \"thread.run\",\n  \"created_at\": 1699076126,\n  \"assistant_id\": \"asst_abc123\",\n  \"thread_id\": \"thread_abc123\",\n  \"status\": \"cancelling\",\n  \"started_at\": 1699076126,\n  \"expires_at\": 1699076726,\n  \"cancelled_at\": null,\n  \"failed_at\": null,\n  \"completed_at\": null,\n  \"last_error\": null,\n  \"model\": \"gpt-4o\",\n  \"instructions\": \"You summarize books.\",\n  \"tools\": [\n    {\n      \"type\": \"file_search\"\n    }\n  ],\n  \"tool_resources\": {\n    \"file_search\": {\n      \"vector_store_ids\": [\"vs_123\"]\n    }\n  },\n  \"metadata\": {},\n  \"usage\": null,\n  \"temperature\": 1.0,\n  \"top_p\": 1.0,\n  \"response_format\": \"auto\",\n  \"tool_choice\": \"auto\",\n  \"parallel_tool_calls\": true\n}"},{"title":"The run objectBeta","method":"","path":"","summary":"","parameters":{"runs/object__table":[{"name":"assistant_id","type":"string","required":false,"description":"The ID of the assistant used for execution of this run."},{"name":"cancelled_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the run was cancelled."},{"name":"completed_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the run was completed."},{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the run was created."},{"name":"expires_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the run will expire."},{"name":"failed_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the run failed."},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints."},{"name":"incomplete_details","type":"object or null","required":false,"description":"Details on why the run is incomplete. Will be null if the run is not incomplete."},{"name":"instructions","type":"string","required":false,"description":"The instructions that the assistant used for this run."},{"name":"last_error","type":"object or null","required":false,"description":"The last error associated with this run. Will be null if there are no errors."},{"name":"max_completion_tokens","type":"integer or null","required":false,"description":"The maximum number of completion tokens specified to have been used over the course of the run."},{"name":"max_prompt_tokens","type":"integer or null","required":false,"description":"The maximum number of prompt tokens specified to have been used over the course of the run."},{"name":"metadata","type":"map","required":false,"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."},{"name":"model","type":"string","required":false,"description":"The model that the assistant used for this run."},{"name":"object","type":"string","required":false,"description":"The object type, which is always thread.run."},{"name":"parallel_tool_calls","type":"boolean","required":false,"description":"Whether to enable parallel function calling during tool use."},{"name":"required_action","type":"object or null","required":false,"description":"Details on the action required to continue the run. Will be null if no action is required."},{"name":"response_format","type":"\"auto\" or object","required":false,"description":"Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106. Setting to { \"type\": \"json_schema\", \"json_schema\": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. Setting to { \"type\": \"json_object\" } enables JSON mode, which ensures the message the model generates is valid JSON. Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if finish_reason=\"length\", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length."},{"name":"started_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the run was started."},{"name":"status","type":"string","required":false,"description":"The status of the run, which can be either queued, in_progress, requires_action, cancelling, cancelled, failed, completed, incomplete, or expired."},{"name":"temperature","type":"number or null","required":false,"description":"The sampling temperature used for this run. If not set, defaults to 1."},{"name":"thread_id","type":"string","required":false,"description":"The ID of the thread that was executed on as a part of this run."},{"name":"tool_choice","type":"string or object","required":false,"description":"Controls which (if any) tool is called by the model. none means the model will not call any tools and instead generates a message. auto is the default value and means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools before responding to the user. Specifying a particular tool like {\"type\": \"file_search\"} or {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool."},{"name":"tools","type":"array","required":false,"description":"The list of tools that the assistant used for this run."},{"name":"top_p","type":"number or null","required":false,"description":"The nucleus sampling value used for this run. If not set, defaults to 1."},{"name":"truncation_strategy","type":"object or null","required":false,"description":"Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run."},{"name":"usage","type":"object or null","required":false,"description":"Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.)."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Run stepsBeta","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List run stepsBeta","method":"get","path":"https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}/steps","summary":"Returns a list of run steps belonging to a run.","parameters":{"run-steps-listrunsteps__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"before","type":"string","required":false,"description":"A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list."},{"name":"include[]","type":"array","required":false,"description":"A list of additional fields to include in the response. Currently the only supported value is step_details.tool_calls[*].file_search.results[*].content to fetch the file search result content. See the file search tool documentation for more information."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"step_abc123\",\n      \"object\": \"thread.run.step\",\n      \"created_at\": 1699063291,\n      \"run_id\": \"run_abc123\",\n      \"assistant_id\": \"asst_abc123\",\n      \"thread_id\": \"thread_abc123\",\n      \"type\": \"message_creation\",\n      \"status\": \"completed\",\n      \"cancelled_at\": null,\n      \"completed_at\": 1699063291,\n      \"expired_at\": null,\n      \"failed_at\": null,\n      \"last_error\": null,\n      \"step_details\": {\n        \"type\": \"message_creation\",\n        \"message_creation\": {\n          \"message_id\": \"msg_abc123\"\n        }\n      },\n      \"usage\": {\n        \"prompt_tokens\": 123,\n        \"completion_tokens\": 456,\n        \"total_tokens\": 579\n      }\n    }\n  ],\n  \"first_id\": \"step_abc123\",\n  \"last_id\": \"step_abc456\",\n  \"has_more\": false\n}"},{"title":"Retrieve run stepBeta","method":"get","path":"https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}/steps/{step_id}","summary":"Retrieves a run step.","parameters":{"run-steps-getrunstep__table":[{"name":"include[]","type":"array","required":false,"description":"A list of additional fields to include in the response. Currently the only supported value is step_details.tool_calls[*].file_search.results[*].content to fetch the file search result content. See the file search tool documentation for more information."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n\ncurl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps/step_abc123 \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"OpenAI-Beta: assistants=v2\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n\n{\n  \"id\": \"step_abc123\",\n  \"object\": \"thread.run.step\",\n  \"created_at\": 1699063291,\n  \"run_id\": \"run_abc123\",\n  \"assistant_id\": \"asst_abc123\",\n  \"thread_id\": \"thread_abc123\",\n  \"type\": \"message_creation\",\n  \"status\": \"completed\",\n  \"cancelled_at\": null,\n  \"completed_at\": 1699063291,\n  \"expired_at\": null,\n  \"failed_at\": null,\n  \"last_error\": null,\n  \"step_details\": {\n    \"type\": \"message_creation\",\n    \"message_creation\": {\n      \"message_id\": \"msg_abc123\"\n    }\n  },\n  \"usage\": {\n    \"prompt_tokens\": 123,\n    \"completion_tokens\": 456,\n    \"total_tokens\": 579\n  }\n}"},{"title":"The run step objectBeta","method":"","path":"","summary":"","parameters":{"run-steps/step-object__table":[{"name":"assistant_id","type":"string","required":false,"description":"The ID of the assistant associated with the run step."},{"name":"cancelled_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the run step was cancelled."},{"name":"completed_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the run step completed."},{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) for when the run step was created."},{"name":"expired_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired."},{"name":"failed_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) for when the run step failed."},{"name":"id","type":"string","required":false,"description":"The identifier of the run step, which can be referenced in API endpoints."},{"name":"last_error","type":"object or null","required":false,"description":"The last error associated with this run step. Will be null if there are no errors."},{"name":"metadata","type":"map","required":false,"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."},{"name":"object","type":"string","required":false,"description":"The object type, which is always thread.run.step."},{"name":"run_id","type":"string","required":false,"description":"The ID of the run that this run step is a part of."},{"name":"status","type":"string","required":false,"description":"The status of the run step, which can be either in_progress, cancelled, failed, completed, or expired."},{"name":"step_details","type":"object","required":false,"description":"The details of the run step."},{"name":"thread_id","type":"string","required":false,"description":"The ID of the thread that was run."},{"name":"type","type":"string","required":false,"description":"The type of run step, which can be either message_creation or tool_calls."},{"name":"usage","type":"object or null","required":false,"description":"Usage statistics related to the run step. This value will be null while the run step's status is in_progress."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"StreamingBeta","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The message delta objectBeta","method":"","path":"","summary":"","parameters":{"assistants-streaming/message-delta-object__table":[{"name":"delta","type":"object","required":false,"description":"The delta containing the fields that have changed on the Message."},{"name":"id","type":"string","required":false,"description":"The identifier of the message, which can be referenced in API endpoints."},{"name":"object","type":"string","required":false,"description":"The object type, which is always thread.message.delta."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"The run step delta objectBeta","method":"","path":"","summary":"","parameters":{"assistants-streaming/run-step-delta-object__table":[{"name":"delta","type":"object","required":false,"description":"The delta containing the fields that have changed on the run step."},{"name":"id","type":"string","required":false,"description":"The identifier of the run step, which can be referenced in API endpoints."},{"name":"object","type":"string","required":false,"description":"The object type, which is always thread.run.step.delta."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Assistant stream eventsBeta","method":"","path":"","summary":"","parameters":{"assistants-streaming/events__table":[]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Administration","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Admin API Keys","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List all organization and project API keys.","method":"get","path":"https://api.openai.com/v1/organization/admin_api_keys","summary":"List organization API keys","parameters":{"admin-api-keys-list__table":[{"name":"after","type":"string or null","required":false,"description":""},{"name":"limit","type":"integer","required":false,"default":"20","description":""},{"name":"order","type":"string","required":false,"default":"asc","description":""}]},"returns":"string or null","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/admin_api_keys?after=key_abc&limit=20 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"organization.admin_api_key\",\n      \"id\": \"key_abc\",\n      \"name\": \"Main Admin Key\",\n      \"redacted_value\": \"sk-admin...def\",\n      \"created_at\": 1711471533,\n      \"last_used_at\": 1711471534,\n      \"owner\": {\n        \"type\": \"service_account\",\n        \"object\": \"organization.service_account\",\n        \"id\": \"sa_456\",\n        \"name\": \"My Service Account\",\n        \"created_at\": 1711471533,\n        \"role\": \"member\"\n      }\n    }\n  ],\n  \"first_id\": \"key_abc\",\n  \"last_id\": \"key_abc\",\n  \"has_more\": false\n}"},{"title":"Create admin API key","method":"post","path":"https://api.openai.com/v1/organization/admin_api_keys","summary":"Create an organization admin API key","parameters":{"admin-api-keys-create__table":[{"name":"name","type":"string","required":true,"description":""}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl -X POST https://api.openai.com/v1/organization/admin_api_keys \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"name\": \"New Admin Key\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n\n{\n  \"object\": \"organization.admin_api_key\",\n  \"id\": \"key_xyz\",\n  \"name\": \"New Admin Key\",\n  \"redacted_value\": \"sk-admin...xyz\",\n  \"created_at\": 1711471533,\n  \"last_used_at\": 1711471534,\n  \"owner\": {\n    \"type\": \"user\",\n    \"object\": \"organization.user\",\n    \"id\": \"user_123\",\n    \"name\": \"John Doe\",\n    \"created_at\": 1711471533,\n    \"role\": \"owner\"\n  },\n  \"value\": \"sk-admin-1234abcd\"\n}"},{"title":"Retrieve admin API key","method":"get","path":"https://api.openai.com/v1/organization/admin_api_keys/{key_id}","summary":"Retrieve a single organization API key","parameters":{"admin-api-keys-listget__table":[{"name":"key_id","type":"string","required":true,"description":""}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n\n{\n  \"object\": \"organization.admin_api_key\",\n  \"id\": \"key_abc\",\n  \"name\": \"Main Admin Key\",\n  \"redacted_value\": \"sk-admin...xyz\",\n  \"created_at\": 1711471533,\n  \"last_used_at\": 1711471534,\n  \"owner\": {\n    \"type\": \"user\",\n    \"object\": \"organization.user\",\n    \"id\": \"user_123\",\n    \"name\": \"John Doe\",\n    \"created_at\": 1711471533,\n    \"role\": \"owner\"\n  }\n}"},{"title":"Delete admin API key","method":"delete","path":"https://api.openai.com/v1/organization/admin_api_keys/{key_id}","summary":"Delete an organization admin API key","parameters":{"admin-api-keys-delete__table":[{"name":"key_id","type":"string","required":true,"description":""}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X DELETE https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n  \"id\": \"key_abc\",\n  \"object\": \"organization.admin_api_key.deleted\",\n  \"deleted\": true\n}"},{"title":"The admin API key object","method":"","path":"","summary":"","parameters":{"admin-api-keys/object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the API key was created"},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints"},{"name":"last_used_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) of when the API key was last used"},{"name":"name","type":"string","required":false,"description":"The name of the API key"},{"name":"object","type":"string","required":false,"description":"The object type, which is always organization.admin_api_key"},{"name":"owner","type":"object","required":false,"description":""},{"name":"redacted_value","type":"string","required":false,"description":"The redacted value of the API key"},{"name":"value","type":"string","required":false,"description":"The value of the API key. Only shown on create."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Invites","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List invites","method":"get","path":"https://api.openai.com/v1/organization/invites","summary":"Returns a list of invites in the organization.","parameters":{"invite-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/invites?after=invite-abc&limit=20 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"organization.invite\",\n      \"id\": \"invite-abc\",\n      \"email\": \"user@example.com\",\n      \"role\": \"owner\",\n      \"status\": \"accepted\",\n      \"invited_at\": 1711471533,\n      \"expires_at\": 1711471533,\n      \"accepted_at\": 1711471533\n    }\n  ],\n  \"first_id\": \"invite-abc\",\n  \"last_id\": \"invite-abc\",\n  \"has_more\": false\n}"},{"title":"Create invite","method":"post","path":"https://api.openai.com/v1/organization/invites","summary":"Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.","parameters":{"invite-create__table":[{"name":"email","type":"string","required":true,"description":"Send an email to this address"},{"name":"role","type":"string","required":true,"description":"owner or reader"},{"name":"projects","type":"array","required":false,"description":"An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n\ncurl -X POST https://api.openai.com/v1/organization/invites \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"email\": \"anotheruser@example.com\",\n      \"role\": \"reader\",\n      \"projects\": [\n        {\n          \"id\": \"project-xyz\",\n          \"role\": \"member\"\n        },\n        {\n          \"id\": \"project-abc\",\n          \"role\": \"owner\"\n        }\n      ]\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n\n{\n  \"object\": \"organization.invite\",\n  \"id\": \"invite-def\",\n  \"email\": \"anotheruser@example.com\",\n  \"role\": \"reader\",\n  \"status\": \"pending\",\n  \"invited_at\": 1711471533,\n  \"expires_at\": 1711471533,\n  \"accepted_at\": null,\n  \"projects\": [\n    {\n      \"id\": \"project-xyz\",\n      \"role\": \"member\"\n    },\n    {\n      \"id\": \"project-abc\",\n      \"role\": \"owner\"\n    }\n  ]\n}"},{"title":"Retrieve invite","method":"get","path":"https://api.openai.com/v1/organization/invites/{invite_id}","summary":"Retrieves an invite.","parameters":{"invite-retrieve__table":[{"name":"invite_id","type":"string","required":true,"description":"The ID of the invite to retrieve."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/invites/invite-abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n    \"object\": \"organization.invite\",\n    \"id\": \"invite-abc\",\n    \"email\": \"user@example.com\",\n    \"role\": \"owner\",\n    \"status\": \"accepted\",\n    \"invited_at\": 1711471533,\n    \"expires_at\": 1711471533,\n    \"accepted_at\": 1711471533\n}"},{"title":"Delete invite","method":"delete","path":"https://api.openai.com/v1/organization/invites/{invite_id}","summary":"Delete an invite. If the invite has already been accepted, it cannot be deleted.","parameters":{"invite-delete__table":[{"name":"invite_id","type":"string","required":true,"description":"The ID of the invite to delete."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X DELETE https://api.openai.com/v1/organization/invites/invite-abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n    \"object\": \"organization.invite.deleted\",\n    \"id\": \"invite-abc\",\n    \"deleted\": true\n}"},{"title":"The invite object","method":"","path":"","summary":"","parameters":{"invite/object__table":[{"name":"accepted_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the invite was accepted."},{"name":"email","type":"string","required":false,"description":"The email address of the individual to whom the invite was sent"},{"name":"expires_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the invite expires."},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints"},{"name":"invited_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the invite was sent."},{"name":"object","type":"string","required":false,"description":"The object type, which is always organization.invite"},{"name":"projects","type":"array","required":false,"description":"The projects that were granted membership upon acceptance of the invite."},{"name":"role","type":"string","required":false,"description":"owner or reader"},{"name":"status","type":"string","required":false,"description":"accepted,expired, or pending"}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Users","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List users","method":"get","path":"https://api.openai.com/v1/organization/users","summary":"Lists all of the users in the organization.","parameters":{"users-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"emails","type":"array","required":false,"description":"Filter by the email address of users."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/users?after=user_abc&limit=20 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n\n{\n    \"object\": \"list\",\n    \"data\": [\n        {\n            \"object\": \"organization.user\",\n            \"id\": \"user_abc\",\n            \"name\": \"First Last\",\n            \"email\": \"user@example.com\",\n            \"role\": \"owner\",\n            \"added_at\": 1711471533\n        }\n    ],\n    \"first_id\": \"user-abc\",\n    \"last_id\": \"user-xyz\",\n    \"has_more\": false\n}"},{"title":"Modify user","method":"post","path":"https://api.openai.com/v1/organization/users/{user_id}","summary":"Modifies a user's role in the organization.","parameters":{"users-modify__table":[{"name":"role","type":"string","required":true,"description":"owner or reader"}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl -X POST https://api.openai.com/v1/organization/users/user_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"role\": \"owner\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n    \"object\": \"organization.user\",\n    \"id\": \"user_abc\",\n    \"name\": \"First Last\",\n    \"email\": \"user@example.com\",\n    \"role\": \"owner\",\n    \"added_at\": 1711471533\n}"},{"title":"Retrieve user","method":"get","path":"https://api.openai.com/v1/organization/users/{user_id}","summary":"Retrieves a user by their identifier.","parameters":{"users-retrieve__table":[{"name":"user_id","type":"string","required":true,"description":"The ID of the user."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/users/user_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n    \"object\": \"organization.user\",\n    \"id\": \"user_abc\",\n    \"name\": \"First Last\",\n    \"email\": \"user@example.com\",\n    \"role\": \"owner\",\n    \"added_at\": 1711471533\n}"},{"title":"Delete user","method":"delete","path":"https://api.openai.com/v1/organization/users/{user_id}","summary":"Deletes a user from the organization.","parameters":{"users-delete__table":[{"name":"user_id","type":"string","required":true,"description":"The ID of the user."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X DELETE https://api.openai.com/v1/organization/users/user_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n    \"object\": \"organization.user.deleted\",\n    \"id\": \"user_abc\",\n    \"deleted\": true\n}"},{"title":"The user object","method":"","path":"","summary":"","parameters":{"users/object__table":[{"name":"added_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the user was added."},{"name":"email","type":"string","required":false,"description":"The email address of the user"},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints"},{"name":"name","type":"string","required":false,"description":"The name of the user"},{"name":"object","type":"string","required":false,"description":"The object type, which is always organization.user"},{"name":"role","type":"string","required":false,"description":"owner or reader"}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Projects","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List projects","method":"get","path":"https://api.openai.com/v1/organization/projects","summary":"Returns a list of projects.","parameters":{"projects-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"include_archived","type":"boolean","required":false,"default":"false","description":"If true returns all projects including those that have been archived. Archived projects are not included by default."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/projects?after=proj_abc&limit=20&include_archived=false \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n\n{\n    \"object\": \"list\",\n    \"data\": [\n        {\n            \"id\": \"proj_abc\",\n            \"object\": \"organization.project\",\n            \"name\": \"Project example\",\n            \"created_at\": 1711471533,\n            \"archived_at\": null,\n            \"status\": \"active\"\n        }\n    ],\n    \"first_id\": \"proj-abc\",\n    \"last_id\": \"proj-xyz\",\n    \"has_more\": false\n}"},{"title":"Create project","method":"post","path":"https://api.openai.com/v1/organization/projects","summary":"Create a new project in the organization. Projects can be created and archived, but cannot be deleted.","parameters":{"projects-create__table":[{"name":"name","type":"string","required":true,"description":"The friendly name of the project, this name appears in reports."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl -X POST https://api.openai.com/v1/organization/projects \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"name\": \"Project ABC\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n    \"id\": \"proj_abc\",\n    \"object\": \"organization.project\",\n    \"name\": \"Project ABC\",\n    \"created_at\": 1711471533,\n    \"archived_at\": null,\n    \"status\": \"active\"\n}"},{"title":"Retrieve project","method":"get","path":"https://api.openai.com/v1/organization/projects/{project_id}","summary":"Retrieves a project.","parameters":{"projects-retrieve__table":[{"name":"project_id","type":"string","required":true,"description":"The ID of the project."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n    \"id\": \"proj_abc\",\n    \"object\": \"organization.project\",\n    \"name\": \"Project example\",\n    \"created_at\": 1711471533,\n    \"archived_at\": null,\n    \"status\": \"active\"\n}"},{"title":"Modify project","method":"post","path":"https://api.openai.com/v1/organization/projects/{project_id}","summary":"Modifies a project in the organization.","parameters":{"projects-modify__table":[{"name":"name","type":"string","required":true,"description":"The updated name of the project, this name appears in reports."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl -X POST https://api.openai.com/v1/organization/projects/proj_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"name\": \"Project DEF\"\n  }'","exampleResponse":""},{"title":"Archive project","method":"post","path":"https://api.openai.com/v1/organization/projects/{project_id}/archive","summary":"Archives a project in the organization. Archived projects cannot be used or updated.","parameters":{"projects-archive__table":[{"name":"project_id","type":"string","required":true,"description":"The ID of the project."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X POST https://api.openai.com/v1/organization/projects/proj_abc/archive \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n    \"id\": \"proj_abc\",\n    \"object\": \"organization.project\",\n    \"name\": \"Project DEF\",\n    \"created_at\": 1711471533,\n    \"archived_at\": 1711471533,\n    \"status\": \"archived\"\n}"},{"title":"The project object","method":"","path":"","summary":"","parameters":{"projects/object__table":[{"name":"archived_at","type":"integer or null","required":false,"description":"The Unix timestamp (in seconds) of when the project was archived or null."},{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the project was created."},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints"},{"name":"name","type":"string","required":false,"description":"The name of the project. This appears in reporting."},{"name":"object","type":"string","required":false,"description":"The object type, which is always organization.project"},{"name":"status","type":"string","required":false,"description":"active or archived"}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Project users","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List project users","method":"get","path":"https://api.openai.com/v1/organization/projects/{project_id}/users","summary":"Returns a list of users in the project.","parameters":{"project-users-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/users?after=user_abc&limit=20 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n\n{\n    \"object\": \"list\",\n    \"data\": [\n        {\n            \"object\": \"organization.project.user\",\n            \"id\": \"user_abc\",\n            \"name\": \"First Last\",\n            \"email\": \"user@example.com\",\n            \"role\": \"owner\",\n            \"added_at\": 1711471533\n        }\n    ],\n    \"first_id\": \"user-abc\",\n    \"last_id\": \"user-xyz\",\n    \"has_more\": false\n}"},{"title":"Create project user","method":"post","path":"https://api.openai.com/v1/organization/projects/{project_id}/users","summary":"Adds a user to the project. Users must already be members of the organization to be added to a project.","parameters":{"project-users-creeate__table":[{"name":"role","type":"string","required":true,"description":"owner or member"},{"name":"user_id","type":"string","required":true,"description":"The ID of the user."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n\ncurl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"user_id\": \"user_abc\",\n      \"role\": \"member\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n\n{\n    \"object\": \"organization.project.user\",\n    \"id\": \"user_abc\",\n    \"email\": \"user@example.com\",\n    \"role\": \"owner\",\n    \"added_at\": 1711471533\n}"},{"title":"Retrieve project user","method":"get","path":"https://api.openai.com/v1/organization/projects/{project_id}/users/{user_id}","summary":"Retrieves a user in the project.","parameters":{"project-users-retrieve__table":[{"name":"project_id","type":"string","required":true,"description":"The ID of the project."},{"name":"user_id","type":"string","required":true,"description":"The ID of the user."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n    \"object\": \"organization.project.user\",\n    \"id\": \"user_abc\",\n    \"name\": \"First Last\",\n    \"email\": \"user@example.com\",\n    \"role\": \"owner\",\n    \"added_at\": 1711471533\n}"},{"title":"Modify project user","method":"post","path":"https://api.openai.com/v1/organization/projects/{project_id}/users/{user_id}","summary":"Modifies a user's role in the project.","parameters":{"project-users-modify__table":[{"name":"role","type":"string","required":true,"description":"owner or member"}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"role\": \"owner\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n    \"object\": \"organization.project.user\",\n    \"id\": \"user_abc\",\n    \"name\": \"First Last\",\n    \"email\": \"user@example.com\",\n    \"role\": \"owner\",\n    \"added_at\": 1711471533\n}"},{"title":"Delete project user","method":"delete","path":"https://api.openai.com/v1/organization/projects/{project_id}/users/{user_id}","summary":"Deletes a user from the project.","parameters":{"project-users-delete__table":[{"name":"project_id","type":"string","required":true,"description":"The ID of the project."},{"name":"user_id","type":"string","required":true,"description":"The ID of the user."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n    \"object\": \"organization.project.user.deleted\",\n    \"id\": \"user_abc\",\n    \"deleted\": true\n}"},{"title":"The project user object","method":"","path":"","summary":"","parameters":{"project-users/object__table":[{"name":"added_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the project was added."},{"name":"email","type":"string","required":false,"description":"The email address of the user"},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints"},{"name":"name","type":"string","required":false,"description":"The name of the user"},{"name":"object","type":"string","required":false,"description":"The object type, which is always organization.project.user"},{"name":"role","type":"string","required":false,"description":"owner or member"}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Project service accounts","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List project service accounts","method":"get","path":"https://api.openai.com/v1/organization/projects/{project_id}/service_accounts","summary":"Returns a list of service accounts in the project.","parameters":{"project-service-accounts-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts?after=custom_id&limit=20 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n\n{\n    \"object\": \"list\",\n    \"data\": [\n        {\n            \"object\": \"organization.project.service_account\",\n            \"id\": \"svc_acct_abc\",\n            \"name\": \"Service Account\",\n            \"role\": \"owner\",\n            \"created_at\": 1711471533\n        }\n    ],\n    \"first_id\": \"svc_acct_abc\",\n    \"last_id\": \"svc_acct_xyz\",\n    \"has_more\": false\n}"},{"title":"Create project service account","method":"post","path":"https://api.openai.com/v1/organization/projects/{project_id}/service_accounts","summary":"Creates a new service account in the project. This also returns an unredacted API key for the service account.","parameters":{"project-service-accounts-create__table":[{"name":"name","type":"string","required":true,"description":"The name of the service account being created."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"name\": \"Production App\"\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n\n{\n    \"object\": \"organization.project.service_account\",\n    \"id\": \"svc_acct_abc\",\n    \"name\": \"Production App\",\n    \"role\": \"member\",\n    \"created_at\": 1711471533,\n    \"api_key\": {\n        \"object\": \"organization.project.service_account.api_key\",\n        \"value\": \"sk-abcdefghijklmnop123\",\n        \"name\": \"Secret Key\",\n        \"created_at\": 1711471533,\n        \"id\": \"key_abc\"\n    }\n}"},{"title":"Retrieve project service account","method":"get","path":"https://api.openai.com/v1/organization/projects/{project_id}/service_accounts/{service_account_id}","summary":"Retrieves a service account in the project.","parameters":{"project-service-accounts-retrieve__table":[{"name":"project_id","type":"string","required":true,"description":"The ID of the project."},{"name":"service_account_id","type":"string","required":true,"description":"The ID of the service account."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n\n{\n    \"object\": \"organization.project.service_account\",\n    \"id\": \"svc_acct_abc\",\n    \"name\": \"Service Account\",\n    \"role\": \"owner\",\n    \"created_at\": 1711471533\n}"},{"title":"Delete project service account","method":"delete","path":"https://api.openai.com/v1/organization/projects/{project_id}/service_accounts/{service_account_id}","summary":"Deletes a service account from the project.","parameters":{"project-service-accounts-delete__table":[{"name":"project_id","type":"string","required":true,"description":"The ID of the project."},{"name":"service_account_id","type":"string","required":true,"description":"The ID of the service account."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n    \"object\": \"organization.project.service_account.deleted\",\n    \"id\": \"svc_acct_abc\",\n    \"deleted\": true\n}"},{"title":"The project service account object","method":"","path":"","summary":"","parameters":{"project-service-accounts/object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the service account was created"},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints"},{"name":"name","type":"string","required":false,"description":"The name of the service account"},{"name":"object","type":"string","required":false,"description":"The object type, which is always organization.project.service_account"},{"name":"role","type":"string","required":false,"description":"owner or member"}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Project API keys","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List project API keys","method":"get","path":"https://api.openai.com/v1/organization/projects/{project_id}/api_keys","summary":"Returns a list of API keys in the project.","parameters":{"project-api-keys-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/api_keys?after=key_abc&limit=20 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n\n{\n    \"object\": \"list\",\n    \"data\": [\n        {\n            \"object\": \"organization.project.api_key\",\n            \"redacted_value\": \"sk-abc...def\",\n            \"name\": \"My API Key\",\n            \"created_at\": 1711471533,\n            \"last_used_at\": 1711471534,\n            \"id\": \"key_abc\",\n            \"owner\": {\n                \"type\": \"user\",\n                \"user\": {\n                    \"object\": \"organization.project.user\",\n                    \"id\": \"user_abc\",\n                    \"name\": \"First Last\",\n                    \"email\": \"user@example.com\",\n                    \"role\": \"owner\",\n                    \"added_at\": 1711471533\n                }\n            }\n        }\n    ],\n    \"first_id\": \"key_abc\",\n    \"last_id\": \"key_xyz\",\n    \"has_more\": false\n}"},{"title":"Retrieve project API key","method":"get","path":"https://api.openai.com/v1/organization/projects/{project_id}/api_keys/{key_id}","summary":"Retrieves an API key in the project.","parameters":{"project-api-keys-retrieve__table":[{"name":"key_id","type":"string","required":true,"description":"The ID of the API key."},{"name":"project_id","type":"string","required":true,"description":"The ID of the project."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n\n{\n    \"object\": \"organization.project.api_key\",\n    \"redacted_value\": \"sk-abc...def\",\n    \"name\": \"My API Key\",\n    \"created_at\": 1711471533,\n    \"last_used_at\": 1711471534,\n    \"id\": \"key_abc\",\n    \"owner\": {\n        \"type\": \"user\",\n        \"user\": {\n            \"object\": \"organization.project.user\",\n            \"id\": \"user_abc\",\n            \"name\": \"First Last\",\n            \"email\": \"user@example.com\",\n            \"role\": \"owner\",\n            \"added_at\": 1711471533\n        }\n    }\n}"},{"title":"Delete project API key","method":"delete","path":"https://api.openai.com/v1/organization/projects/{project_id}/api_keys/{key_id}","summary":"Deletes an API key from the project.","parameters":{"project-api-keys-delete__table":[{"name":"key_id","type":"string","required":true,"description":"The ID of the API key."},{"name":"project_id","type":"string","required":true,"description":"The ID of the project."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n\n{\n    \"object\": \"organization.project.api_key.deleted\",\n    \"id\": \"key_abc\",\n    \"deleted\": true\n}"},{"title":"The project API key object","method":"","path":"","summary":"","parameters":{"project-api-keys/object__table":[{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the API key was created"},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints"},{"name":"last_used_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the API key was last used."},{"name":"name","type":"string","required":false,"description":"The name of the API key"},{"name":"object","type":"string","required":false,"description":"The object type, which is always organization.project.api_key"},{"name":"owner","type":"object","required":false,"description":""},{"name":"redacted_value","type":"string","required":false,"description":"The redacted value of the API key"}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Project rate limits","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List project rate limits","method":"get","path":"https://api.openai.com/v1/organization/projects/{project_id}/rate_limits","summary":"Returns the rate limits per model for a project.","parameters":{"project-rate-limits-list__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"before","type":"string","required":false,"description":"A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, beginning with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list."},{"name":"limit","type":"integer","required":false,"default":"100","description":"A limit on the number of objects to be returned. The default is 100."}]},"returns":"string","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/rate_limits?after=rl_xxx&limit=20 \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n\n{\n    \"object\": \"list\",\n    \"data\": [\n        {\n          \"object\": \"project.rate_limit\",\n          \"id\": \"rl-ada\",\n          \"model\": \"ada\",\n          \"max_requests_per_1_minute\": 600,\n          \"max_tokens_per_1_minute\": 150000,\n          \"max_images_per_1_minute\": 10\n        }\n    ],\n    \"first_id\": \"rl-ada\",\n    \"last_id\": \"rl-ada\",\n    \"has_more\": false\n}"},{"title":"Modify project rate limit","method":"post","path":"https://api.openai.com/v1/organization/projects/{project_id}/rate_limits/{rate_limit_id}","summary":"Updates a project rate limit.","parameters":{"project-rate-limits-update__table":[{"name":"batch_1_day_max_input_tokens","type":"integer","required":false,"description":"The maximum batch input tokens per day. Only relevant for certain models."},{"name":"max_audio_megabytes_per_1_minute","type":"integer","required":false,"description":"The maximum audio megabytes per minute. Only relevant for certain models."},{"name":"max_images_per_1_minute","type":"integer","required":false,"description":"The maximum images per minute. Only relevant for certain models."},{"name":"max_requests_per_1_day","type":"integer","required":false,"description":"The maximum requests per day. Only relevant for certain models."},{"name":"max_requests_per_1_minute","type":"integer","required":false,"description":"The maximum requests per minute."},{"name":"max_tokens_per_1_minute","type":"integer","required":false,"description":"The maximum tokens per minute."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl -X POST https://api.openai.com/v1/organization/projects/proj_abc/rate_limits/rl_xxx \\\n  -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"max_requests_per_1_minute\": 500\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n\n{\n    \"object\": \"project.rate_limit\",\n    \"id\": \"rl-ada\",\n    \"model\": \"ada\",\n    \"max_requests_per_1_minute\": 600,\n    \"max_tokens_per_1_minute\": 150000,\n    \"max_images_per_1_minute\": 10\n  }"},{"title":"The project rate limit object","method":"","path":"","summary":"","parameters":{"project-rate-limits/object__table":[{"name":"batch_1_day_max_input_tokens","type":"integer","required":false,"description":"The maximum batch input tokens per day. Only present for relevant models."},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints."},{"name":"max_audio_megabytes_per_1_minute","type":"integer","required":false,"description":"The maximum audio megabytes per minute. Only present for relevant models."},{"name":"max_images_per_1_minute","type":"integer","required":false,"description":"The maximum images per minute. Only present for relevant models."},{"name":"max_requests_per_1_day","type":"integer","required":false,"description":"The maximum requests per day. Only present for relevant models."},{"name":"max_requests_per_1_minute","type":"integer","required":false,"description":"The maximum requests per minute."},{"name":"max_tokens_per_1_minute","type":"integer","required":false,"description":"The maximum tokens per minute."},{"name":"model","type":"string","required":false,"description":"The model this rate limit applies to."},{"name":"object","type":"string","required":false,"description":"The object type, which is always project.rate_limit"}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Audit logs","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"List audit logs","method":"get","path":"https://api.openai.com/v1/organization/audit_logs","summary":"List user actions and configuration changes within this organization.","parameters":{"audit-logs-list__table":[{"name":"actor_emails[]","type":"array","required":false,"description":"Return only events performed by users with these emails."},{"name":"actor_ids[]","type":"array","required":false,"description":"Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID."},{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"before","type":"string","required":false,"description":"A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list."},{"name":"effective_at","type":"object","required":false,"description":"Return only events whose effective_at (Unix seconds) is in this range."},{"name":"event_types[]","type":"array","required":false,"description":"Return only events with a type in one of these values. For example, project.created. For all options, see the documentation for the audit log object."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"project_ids[]","type":"array","required":false,"description":"Return only events for these projects."},{"name":"resource_ids[]","type":"array","required":false,"description":"Return only events performed on these targets. For example, a project ID updated."}]},"returns":"array","exampleRequest":"1\n2\n3\n\ncurl https://api.openai.com/v1/organization/audit_logs \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n\n{\n    \"object\": \"list\",\n    \"data\": [\n        {\n            \"id\": \"audit_log-xxx_yyyymmdd\",\n            \"type\": \"project.archived\",\n            \"effective_at\": 1722461446,\n            \"actor\": {\n                \"type\": \"api_key\",\n                \"api_key\": {\n                    \"type\": \"user\",\n                    \"user\": {\n                        \"id\": \"user-xxx\",\n                        \"email\": \"user@example.com\"\n                    }\n                }\n            },\n            \"project.archived\": {\n                \"id\": \"proj_abc\"\n            },\n        },\n        {\n            \"id\": \"audit_log-yyy__20240101\",\n            \"type\": \"api_key.updated\",\n            \"effective_at\": 1720804190,\n            \"actor\": {\n                \"type\": \"session\",\n                \"session\": {\n                    \"user\": {\n                        \"id\": \"user-xxx\",\n                        \"email\": \"user@example.com\"\n                    },\n                    \"ip_address\": \"127.0.0.1\",\n                    \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\",\n                    \"ja3\": \"a497151ce4338a12c4418c44d375173e\",\n                    \"ja4\": \"q13d0313h3_55b375c5d22e_c7319ce65786\",\n                    \"ip_address_details\": {\n                      \"country\": \"US\",\n                      \"city\": \"San Francisco\",\n                      \"region\": \"California\",\n                      \"region_code\": \"CA\",\n                      \"asn\": \"1234\",\n                      \"latitude\": \"37.77490\",\n                      \"longitude\": \"-122.41940\"\n                    }\n                }\n            },\n            \"api_key.updated\": {\n                \"id\": \"key_xxxx\",\n                \"data\": {\n                    \"scopes\": [\"resource_2.operation_2\"]\n                }\n            },\n        }\n    ],\n    \"first_id\": \"audit_log-xxx__20240101\",\n    \"last_id\": \"audit_log_yyy__20240101\",\n    \"has_more\": true\n}"},{"title":"The audit log object","method":"","path":"","summary":"","parameters":{"audit-logs/object__table":[{"name":"actor","type":"object","required":false,"description":"The actor who performed the audit logged action."},{"name":"api_key.created","type":"object","required":false,"description":"The details for events with this type."},{"name":"api_key.deleted","type":"object","required":false,"description":"The details for events with this type."},{"name":"api_key.updated","type":"object","required":false,"description":"The details for events with this type."},{"name":"certificate.created","type":"object","required":false,"description":"The details for events with this type."},{"name":"certificate.deleted","type":"object","required":false,"description":"The details for events with this type."},{"name":"certificate.updated","type":"object","required":false,"description":"The details for events with this type."},{"name":"certificates.activated","type":"object","required":false,"description":"The details for events with this type."},{"name":"certificates.deactivated","type":"object","required":false,"description":"The details for events with this type."},{"name":"checkpoint_permission.created","type":"object","required":false,"description":"The project and fine-tuned model checkpoint that the checkpoint permission was created for."},{"name":"checkpoint_permission.deleted","type":"object","required":false,"description":"The details for events with this type."},{"name":"effective_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of the event."},{"name":"id","type":"string","required":false,"description":"The ID of this log."},{"name":"invite.accepted","type":"object","required":false,"description":"The details for events with this type."},{"name":"invite.deleted","type":"object","required":false,"description":"The details for events with this type."},{"name":"invite.sent","type":"object","required":false,"description":"The details for events with this type."},{"name":"login.failed","type":"object","required":false,"description":"The details for events with this type."},{"name":"logout.failed","type":"object","required":false,"description":"The details for events with this type."},{"name":"organization.updated","type":"object","required":false,"description":"The details for events with this type."},{"name":"project","type":"object","required":false,"description":"The project that the action was scoped to. Absent for actions not scoped to projects."},{"name":"project.archived","type":"object","required":false,"description":"The details for events with this type."},{"name":"project.created","type":"object","required":false,"description":"The details for events with this type."},{"name":"project.updated","type":"object","required":false,"description":"The details for events with this type."},{"name":"rate_limit.deleted","type":"object","required":false,"description":"The details for events with this type."},{"name":"rate_limit.updated","type":"object","required":false,"description":"The details for events with this type."},{"name":"service_account.created","type":"object","required":false,"description":"The details for events with this type."},{"name":"service_account.deleted","type":"object","required":false,"description":"The details for events with this type."},{"name":"service_account.updated","type":"object","required":false,"description":"The details for events with this type."},{"name":"type","type":"string","required":false,"description":"The event type."},{"name":"user.added","type":"object","required":false,"description":"The details for events with this type."},{"name":"user.deleted","type":"object","required":false,"description":"The details for events with this type."},{"name":"user.updated","type":"object","required":false,"description":"The details for events with this type."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Usage","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Completions","method":"get","path":"https://api.openai.com/v1/organization/usage/completions","summary":"Get completions usage details for the organization.","parameters":{"usage-completions__table":[{"name":"start_time","type":"integer","required":true,"description":"Start time (Unix seconds) of the query time range, inclusive."},{"name":"api_key_ids","type":"array","required":false,"description":"Return only usage for these API keys."},{"name":"batch","type":"boolean","required":false,"description":"If true, return batch jobs only. If false, return non-batch jobs only. By default, return both."},{"name":"bucket_width","type":"string","required":false,"default":"1d","description":"Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d."},{"name":"end_time","type":"integer","required":false,"description":"End time (Unix seconds) of the query time range, exclusive."},{"name":"group_by","type":"array","required":false,"description":"Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model, batch or any combination of them."},{"name":"limit","type":"integer","required":false,"description":"Specifies the number of buckets to return. bucket_width=1d: default: 7, max: 31 bucket_width=1h: default: 24, max: 168 bucket_width=1m: default: 60, max: 1440"},{"name":"models","type":"array","required":false,"description":"Return only usage for these models."},{"name":"page","type":"string","required":false,"description":"A cursor for use in pagination. Corresponding to the next_page field from the previous response."},{"name":"project_ids","type":"array","required":false,"description":"Return only usage for these projects."},{"name":"user_ids","type":"array","required":false,"description":"Return only usage for these users."}]},"returns":"integer","exampleRequest":"1\n2\n3\n\ncurl \"https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n\n{\n    \"object\": \"page\",\n    \"data\": [\n        {\n            \"object\": \"bucket\",\n            \"start_time\": 1730419200,\n            \"end_time\": 1730505600,\n            \"results\": [\n                {\n                    \"object\": \"organization.usage.completions.result\",\n                    \"input_tokens\": 1000,\n                    \"output_tokens\": 500,\n                    \"input_cached_tokens\": 800,\n                    \"input_audio_tokens\": 0,\n                    \"output_audio_tokens\": 0,\n                    \"num_model_requests\": 5,\n                    \"project_id\": null,\n                    \"user_id\": null,\n                    \"api_key_id\": null,\n                    \"model\": null,\n                    \"batch\": null\n                }\n            ]\n        }\n    ],\n    \"has_more\": true,\n    \"next_page\": \"page_AAAAAGdGxdEiJdKOAAAAAGcqsYA=\"\n}"},{"title":"Completions usage object","method":"","path":"","summary":"","parameters":{"usage/completions_object__table":[{"name":"api_key_id","type":"string or null","required":false,"description":"When group_by=api_key_id, this field provides the API key ID of the grouped usage result."},{"name":"batch","type":"boolean or null","required":false,"description":"When group_by=batch, this field tells whether the grouped usage result is batch or not."},{"name":"input_audio_tokens","type":"integer","required":false,"description":"The aggregated number of audio input tokens used, including cached tokens."},{"name":"input_cached_tokens","type":"integer","required":false,"description":"The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens."},{"name":"input_tokens","type":"integer","required":false,"description":"The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens."},{"name":"model","type":"string or null","required":false,"description":"When group_by=model, this field provides the model name of the grouped usage result."},{"name":"num_model_requests","type":"integer","required":false,"description":"The count of requests made to the model."},{"name":"object","type":"string","required":false,"description":""},{"name":"output_audio_tokens","type":"integer","required":false,"description":"The aggregated number of audio output tokens used."},{"name":"output_tokens","type":"integer","required":false,"description":"The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens."},{"name":"project_id","type":"string or null","required":false,"description":"When group_by=project_id, this field provides the project ID of the grouped usage result."},{"name":"user_id","type":"string or null","required":false,"description":"When group_by=user_id, this field provides the user ID of the grouped usage result."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Embeddings","method":"get","path":"https://api.openai.com/v1/organization/usage/embeddings","summary":"Get embeddings usage details for the organization.","parameters":{"usage-embeddings__table":[{"name":"start_time","type":"integer","required":true,"description":"Start time (Unix seconds) of the query time range, inclusive."},{"name":"api_key_ids","type":"array","required":false,"description":"Return only usage for these API keys."},{"name":"bucket_width","type":"string","required":false,"default":"1d","description":"Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d."},{"name":"end_time","type":"integer","required":false,"description":"End time (Unix seconds) of the query time range, exclusive."},{"name":"group_by","type":"array","required":false,"description":"Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them."},{"name":"limit","type":"integer","required":false,"description":"Specifies the number of buckets to return. bucket_width=1d: default: 7, max: 31 bucket_width=1h: default: 24, max: 168 bucket_width=1m: default: 60, max: 1440"},{"name":"models","type":"array","required":false,"description":"Return only usage for these models."},{"name":"page","type":"string","required":false,"description":"A cursor for use in pagination. Corresponding to the next_page field from the previous response."},{"name":"project_ids","type":"array","required":false,"description":"Return only usage for these projects."},{"name":"user_ids","type":"array","required":false,"description":"Return only usage for these users."}]},"returns":"integer","exampleRequest":"1\n2\n3\n\ncurl \"https://api.openai.com/v1/organization/usage/embeddings?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n\n{\n    \"object\": \"page\",\n    \"data\": [\n        {\n            \"object\": \"bucket\",\n            \"start_time\": 1730419200,\n            \"end_time\": 1730505600,\n            \"results\": [\n                {\n                    \"object\": \"organization.usage.embeddings.result\",\n                    \"input_tokens\": 16,\n                    \"num_model_requests\": 2,\n                    \"project_id\": null,\n                    \"user_id\": null,\n                    \"api_key_id\": null,\n                    \"model\": null\n                }\n            ]\n        }\n    ],\n    \"has_more\": false,\n    \"next_page\": null\n}"},{"title":"Embeddings usage object","method":"","path":"","summary":"","parameters":{"usage/embeddings_object__table":[{"name":"api_key_id","type":"string or null","required":false,"description":"When group_by=api_key_id, this field provides the API key ID of the grouped usage result."},{"name":"input_tokens","type":"integer","required":false,"description":"The aggregated number of input tokens used."},{"name":"model","type":"string or null","required":false,"description":"When group_by=model, this field provides the model name of the grouped usage result."},{"name":"num_model_requests","type":"integer","required":false,"description":"The count of requests made to the model."},{"name":"object","type":"string","required":false,"description":""},{"name":"project_id","type":"string or null","required":false,"description":"When group_by=project_id, this field provides the project ID of the grouped usage result."},{"name":"user_id","type":"string or null","required":false,"description":"When group_by=user_id, this field provides the user ID of the grouped usage result."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Moderations","method":"get","path":"https://api.openai.com/v1/organization/usage/moderations","summary":"Get moderations usage details for the organization.","parameters":{"usage-moderations__table":[{"name":"start_time","type":"integer","required":true,"description":"Start time (Unix seconds) of the query time range, inclusive."},{"name":"api_key_ids","type":"array","required":false,"description":"Return only usage for these API keys."},{"name":"bucket_width","type":"string","required":false,"default":"1d","description":"Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d."},{"name":"end_time","type":"integer","required":false,"description":"End time (Unix seconds) of the query time range, exclusive."},{"name":"group_by","type":"array","required":false,"description":"Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them."},{"name":"limit","type":"integer","required":false,"description":"Specifies the number of buckets to return. bucket_width=1d: default: 7, max: 31 bucket_width=1h: default: 24, max: 168 bucket_width=1m: default: 60, max: 1440"},{"name":"models","type":"array","required":false,"description":"Return only usage for these models."},{"name":"page","type":"string","required":false,"description":"A cursor for use in pagination. Corresponding to the next_page field from the previous response."},{"name":"project_ids","type":"array","required":false,"description":"Return only usage for these projects."},{"name":"user_ids","type":"array","required":false,"description":"Return only usage for these users."}]},"returns":"integer","exampleRequest":"1\n2\n3\n\ncurl \"https://api.openai.com/v1/organization/usage/moderations?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n\n{\n    \"object\": \"page\",\n    \"data\": [\n        {\n            \"object\": \"bucket\",\n            \"start_time\": 1730419200,\n            \"end_time\": 1730505600,\n            \"results\": [\n                {\n                    \"object\": \"organization.usage.moderations.result\",\n                    \"input_tokens\": 16,\n                    \"num_model_requests\": 2,\n                    \"project_id\": null,\n                    \"user_id\": null,\n                    \"api_key_id\": null,\n                    \"model\": null\n                }\n            ]\n        }\n    ],\n    \"has_more\": false,\n    \"next_page\": null\n}"},{"title":"Moderations usage object","method":"","path":"","summary":"","parameters":{"usage/moderations_object__table":[{"name":"api_key_id","type":"string or null","required":false,"description":"When group_by=api_key_id, this field provides the API key ID of the grouped usage result."},{"name":"input_tokens","type":"integer","required":false,"description":"The aggregated number of input tokens used."},{"name":"model","type":"string or null","required":false,"description":"When group_by=model, this field provides the model name of the grouped usage result."},{"name":"num_model_requests","type":"integer","required":false,"description":"The count of requests made to the model."},{"name":"object","type":"string","required":false,"description":""},{"name":"project_id","type":"string or null","required":false,"description":"When group_by=project_id, this field provides the project ID of the grouped usage result."},{"name":"user_id","type":"string or null","required":false,"description":"When group_by=user_id, this field provides the user ID of the grouped usage result."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Images","method":"get","path":"https://api.openai.com/v1/organization/usage/images","summary":"Get images usage details for the organization.","parameters":{"usage-images__table":[{"name":"start_time","type":"integer","required":true,"description":"Start time (Unix seconds) of the query time range, inclusive."},{"name":"api_key_ids","type":"array","required":false,"description":"Return only usage for these API keys."},{"name":"bucket_width","type":"string","required":false,"default":"1d","description":"Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d."},{"name":"end_time","type":"integer","required":false,"description":"End time (Unix seconds) of the query time range, exclusive."},{"name":"group_by","type":"array","required":false,"description":"Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model, size, source or any combination of them."},{"name":"limit","type":"integer","required":false,"description":"Specifies the number of buckets to return. bucket_width=1d: default: 7, max: 31 bucket_width=1h: default: 24, max: 168 bucket_width=1m: default: 60, max: 1440"},{"name":"models","type":"array","required":false,"description":"Return only usage for these models."},{"name":"page","type":"string","required":false,"description":"A cursor for use in pagination. Corresponding to the next_page field from the previous response."},{"name":"project_ids","type":"array","required":false,"description":"Return only usage for these projects."},{"name":"sizes","type":"array","required":false,"description":"Return only usages for these image sizes. Possible values are 256x256, 512x512, 1024x1024, 1792x1792, 1024x1792 or any combination of them."},{"name":"sources","type":"array","required":false,"description":"Return only usages for these sources. Possible values are image.generation, image.edit, image.variation or any combination of them."},{"name":"user_ids","type":"array","required":false,"description":"Return only usage for these users."}]},"returns":"integer","exampleRequest":"1\n2\n3\n\ncurl \"https://api.openai.com/v1/organization/usage/images?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n\n{\n    \"object\": \"page\",\n    \"data\": [\n        {\n            \"object\": \"bucket\",\n            \"start_time\": 1730419200,\n            \"end_time\": 1730505600,\n            \"results\": [\n                {\n                    \"object\": \"organization.usage.images.result\",\n                    \"images\": 2,\n                    \"num_model_requests\": 2,\n                    \"size\": null,\n                    \"source\": null,\n                    \"project_id\": null,\n                    \"user_id\": null,\n                    \"api_key_id\": null,\n                    \"model\": null\n                }\n            ]\n        }\n    ],\n    \"has_more\": false,\n    \"next_page\": null\n}"},{"title":"Images usage object","method":"","path":"","summary":"","parameters":{"usage/images_object__table":[{"name":"api_key_id","type":"string or null","required":false,"description":"When group_by=api_key_id, this field provides the API key ID of the grouped usage result."},{"name":"images","type":"integer","required":false,"description":"The number of images processed."},{"name":"model","type":"string or null","required":false,"description":"When group_by=model, this field provides the model name of the grouped usage result."},{"name":"num_model_requests","type":"integer","required":false,"description":"The count of requests made to the model."},{"name":"object","type":"string","required":false,"description":""},{"name":"project_id","type":"string or null","required":false,"description":"When group_by=project_id, this field provides the project ID of the grouped usage result."},{"name":"size","type":"string or null","required":false,"description":"When group_by=size, this field provides the image size of the grouped usage result."},{"name":"source","type":"string or null","required":false,"description":"When group_by=source, this field provides the source of the grouped usage result, possible values are image.generation, image.edit, image.variation."},{"name":"user_id","type":"string or null","required":false,"description":"When group_by=user_id, this field provides the user ID of the grouped usage result."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Audio speeches","method":"get","path":"https://api.openai.com/v1/organization/usage/audio_speeches","summary":"Get audio speeches usage details for the organization.","parameters":{"usage-audio_speeches__table":[{"name":"start_time","type":"integer","required":true,"description":"Start time (Unix seconds) of the query time range, inclusive."},{"name":"api_key_ids","type":"array","required":false,"description":"Return only usage for these API keys."},{"name":"bucket_width","type":"string","required":false,"default":"1d","description":"Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d."},{"name":"end_time","type":"integer","required":false,"description":"End time (Unix seconds) of the query time range, exclusive."},{"name":"group_by","type":"array","required":false,"description":"Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them."},{"name":"limit","type":"integer","required":false,"description":"Specifies the number of buckets to return. bucket_width=1d: default: 7, max: 31 bucket_width=1h: default: 24, max: 168 bucket_width=1m: default: 60, max: 1440"},{"name":"models","type":"array","required":false,"description":"Return only usage for these models."},{"name":"page","type":"string","required":false,"description":"A cursor for use in pagination. Corresponding to the next_page field from the previous response."},{"name":"project_ids","type":"array","required":false,"description":"Return only usage for these projects."},{"name":"user_ids","type":"array","required":false,"description":"Return only usage for these users."}]},"returns":"integer","exampleRequest":"1\n2\n3\n\ncurl \"https://api.openai.com/v1/organization/usage/audio_speeches?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n\n{\n    \"object\": \"page\",\n    \"data\": [\n        {\n            \"object\": \"bucket\",\n            \"start_time\": 1730419200,\n            \"end_time\": 1730505600,\n            \"results\": [\n                {\n                    \"object\": \"organization.usage.audio_speeches.result\",\n                    \"characters\": 45,\n                    \"num_model_requests\": 1,\n                    \"project_id\": null,\n                    \"user_id\": null,\n                    \"api_key_id\": null,\n                    \"model\": null\n                }\n            ]\n        }\n    ],\n    \"has_more\": false,\n    \"next_page\": null\n}"},{"title":"Audio speeches usage object","method":"","path":"","summary":"","parameters":{"usage/audio_speeches_object__table":[{"name":"api_key_id","type":"string or null","required":false,"description":"When group_by=api_key_id, this field provides the API key ID of the grouped usage result."},{"name":"characters","type":"integer","required":false,"description":"The number of characters processed."},{"name":"model","type":"string or null","required":false,"description":"When group_by=model, this field provides the model name of the grouped usage result."},{"name":"num_model_requests","type":"integer","required":false,"description":"The count of requests made to the model."},{"name":"object","type":"string","required":false,"description":""},{"name":"project_id","type":"string or null","required":false,"description":"When group_by=project_id, this field provides the project ID of the grouped usage result."},{"name":"user_id","type":"string or null","required":false,"description":"When group_by=user_id, this field provides the user ID of the grouped usage result."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Audio transcriptions","method":"get","path":"https://api.openai.com/v1/organization/usage/audio_transcriptions","summary":"Get audio transcriptions usage details for the organization.","parameters":{"usage-audio_transcriptions__table":[{"name":"start_time","type":"integer","required":true,"description":"Start time (Unix seconds) of the query time range, inclusive."},{"name":"api_key_ids","type":"array","required":false,"description":"Return only usage for these API keys."},{"name":"bucket_width","type":"string","required":false,"default":"1d","description":"Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d."},{"name":"end_time","type":"integer","required":false,"description":"End time (Unix seconds) of the query time range, exclusive."},{"name":"group_by","type":"array","required":false,"description":"Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them."},{"name":"limit","type":"integer","required":false,"description":"Specifies the number of buckets to return. bucket_width=1d: default: 7, max: 31 bucket_width=1h: default: 24, max: 168 bucket_width=1m: default: 60, max: 1440"},{"name":"models","type":"array","required":false,"description":"Return only usage for these models."},{"name":"page","type":"string","required":false,"description":"A cursor for use in pagination. Corresponding to the next_page field from the previous response."},{"name":"project_ids","type":"array","required":false,"description":"Return only usage for these projects."},{"name":"user_ids","type":"array","required":false,"description":"Return only usage for these users."}]},"returns":"integer","exampleRequest":"1\n2\n3\n\ncurl \"https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n\n{\n    \"object\": \"page\",\n    \"data\": [\n        {\n            \"object\": \"bucket\",\n            \"start_time\": 1730419200,\n            \"end_time\": 1730505600,\n            \"results\": [\n                {\n                    \"object\": \"organization.usage.audio_transcriptions.result\",\n                    \"seconds\": 20,\n                    \"num_model_requests\": 1,\n                    \"project_id\": null,\n                    \"user_id\": null,\n                    \"api_key_id\": null,\n                    \"model\": null\n                }\n            ]\n        }\n    ],\n    \"has_more\": false,\n    \"next_page\": null\n}"},{"title":"Audio transcriptions usage object","method":"","path":"","summary":"","parameters":{"usage/audio_transcriptions_object__table":[{"name":"api_key_id","type":"string or null","required":false,"description":"When group_by=api_key_id, this field provides the API key ID of the grouped usage result."},{"name":"model","type":"string or null","required":false,"description":"When group_by=model, this field provides the model name of the grouped usage result."},{"name":"num_model_requests","type":"integer","required":false,"description":"The count of requests made to the model."},{"name":"object","type":"string","required":false,"description":""},{"name":"project_id","type":"string or null","required":false,"description":"When group_by=project_id, this field provides the project ID of the grouped usage result."},{"name":"seconds","type":"integer","required":false,"description":"The number of seconds processed."},{"name":"user_id","type":"string or null","required":false,"description":"When group_by=user_id, this field provides the user ID of the grouped usage result."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Vector stores","method":"get","path":"https://api.openai.com/v1/organization/usage/vector_stores","summary":"Get vector stores usage details for the organization.","parameters":{"usage-vector_stores__table":[{"name":"start_time","type":"integer","required":true,"description":"Start time (Unix seconds) of the query time range, inclusive."},{"name":"bucket_width","type":"string","required":false,"default":"1d","description":"Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d."},{"name":"end_time","type":"integer","required":false,"description":"End time (Unix seconds) of the query time range, exclusive."},{"name":"group_by","type":"array","required":false,"description":"Group the usage data by the specified fields. Support fields include project_id."},{"name":"limit","type":"integer","required":false,"description":"Specifies the number of buckets to return. bucket_width=1d: default: 7, max: 31 bucket_width=1h: default: 24, max: 168 bucket_width=1m: default: 60, max: 1440"},{"name":"page","type":"string","required":false,"description":"A cursor for use in pagination. Corresponding to the next_page field from the previous response."},{"name":"project_ids","type":"array","required":false,"description":"Return only usage for these projects."}]},"returns":"integer","exampleRequest":"1\n2\n3\n\ncurl \"https://api.openai.com/v1/organization/usage/vector_stores?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n\n{\n    \"object\": \"page\",\n    \"data\": [\n        {\n            \"object\": \"bucket\",\n            \"start_time\": 1730419200,\n            \"end_time\": 1730505600,\n            \"results\": [\n                {\n                    \"object\": \"organization.usage.vector_stores.result\",\n                    \"usage_bytes\": 1024,\n                    \"project_id\": null\n                }\n            ]\n        }\n    ],\n    \"has_more\": false,\n    \"next_page\": null\n}"},{"title":"Vector stores usage object","method":"","path":"","summary":"","parameters":{"usage/vector_stores_object__table":[{"name":"object","type":"string","required":false,"description":""},{"name":"project_id","type":"string or null","required":false,"description":"When group_by=project_id, this field provides the project ID of the grouped usage result."},{"name":"usage_bytes","type":"integer","required":false,"description":"The vector stores usage in bytes."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Code interpreter sessions","method":"get","path":"https://api.openai.com/v1/organization/usage/code_interpreter_sessions","summary":"Get code interpreter sessions usage details for the organization.","parameters":{"usage-code_interpreter_sessions__table":[{"name":"start_time","type":"integer","required":true,"description":"Start time (Unix seconds) of the query time range, inclusive."},{"name":"bucket_width","type":"string","required":false,"default":"1d","description":"Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d."},{"name":"end_time","type":"integer","required":false,"description":"End time (Unix seconds) of the query time range, exclusive."},{"name":"group_by","type":"array","required":false,"description":"Group the usage data by the specified fields. Support fields include project_id."},{"name":"limit","type":"integer","required":false,"description":"Specifies the number of buckets to return. bucket_width=1d: default: 7, max: 31 bucket_width=1h: default: 24, max: 168 bucket_width=1m: default: 60, max: 1440"},{"name":"page","type":"string","required":false,"description":"A cursor for use in pagination. Corresponding to the next_page field from the previous response."},{"name":"project_ids","type":"array","required":false,"description":"Return only usage for these projects."}]},"returns":"integer","exampleRequest":"","exampleResponse":""},{"title":"Code interpreter sessions usage object","method":"","path":"","summary":"","parameters":{"usage/code_interpreter_sessions_object__table":[{"name":"num_sessions","type":"integer","required":false,"description":"The number of code interpreter sessions."},{"name":"object","type":"string","required":false,"description":""},{"name":"project_id","type":"string or null","required":false,"description":"When group_by=project_id, this field provides the project ID of the grouped usage result."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Costs","method":"get","path":"https://api.openai.com/v1/organization/costs","summary":"Get costs details for the organization.","parameters":{"usage-costs__table":[{"name":"start_time","type":"integer","required":true,"description":"Start time (Unix seconds) of the query time range, inclusive."},{"name":"bucket_width","type":"string","required":false,"default":"1d","description":"Width of each time bucket in response. Currently only 1d is supported, default to 1d."},{"name":"end_time","type":"integer","required":false,"description":"End time (Unix seconds) of the query time range, exclusive."},{"name":"group_by","type":"array","required":false,"description":"Group the costs by the specified fields. Support fields include project_id, line_item and any combination of them."},{"name":"limit","type":"integer","required":false,"default":"7","description":"A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7."},{"name":"page","type":"string","required":false,"description":"A cursor for use in pagination. Corresponding to the next_page field from the previous response."},{"name":"project_ids","type":"array","required":false,"description":"Return only costs for these projects."}]},"returns":"integer","exampleRequest":"1\n2\n3\n\ncurl \"https://api.openai.com/v1/organization/costs?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n\n{\n    \"object\": \"page\",\n    \"data\": [\n        {\n            \"object\": \"bucket\",\n            \"start_time\": 1730419200,\n            \"end_time\": 1730505600,\n            \"results\": [\n                {\n                    \"object\": \"organization.costs.result\",\n                    \"amount\": {\n                        \"value\": 0.06,\n                        \"currency\": \"usd\"\n                    },\n                    \"line_item\": null,\n                    \"project_id\": null\n                }\n            ]\n        }\n    ],\n    \"has_more\": false,\n    \"next_page\": null\n}"},{"title":"Costs object","method":"","path":"","summary":"","parameters":{"usage/costs_object__table":[{"name":"amount","type":"object","required":false,"description":"The monetary value in its associated currency."},{"name":"line_item","type":"string or null","required":false,"description":"When group_by=line_item, this field provides the line item of the grouped costs result."},{"name":"object","type":"string","required":false,"description":""},{"name":"project_id","type":"string or null","required":false,"description":"When group_by=project_id, this field provides the project ID of the grouped costs result."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"CertificatesBeta","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Upload certificate","method":"post","path":"https://api.openai.com/v1/organization/certificates","summary":"Upload a certificate to the organization. This does not automatically activate the certificate.","parameters":{"certificates-uploadcertificate__table":[{"name":"content","type":"string","required":true,"description":"The certificate content in PEM format"},{"name":"name","type":"string","required":false,"description":"An optional name for the certificate"}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n\ncurl -X POST https://api.openai.com/v1/organization/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"name\": \"My Example Certificate\",\n  \"certificate\": \"-----BEGIN CERTIFICATE-----\\\\nMIIDeT...\\\\n-----END CERTIFICATE-----\"\n}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"object\": \"certificate\",\n  \"id\": \"cert_abc\",\n  \"name\": \"My Example Certificate\",\n  \"created_at\": 1234567,\n  \"certificate_details\": {\n    \"valid_at\": 12345667,\n    \"expires_at\": 12345678\n  }\n}"},{"title":"Get certificate","method":"get","path":"https://api.openai.com/v1/organization/certificates/{certificate_id}","summary":"Get a certificate that has been uploaded to the organization.","parameters":{"certificates-getcertificate__table":[{"name":"include","type":"array","required":false,"description":"A list of additional fields to include in the response. Currently the only supported value is content to fetch the PEM content of the certificate."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl \"https://api.openai.com/v1/organization/certificates/cert_abc?include[]=content\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n\n{\n  \"object\": \"certificate\",\n  \"id\": \"cert_abc\",\n  \"name\": \"My Example Certificate\",\n  \"created_at\": 1234567,\n  \"certificate_details\": {\n    \"valid_at\": 1234567,\n    \"expires_at\": 12345678,\n    \"content\": \"-----BEGIN CERTIFICATE-----MIIDeT...-----END CERTIFICATE-----\"\n  }\n}"},{"title":"Modify certificate","method":"post","path":"https://api.openai.com/v1/organization/certificates/{certificate_id}","summary":"Modify a certificate. Note that only the name can be modified.","parameters":{"certificates-modifycertificate__table":[{"name":"name","type":"string","required":true,"description":"The updated name for the certificate"}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl -X POST https://api.openai.com/v1/organization/certificates/cert_abc \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"name\": \"Renamed Certificate\"\n}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n\n{\n  \"object\": \"certificate\",\n  \"id\": \"cert_abc\",\n  \"name\": \"Renamed Certificate\",\n  \"created_at\": 1234567,\n  \"certificate_details\": {\n    \"valid_at\": 12345667,\n    \"expires_at\": 12345678\n  }\n}"},{"title":"Delete certificate","method":"delete","path":"https://api.openai.com/v1/organization/certificates/{certificate_id}","summary":"Delete a certificate from the organization.","parameters":{},"returns":"A confirmation object indicating the certificate was deleted.","exampleRequest":"1\n2\n\ncurl -X DELETE https://api.openai.com/v1/organization/certificates/cert_abc \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"","exampleResponse":"1\n2\n3\n4\n\n{\n  \"object\": \"certificate.deleted\",\n  \"id\": \"cert_abc\"\n}"},{"title":"List organization certificates","method":"get","path":"https://api.openai.com/v1/organization/certificates","summary":"List uploaded certificates for this organization.","parameters":{"certificates-listorganizationcertificates__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/organization/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n  \"first_id\": \"cert_abc\",\n  \"last_id\": \"cert_abc\",\n  \"has_more\": false\n}"},{"title":"List project certificates","method":"get","path":"https://api.openai.com/v1/organization/projects/{project_id}/certificates","summary":"List certificates for this project.","parameters":{"certificates-listprojectcertificates__table":[{"name":"after","type":"string","required":false,"description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list."},{"name":"limit","type":"integer","required":false,"default":"20","description":"A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20."},{"name":"order","type":"string","required":false,"default":"desc","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."}]},"returns":"string","exampleRequest":"1\n2\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"organization.project.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n  \"first_id\": \"cert_abc\",\n  \"last_id\": \"cert_abc\",\n  \"has_more\": false\n}"},{"title":"Activate certificates for organization","method":"post","path":"https://api.openai.com/v1/organization/certificates/activate","summary":"Activate certificates at the organization level.","parameters":{"certificates-activateorganizationcertificates__table":[{"name":"certificate_ids","type":"array","required":true,"description":""}]},"returns":"array","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl https://api.openai.com/v1/organization/certificates/activate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"data\": [\"cert_abc\", \"cert_def\"]\n}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n\n{\n  \"object\": \"organization.certificate.activation\",\n  \"data\": [\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_def\",\n      \"name\": \"My Example Certificate 2\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n}"},{"title":"Deactivate certificates for organization","method":"post","path":"https://api.openai.com/v1/organization/certificates/deactivate","summary":"Deactivate certificates at the organization level.","parameters":{"certificates-deactivateorganizationcertificates__table":[{"name":"certificate_ids","type":"array","required":true,"description":""}]},"returns":"array","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl https://api.openai.com/v1/organization/certificates/deactivate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"data\": [\"cert_abc\", \"cert_def\"]\n}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n\n{\n  \"object\": \"organization.certificate.deactivation\",\n  \"data\": [\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": false,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n    {\n      \"object\": \"organization.certificate\",\n      \"id\": \"cert_def\",\n      \"name\": \"My Example Certificate 2\",\n      \"active\": false,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n}"},{"title":"Activate certificates for project","method":"post","path":"https://api.openai.com/v1/organization/projects/{project_id}/certificates/activate","summary":"Activate certificates at the project level.","parameters":{"certificates-activateprojectcertificates__table":[{"name":"certificate_ids","type":"array","required":true,"description":""}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/certificates/activate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"data\": [\"cert_abc\", \"cert_def\"]\n}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n\n{\n  \"object\": \"organization.project.certificate.activation\",\n  \"data\": [\n    {\n      \"object\": \"organization.project.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n    {\n      \"object\": \"organization.project.certificate\",\n      \"id\": \"cert_def\",\n      \"name\": \"My Example Certificate 2\",\n      \"active\": true,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n}"},{"title":"Deactivate certificates for project","method":"post","path":"https://api.openai.com/v1/organization/projects/{project_id}/certificates/deactivate","summary":"Deactivate certificates at the project level. You can atomically and\nidempotently deactivate up to 10 certificates at a time.","parameters":{"certificates-deactivateprojectcertificates__table":[{"name":"certificate_ids","type":"array","required":true,"description":""}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n\ncurl https://api.openai.com/v1/organization/projects/proj_abc/certificates/deactivate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"data\": [\"cert_abc\", \"cert_def\"]\n}'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n\n{\n  \"object\": \"organization.project.certificate.deactivation\",\n  \"data\": [\n    {\n      \"object\": \"organization.project.certificate\",\n      \"id\": \"cert_abc\",\n      \"name\": \"My Example Certificate\",\n      \"active\": false,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n    {\n      \"object\": \"organization.project.certificate\",\n      \"id\": \"cert_def\",\n      \"name\": \"My Example Certificate 2\",\n      \"active\": false,\n      \"created_at\": 1234567,\n      \"certificate_details\": {\n        \"valid_at\": 12345667,\n        \"expires_at\": 12345678\n      }\n    },\n  ],\n}"},{"title":"The certificate object","method":"","path":"","summary":"","parameters":{"certificates/object__table":[{"name":"active","type":"boolean","required":false,"description":"Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate."},{"name":"certificate_details","type":"object","required":false,"description":""},{"name":"created_at","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the certificate was uploaded."},{"name":"id","type":"string","required":false,"description":"The identifier, which can be referenced in API endpoints"},{"name":"name","type":"string","required":false,"description":"The name of the certificate."},{"name":"object","type":"string","required":false,"description":"The object type. If creating, updating, or getting a specific certificate, the object type is certificate. If listing, activating, or deactivating certificates for the organization, the object type is organization.certificate. If listing, activating, or deactivating certificates for a project, the object type is organization.project.certificate."}]},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"CompletionsLegacy","method":"","path":"","summary":"","parameters":{},"returns":"","exampleRequest":"","exampleResponse":""},{"title":"Create completionLegacy","method":"post","path":"https://api.openai.com/v1/completions","summary":"Creates a completion for the provided prompt and parameters.","parameters":{"completions-create__table":[{"name":"model","type":"string","required":true,"description":"ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them."},{"name":"prompt","type":"string or array","required":true,"description":"The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document."},{"name":"best_of","type":"integer or null","required":false,"default":"1","description":"Generates best_of completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed. When used with n, best_of controls the number of candidate completions and n specifies how many to return – best_of must be greater than n. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop."},{"name":"echo","type":"boolean or null","required":false,"default":"false","description":"Echo back the prompt in addition to the completion"},{"name":"frequency_penalty","type":"number or null","required":false,"default":"0","description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. See more information about frequency and presence penalties."},{"name":"logit_bias","type":"map","required":false,"default":"null","description":"Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this tokenizer tool to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass {\"50256\": -100} to prevent the <|endoftext|> token from being generated."},{"name":"logprobs","type":"integer or null","required":false,"default":"null","description":"Include the log probabilities on the logprobs most likely output tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response. The maximum value for logprobs is 5."},{"name":"max_tokens","type":"integer or null","required":false,"default":"16","description":"The maximum number of tokens that can be generated in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length. Example Python code for counting tokens."},{"name":"n","type":"integer or null","required":false,"default":"1","description":"How many completions to generate for each prompt. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop."},{"name":"presence_penalty","type":"number or null","required":false,"default":"0","description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. See more information about frequency and presence penalties."},{"name":"seed","type":"integer or null","required":false,"description":"If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend."},{"name":"stop","type":"string / array / null","required":false,"default":"null","description":"Not supported with latest reasoning models o3 and o4-mini. Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence."},{"name":"stream","type":"boolean or null","required":false,"default":"false","description":"Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Example Python code."},{"name":"stream_options","type":"object or null","required":false,"default":"null","description":"Options for streaming response. Only set this when you set stream: true."},{"name":"suffix","type":"string or null","required":false,"default":"null","description":"The suffix that comes after a completion of inserted text. This parameter is only supported for gpt-3.5-turbo-instruct."},{"name":"temperature","type":"number or null","required":false,"default":"1","description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both."},{"name":"top_p","type":"number or null","required":false,"default":"1","description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."},{"name":"user","type":"string","required":false,"description":"A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more."}]},"returns":"string","exampleRequest":"1\n2\n3\n4\n5\n6\n7\n8\n9\n\ncurl https://api.openai.com/v1/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"model\": \"gpt-3.5-turbo-instruct\",\n    \"prompt\": \"Say this is a test\",\n    \"max_tokens\": 7,\n    \"temperature\": 0\n  }'","exampleResponse":"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n\n{\n  \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n  \"object\": \"text_completion\",\n  \"created\": 1589478378,\n  \"model\": \"gpt-3.5-turbo-instruct\",\n  \"system_fingerprint\": \"fp_44709d6fcb\",\n  \"choices\": [\n    {\n      \"text\": \"\\n\\nThis is indeed a test\",\n      \"index\": 0,\n      \"logprobs\": null,\n      \"finish_reason\": \"length\"\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 5,\n    \"completion_tokens\": 7,\n    \"total_tokens\": 12\n  }\n}"},{"title":"The completion objectLegacy","method":"","path":"","summary":"","parameters":{"completions/object__table":[{"name":"choices","type":"array","required":false,"description":"The list of completion choices the model generated for the input prompt."},{"name":"created","type":"integer","required":false,"description":"The Unix timestamp (in seconds) of when the completion was created."},{"name":"id","type":"string","required":false,"description":"A unique identifier for the completion."},{"name":"model","type":"string","required":false,"description":"The model used for completion."},{"name":"object","type":"string","required":false,"description":"The object type, which is always \"text_completion\""},{"name":"system_fingerprint","type":"string","required":false,"description":"This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism."},{"name":"usage","type":"object","required":false,"description":"Usage statistics for the completion request."}]},"returns":"","exampleRequest":"","exampleResponse":""}]
