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.
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.
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. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
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.
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.
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.
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.
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.
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.
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_object" } enables JSON mode, which guarantees 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.
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. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
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.
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_object" } enables JSON mode, which guarantees 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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Portkey (Prisma AIRS AI Gateway) Docs","description":"Comprehensive documentation for AI Gateway, Guardrails, Observability, and Governance features.","colors":{"primary":"#0891B2","light":"#0891B2","dark":"#0891B2"},"logo":{"light":"https://mintcdn.com/portkey-docs/tHk-hgNjLbEj4dhh/images/portkey-PANW-company-logo-positive.png?fit=max\u0026auto=format\u0026n=tHk-hgNjLbEj4dhh\u0026q=85\u0026s=c5fb09014ff79616583b1d3bffe27450","dark":"https://mintcdn.com/portkey-docs/tHk-hgNjLbEj4dhh/images/portkey-PANW-company-logo-negative.png?fit=max\u0026auto=format\u0026n=tHk-hgNjLbEj4dhh\u0026q=85\u0026s=6025ca49ef544522f58ff471b7f75f8f"},"favicon":"https://mintcdn.com/portkey-docs/Hf1XgyjG_b79ym4Q/favicon.png?fit=max\u0026auto=format\u0026n=Hf1XgyjG_b79ym4Q\u0026q=85\u0026s=cbaa1bfc49bb6e3fd6cf499a5da313a3","api":{"openapi":"https://raw.githubusercontent.com/Portkey-AI/openapi/refs/heads/master/openapi.yaml","examples":{"prefill":true},"url":"full"},"navbar":{"links":[{"href":"https://portkey.ai/models","label":"Models"},{"href":"https://support.portkey.ai/forms/customer-portal-ticket-form","label":"Support"},{"href":"https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\u0026utm_medium=referral\u0026utm_campaign=prisma_airs\u0026utm_content=docs_nav#contact","label":"Contact Us"}],"primary":{"type":"button","label":"Sign in","href":"https://stratacloudmanager.paloaltonetworks.com/"}},"footer":{"socials":{"x":"https://twitter.com/PortkeyAI","linkedin":"https://www.linkedin.com/company/portkey-ai","github":"https://git.new/portkey"},"links":[{"header":"For LLMs","items":[{"label":"llms.txt","href":"https://portkey.ai/docs/llms.txt"},{"label":"llms-full.txt","href":"https://portkey.ai/docs/llms-full.txt"}]},{"header":"Products","items":[{"label":"Observability","href":"https://portkey.ai/features/observability"},{"label":"AI Gateway","href":"https://portkey.ai/features/ai-gateway"},{"label":"Guardrails","href":"https://portkey.ai/features/guardrails"},{"label":"Prompt Management","href":"https://portkey.ai/features/prompt-management"},{"label":"Agents","href":"https://portkey.ai/features/agents"},{"label":"MCP Gateway","href":"https://portkey.ai/docs/product/mcp-gateway"},{"label":"Security","href":"https://portkey.ai/features/security-and-compliance"},{"label":"Auto-Instrumentation","href":"https://portkey.ai/features/auto-instrumentation"}]},{"header":"Resources","items":[{"label":"API Status","href":"https://status.portkey.ai/"},{"label":"Helm Charts","href":"https://github.com/portkey-ai/helm"},{"label":"AI Grants Finder","href":"https://grantsfinder.portkey.ai/"},{"label":"Events Calendar","href":"https://lu.ma/portkey"},{"label":"Blog","href":"https://portkey.ai/blog"},{"label":"Error Library","href":"https://portkey.ai/error-library"},{"label":"Models \u0026 Pricing","href":"https://portkey.ai/models"}]},{"header":"Company","items":[{"label":"Pricing","href":"https://portkey.ai/pricing"},{"label":"Compliances","href":"https://trust.portkey.ai/"},{"label":"Privacy Policy","href":"https://portkey.ai/privacy-policy"},{"label":"Terms of Service","href":"https://portkey.ai/terms"},{"label":"DPA","href":"https://portkey.ai/dpa"},{"label":"Cookie Policy","href":"https://portkey.ai/cookie-policy"}]}]},"seo":{"metatags":{"og:type":"website","og:site_name":"Portkey AI Gateway Docs"},"indexing":"navigable"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"system","latex":true},"integrations":{"ga4":{"measurementId":"G-JJMXYE4DRL"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"toc"},"interaction":{"drilldown":true},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"portkey-docs","hasAudioNarration":false,"actualSubdomain":"portkey-docs","customDomains":["docs.portkey.ai","portkey.ai"],"gitSource":{"type":"github","owner":"portkey-ai","repo":"docs-core","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aec7b3cca078695d82a490b","collectionId":"00bda086-028e-40ff-a730-d4765343a636","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aec7b3cca078695d82a490b"},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6aec7b3cca078695d82a490b","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Integrations","count":699},{"language":"default","tag":"Product","count":386},{"language":"default","tag":"Docs","count":324},{"language":"default","tag":"LLM Integrations","count":307},{"language":"default","tag":"Admin APIs","count":189},{"language":"default","tag":"More","count":176},{"language":"default","tag":"Guardrails","count":102},{"language":"default","tag":"Administration","count":102},{"language":"default","tag":"AI Gateway","count":99},{"language":"default","tag":"Admin API","count":95}],"searchSettings":{"isFiltersEnabled":true,"showContentSnippets":true}},"assistantConfig":{"enableAskAiButton":true,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@portkey.ai","showHelpButton":true}},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#banner{background:linear-gradient(90deg, #0d1b2e 0%, #1a1040 40%, #2d0f22 100%);border-bottom:1px solid rgba(255, 255, 255, 0.08)}#banner a{color:#f0f0f0;text-decoration:none;font-weight:600;border-bottom:1px solid rgba(240, 240, 240, 0.5);padding-bottom:1px;transition:border-color 0.2s ease}#banner a:hover{border-bottom-color:#ffffff}"}],"page":{"pagePath":"api-reference/inference-api/assistants-api/runs/create-run","slug":"/api-reference/inference-api/assistants-api/runs/create-run","pageMetadata":{"title":"Create Run","openapi":"post /threads/{thread_id}/runs","description":"","href":"/api-reference/inference-api/assistants-api/runs/create-run"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={hr:`hr`,p:`p`,..._provideComponents(),...props.components},{Card}=_components;if(!Card)_missingMdxReference(`Card`,true);return _jsxs(_Fragment,{children:[_jsx(_components.hr,{}),`\n`,_jsx(Card,{title:`Portkey is now PRISMA AIRS AI Gateway. See it in action.`,href:`https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\u0026utm_medium=referral\u0026utm_campaign=prisma_airs\u0026utm_content=docs_nav#contact`,icon:`arrow-up-right-from-square`,children:_jsx(_components.p,{children:`Contact Us`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Create Run","openapi":"post /threads/{thread_id}/runs","description":"","href":"/api-reference/inference-api/assistants-api/runs/create-run"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createRun","tags":["Assistants"],"summary":"Create a run.","parameters":["535ff0c6-9922-4db9-aff4-7992c19d5f81"],"requestBody":"abb86523-22ea-4bad-9dd0-ac59a975bf07","security":["1b045ed1-29d1-400b-b610-faa0a9b17fd0","392129cf-07a8-4133-8aa0-8e7ae3a40bcb","7a292193-f44c-4b68-8db1-33db0d7e5191","f5ceacb5-fca7-48d0-946b-e1334ccb5507"],"responses":{"200":"5cb9adb8-c185-49f5-96d0-e34743f78b6d"},"x-code-samples":[{"lang":"curl","source":"curl https://api.portkey.ai/v1/threads/thread_abc123/runs \\\n -H \"x-portkey-api-key: $PORTKEY_API_KEY\" \\\n -H \"x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"assistant_id\": \"asst_abc123\"\n }'\n"},{"lang":"python","source":"from portkey_ai import Portkey\n\nclient = Portkey(\n api_key = \"PORTKEY_API_KEY\",\n virtual_key = \"PROVIDER_VIRTUAL_KEY\"\n)\n\nrun = client.beta.threads.runs.create(\n thread_id=\"thread_abc123\",\n assistant_id=\"asst_abc123\"\n)\n\nprint(run)\n"},{"lang":"javascript","source":"import Portkey from 'portkey-ai';\n\nconst client = new Portkey({\n apiKey: 'PORTKEY_API_KEY',\n virtualKey: 'PROVIDER_VIRTUAL_KEY'\n});\n\nasync function main() {\n const run = await client.beta.threads.runs.create(\n \"thread_abc123\",\n { assistant_id: \"asst_abc123\" }\n );\n\n console.log(run);\n}\n\nmain();\n","response":"{\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-4-turbo\",\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}\n"}],"method":"post","type":"path","servers":["90fb5039-3a97-4d48-8634-e82be9b51913","f3741382-dba7-4d9e-9fbe-fda3bd58fc21"],"path":"/threads/{thread_id}/runs","baseUrlOptions":["https://api.portkey.ai/v1","SELF_HOSTED_GATEWAY_URL"],"title":"Create a run.","description":"","codeSamples":[{"lang":"curl","source":"curl https://api.portkey.ai/v1/threads/thread_abc123/runs \\\n -H \"x-portkey-api-key: $PORTKEY_API_KEY\" \\\n -H \"x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"assistant_id\": \"asst_abc123\"\n }'\n"},{"lang":"python","source":"from portkey_ai import Portkey\n\nclient = Portkey(\n api_key = \"PORTKEY_API_KEY\",\n virtual_key = \"PROVIDER_VIRTUAL_KEY\"\n)\n\nrun = client.beta.threads.runs.create(\n thread_id=\"thread_abc123\",\n assistant_id=\"asst_abc123\"\n)\n\nprint(run)\n"},{"lang":"javascript","source":"import Portkey from 'portkey-ai';\n\nconst client = new Portkey({\n apiKey: 'PORTKEY_API_KEY',\n virtualKey: 'PROVIDER_VIRTUAL_KEY'\n});\n\nasync function main() {\n const run = await client.beta.threads.runs.create(\n \"thread_abc123\",\n { assistant_id: \"asst_abc123\" }\n );\n\n console.log(run);\n}\n\nmain();\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.assistant_id":"\u003cstring>","body.model.oneOf.0":"gpt-4-turbo","body.instructions.oneOf.0":"\u003cstring>","body.additional_instructions.oneOf.0":"\u003cstring>","body.additional_messages.oneOf.0.items.0.content.oneOf.0":"\u003cstring>","body.additional_messages.oneOf.0.items.0.attachments.oneOf.0.items.0.file_id":"\u003cstring>","body.additional_messages.oneOf.0.items.0.attachments.oneOf.0.items.0.tools.items.0.oneOf.0.type":"code_interpreter","body.additional_messages.oneOf.0.items.0.metadata.oneOf.0":{},"body.tools.oneOf.0.items.0.oneOf.0.type":"code_interpreter","body.metadata.oneOf.0":{},"body.temperature.oneOf.0":1,"body.top_p.oneOf.0":1,"body.stream.oneOf.0":true,"body.max_prompt_tokens.oneOf.0":257,"body.max_completion_tokens.oneOf.0":257,"body.truncation_strategy.oneOf.0.last_messages.oneOf.0":2,"body.parallel_tool_calls":true}],"urlDisplay":"full"},"dependencies":{"parameters":{"535ff0c6-9922-4db9-aff4-7992c19d5f81":{"in":"path","name":"thread_id","required":true,"schema":{"type":"string","isRequired":true,"description":"The ID of the thread to run.","uniqueKey":"","typeLabel":"string"},"description":"The ID of the thread to run."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"assistant_id":{"description":"The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run.","type":"string","isRequired":true,"uniqueKey":"assistant_id","typeLabel":"string"},"model":{"oneOf":[{"type":"string","description":"The ID of the [Model](https://platform.openai.com/docs/api-reference/models) 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.","x-oaiTypeLabel":"string","example":"gpt-4-turbo","uniqueKey":"model.oneOf.0","typeLabel":"string"},{"type":"string","description":"The ID of the [Model](https://platform.openai.com/docs/api-reference/models) 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.","enum":["gpt-4o","gpt-4o-2024-05-13","gpt-4-turbo","gpt-4-turbo-2024-04-09","gpt-4-0125-preview","gpt-4-turbo-preview","gpt-4-1106-preview","gpt-4-vision-preview","gpt-4","gpt-4-0314","gpt-4-0613","gpt-4-32k","gpt-4-32k-0314","gpt-4-32k-0613","gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-3.5-turbo-0613","gpt-3.5-turbo-1106","gpt-3.5-turbo-0125","gpt-3.5-turbo-16k-0613"],"x-oaiTypeLabel":"string","example":"gpt-4-turbo","uniqueKey":"model.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"model.oneOf.2","typeLabel":"null"}],"uniqueKey":"model","typeLabel":"string | enum\u003cstring> | null"},"instructions":{"oneOf":[{"description":"Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.","type":"string","uniqueKey":"instructions.oneOf.0","typeLabel":"string"},{"description":"Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.","type":"null","uniqueKey":"instructions.oneOf.1","typeLabel":"null"}],"uniqueKey":"instructions","typeLabel":"string | null"},"additional_instructions":{"oneOf":[{"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.","type":"string","uniqueKey":"additional_instructions.oneOf.0","typeLabel":"string"},{"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.","type":"null","uniqueKey":"additional_instructions.oneOf.1","typeLabel":"null"}],"uniqueKey":"additional_instructions","typeLabel":"string | null"},"additional_messages":{"oneOf":[{"description":"Adds additional messages to the thread before creating the run.","type":"array","items":{"type":"object","additionalProperties":false,"required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"],"description":"The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.\n","isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","title":"Text content","description":"The text contents of the message.","x-oaiExpandable":true,"isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","title":"Image file","description":"References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message.","required":["type","image_file"],"x-oaiExpandable":true,"properties":{"type":{"description":"Always `image_file`.","type":"string","enum":["image_file"],"isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"image_file":{"type":"object","properties":{"file_id":{"description":"The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.","type":"string","isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.image_file.file_id","typeLabel":"string"},"detail":{"type":"string","description":"Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.","enum":["auto","low","high"],"default":"auto","uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.image_file.detail","typeLabel":"enum\u003cstring>"}},"required":["file_id"],"isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.image_file","typeLabel":"object"}},"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"Image file · object"},{"type":"object","title":"Image URL","description":"References an image URL in the content of a message.","required":["type","image_url"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part.","isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.","format":"uri","isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.url","typeLabel":"string\u003curi>"},"detail":{"type":"string","description":"Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`","enum":["auto","low","high"],"default":"auto","uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url.detail","typeLabel":"enum\u003cstring>"}},"required":["url"],"isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.image_url","typeLabel":"object"}},"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"Image URL · object"},{"type":"object","title":"Text","description":"The text content that is part of a message.","required":["type","text"],"x-oaiExpandable":true,"properties":{"type":{"description":"Always `text`.","type":"string","enum":["text"],"isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","description":"Text content to be sent to the model","isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.text","typeLabel":"string"}},"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2","typeLabel":"Text · object"}],"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"Image file · object | Image URL · object | Text · object"},"title":"Array of content parts","description":"An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://platform.openai.com/docs/models/overview).","minItems":1,"x-oaiExpandable":true,"isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content.oneOf.1","typeLabel":"(Image file · object | Image URL · object | Text · object)[]"}],"isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].content","typeLabel":"string | (Image file · object | Image URL · object | Text · object)[]"},"attachments":{"oneOf":[{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The ID of the file to attach to the message.","uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.0.items.[INDEX].file_id","typeLabel":"string"},"tools":{"description":"The tools to add this file to.","type":"array","items":{"oneOf":[{"type":"object","title":"Code interpreter tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `code_interpreter`","enum":["code_interpreter"],"isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.0.items.[INDEX].tools.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.0.items.[INDEX].tools.items.[INDEX].oneOf.0","typeLabel":"Code interpreter tool · object"},{"type":"object","title":"FileSearch tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `file_search`","enum":["file_search"],"isRequired":true,"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.0.items.[INDEX].tools.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.0.items.[INDEX].tools.items.[INDEX].oneOf.1","typeLabel":"FileSearch tool · object"}],"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.0.items.[INDEX].tools.items.[INDEX]","typeLabel":"Code interpreter tool · object | FileSearch tool · object"},"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.0.items.[INDEX].tools","typeLabel":"(Code interpreter tool · object | FileSearch tool · object)[]"}},"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.0.items.[INDEX]","typeLabel":"object"},"description":"A list of files attached to the message, and the tools they should be added to.","required":["file_id","tools"],"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The ID of the file to attach to the message."},"tools":{"description":"The tools to add this file to.","type":"array","items":{"oneOf":[{"type":"object","title":"Code interpreter tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `code_interpreter`","enum":["code_interpreter"]}}},{"type":"object","title":"FileSearch tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `file_search`","enum":["file_search"]}}}]}}}},"description":"A list of files attached to the message, and the tools they should be added to.","required":["file_id","tools"],"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments.oneOf.1","typeLabel":"null"}],"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].attachments","typeLabel":"object[] | null"},"metadata":{"oneOf":[{"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. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n","type":"object","x-oaiTypeLabel":"map","uniqueKey":"additional_messages.oneOf.0.items.[INDEX].metadata.oneOf.0","typeLabel":"object"},{"description":"Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n","type":"null","x-oaiTypeLabel":"map","uniqueKey":"additional_messages.oneOf.0.items.[INDEX].metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"additional_messages.oneOf.0.items.[INDEX].metadata","typeLabel":"object | null"}},"uniqueKey":"additional_messages.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"additional_messages.oneOf.0","typeLabel":"object[]"},{"description":"Adds additional messages to the thread before creating the run.","type":"null","items":{"type":"object","additionalProperties":false,"required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"],"description":"The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.\n"},"content":{"oneOf":[{"type":"string","title":"Text content","description":"The text contents of the message.","x-oaiExpandable":true},{"type":"array","items":{"oneOf":[{"type":"object","title":"Image file","description":"References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message.","required":["type","image_file"],"x-oaiExpandable":true,"properties":{"type":{"description":"Always `image_file`.","type":"string","enum":["image_file"]},"image_file":{"type":"object","properties":{"file_id":{"description":"The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.","type":"string"},"detail":{"type":"string","description":"Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.","enum":["auto","low","high"],"default":"auto"}},"required":["file_id"]}}},{"type":"object","title":"Image URL","description":"References an image URL in the content of a message.","required":["type","image_url"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.","format":"uri"},"detail":{"type":"string","description":"Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`","enum":["auto","low","high"],"default":"auto"}},"required":["url"]}}},{"type":"object","title":"Text","description":"The text content that is part of a message.","required":["type","text"],"x-oaiExpandable":true,"properties":{"type":{"description":"Always `text`.","type":"string","enum":["text"]},"text":{"type":"string","description":"Text content to be sent to the model"}}}]},"title":"Array of content parts","description":"An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://platform.openai.com/docs/models/overview).","minItems":1,"x-oaiExpandable":true}]},"attachments":{"oneOf":[{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The ID of the file to attach to the message."},"tools":{"description":"The tools to add this file to.","type":"array","items":{"oneOf":[{"type":"object","title":"Code interpreter tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `code_interpreter`","enum":["code_interpreter"]}}},{"type":"object","title":"FileSearch tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `file_search`","enum":["file_search"]}}}]}}}},"description":"A list of files attached to the message, and the tools they should be added to.","required":["file_id","tools"]},{"type":"null","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The ID of the file to attach to the message."},"tools":{"description":"The tools to add this file to.","type":"array","items":{"oneOf":[{"type":"object","title":"Code interpreter tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `code_interpreter`","enum":["code_interpreter"]}}},{"type":"object","title":"FileSearch tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `file_search`","enum":["file_search"]}}}]}}}},"description":"A list of files attached to the message, and the tools they should be added to.","required":["file_id","tools"]}]},"metadata":{"oneOf":[{"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. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n","type":"object","x-oaiTypeLabel":"map"},{"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. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n","type":"null","x-oaiTypeLabel":"map"}]}}},"uniqueKey":"additional_messages.oneOf.1","typeLabel":"null"}],"uniqueKey":"additional_messages","typeLabel":"object[] | null"},"tools":{"oneOf":[{"description":"Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.","type":"array","maxItems":20,"items":{"oneOf":[{"type":"object","title":"Code interpreter tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `code_interpreter`","enum":["code_interpreter"],"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.0","typeLabel":"Code interpreter tool · object"},{"type":"object","title":"FileSearch tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `file_search`","enum":["file_search"],"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"file_search":{"type":"object","description":"Overrides for the file search tool.","properties":{"max_num_results":{"type":"integer","minimum":1,"maximum":50,"description":"The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/number-of-chunks-returned) for more information.\n","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.file_search.max_num_results","typeLabel":"integer"}},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1.file_search","typeLabel":"object"}},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.1","typeLabel":"FileSearch tool · object"},{"type":"object","title":"Function tool","required":["type","function"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `function`","enum":["function"],"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.","isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.function.name","typeLabel":"string"},"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function.","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.function.description","typeLabel":"string"},"parameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.","additionalProperties":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.function.parameters","typeLabel":"object"},"strict":{"oneOf":[{"type":"boolean","default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.function.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).","uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.function.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.function.strict","typeLabel":"boolean | null"}},"required":["name"],"isRequired":true,"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2.function","typeLabel":"object"}},"uniqueKey":"tools.oneOf.0.items.[INDEX].oneOf.2","typeLabel":"Function tool · object"}],"uniqueKey":"tools.oneOf.0.items.[INDEX]","typeLabel":"Code interpreter tool · object | FileSearch tool · object | Function tool · object"},"uniqueKey":"tools.oneOf.0","typeLabel":"(Code interpreter tool · object | FileSearch tool · object | Function tool · object)[]"},{"description":"Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.","type":"null","maxItems":20,"items":{"oneOf":[{"type":"object","title":"Code interpreter tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `code_interpreter`","enum":["code_interpreter"]}}},{"type":"object","title":"FileSearch tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `file_search`","enum":["file_search"]},"file_search":{"type":"object","description":"Overrides for the file search tool.","properties":{"max_num_results":{"type":"integer","minimum":1,"maximum":50,"description":"The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/number-of-chunks-returned) for more information.\n"}}}}},{"type":"object","title":"Function tool","required":["type","function"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `function`","enum":["function"]},"function":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function."},"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"parameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.","additionalProperties":true},"strict":{"oneOf":[{"type":"boolean","default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling)."},{"type":"null","default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling)."}]}},"required":["name"]}}}]},"uniqueKey":"tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools","typeLabel":"(Code interpreter tool · object | FileSearch tool · object | Function tool · object)[] | null"},"metadata":{"oneOf":[{"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. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n","type":"object","x-oaiTypeLabel":"map","uniqueKey":"metadata.oneOf.0","typeLabel":"object"},{"description":"Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n","type":"null","x-oaiTypeLabel":"map","uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata","typeLabel":"object | null"},"temperature":{"oneOf":[{"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.\n","type":"number","minimum":0,"maximum":2,"default":1,"example":1,"uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"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.\n","type":"null","minimum":0,"maximum":2,"default":1,"example":1,"uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"top_p":{"oneOf":[{"type":"number","minimum":0,"maximum":1,"default":1,"example":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.\n\nWe generally recommend altering this or temperature but not both.\n","uniqueKey":"top_p.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":1,"default":1,"example":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.\n\nWe generally recommend altering this or temperature but not both.\n","uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number | null"},"stream":{"oneOf":[{"type":"boolean","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.\n","uniqueKey":"stream.oneOf.0","typeLabel":"boolean"},{"type":"null","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.\n","uniqueKey":"stream.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream","typeLabel":"boolean | null"},"max_prompt_tokens":{"oneOf":[{"type":"integer","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.\n","minimum":256,"uniqueKey":"max_prompt_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","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.\n","minimum":256,"uniqueKey":"max_prompt_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_prompt_tokens","typeLabel":"integer | null"},"max_completion_tokens":{"oneOf":[{"type":"integer","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.\n","minimum":256,"uniqueKey":"max_completion_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","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.\n","minimum":256,"uniqueKey":"max_completion_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_completion_tokens","typeLabel":"integer | null"},"truncation_strategy":{"oneOf":[{"type":"object","title":"Thread Truncation Controls","description":"Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.","properties":{"type":{"type":"string","description":"The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.","enum":["auto","last_messages"],"isRequired":true,"uniqueKey":"truncation_strategy.oneOf.0.type","typeLabel":"enum\u003cstring>"},"last_messages":{"oneOf":[{"type":"integer","description":"The number of most recent messages from the thread when constructing the context for the run.","minimum":1,"uniqueKey":"truncation_strategy.oneOf.0.last_messages.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The number of most recent messages from the thread when constructing the context for the run.","minimum":1,"uniqueKey":"truncation_strategy.oneOf.0.last_messages.oneOf.1","typeLabel":"null"}],"uniqueKey":"truncation_strategy.oneOf.0.last_messages","typeLabel":"integer | null"}},"required":["type"],"uniqueKey":"truncation_strategy.oneOf.0","typeLabel":"Thread Truncation Controls · object"},{"type":"null","title":"Thread Truncation Controls","description":"Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.","properties":{"type":{"type":"string","description":"The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.","enum":["auto","last_messages"]},"last_messages":{"oneOf":[{"type":"integer","description":"The number of most recent messages from the thread when constructing the context for the run.","minimum":1},{"type":"null","description":"The number of most recent messages from the thread when constructing the context for the run.","minimum":1}]}},"required":["type"],"uniqueKey":"truncation_strategy.oneOf.1","typeLabel":"null"}],"uniqueKey":"truncation_strategy","typeLabel":"Thread Truncation Controls · object | null"},"tool_choice":{"oneOf":[{"type":"string","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tools and instead generates a message.\n`auto` is the default value and means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools before responding to the user.\nSpecifying a particular tool like `{\"type\": \"file_search\"}` or `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n","enum":["none","auto","required"],"x-oaiExpandable":true,"uniqueKey":"tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tools and instead generates a message.\n`auto` is the default value and means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools before responding to the user.\nSpecifying a particular tool like `{\"type\": \"file_search\"}` or `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","enum":["function","code_interpreter","file_search"],"description":"The type of the tool. If type is `function`, the function name must be set","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.function.name","typeLabel":"string"}},"required":["name"],"uniqueKey":"tool_choice.oneOf.1.function","typeLabel":"object"}},"uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"},{"type":"null","uniqueKey":"tool_choice.oneOf.2","typeLabel":"null"}],"uniqueKey":"tool_choice","typeLabel":"enum\u003cstring> | object | null"},"parallel_tool_calls":{"description":"Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use.","type":"boolean","default":true,"uniqueKey":"parallel_tool_calls","typeLabel":"boolean"},"response_format":{"oneOf":[{"type":"string","description":"Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is valid JSON.\n\n**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.\n","enum":["none","auto"],"x-oaiExpandable":true,"uniqueKey":"response_format.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is valid JSON.\n\n**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.\n","x-oaiExpandable":true,"properties":{"type":{"type":"string","enum":["text","json_object"],"example":"json_object","default":"text","description":"Must be one of `text` or `json_object`.","uniqueKey":"response_format.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"response_format.oneOf.1","typeLabel":"object"},{"type":"null","uniqueKey":"response_format.oneOf.2","typeLabel":"null"}],"uniqueKey":"response_format","typeLabel":"enum\u003cstring> | object | null"}},"required":["thread_id","assistant_id"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"assistant_id":"\u003cstring>","model":"gpt-4-turbo","instructions":"\u003cstring>","additional_instructions":"\u003cstring>","additional_messages":[{"content":"\u003cstring>","attachments":[{"file_id":"\u003cstring>","tools":[{"type":"code_interpreter"}]}],"metadata":{}}],"tools":[{"type":"code_interpreter"}],"metadata":{},"temperature":1,"top_p":1,"stream":true,"max_prompt_tokens":257,"max_completion_tokens":257,"truncation_strategy":{"last_messages":2},"parallel_tool_calls":true}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"5cb9adb8-c185-49f5-96d0-e34743f78b6d":{"description":"OK","content":{"application/json":{"schema":{"type":"object","title":"A run on a thread","description":"Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads).","properties":{"id":{"description":"The identifier, which can be referenced in API endpoints.","type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"description":"The object type, which is always `thread.run`.","type":"string","enum":["thread.run"],"isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"created_at":{"description":"The Unix timestamp (in seconds) for when the run was created.","type":"integer","isRequired":true,"uniqueKey":"created_at","typeLabel":"integer"},"thread_id":{"description":"The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run.","type":"string","isRequired":true,"uniqueKey":"thread_id","typeLabel":"string"},"assistant_id":{"description":"The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for execution of this run.","type":"string","isRequired":true,"uniqueKey":"assistant_id","typeLabel":"string"},"status":{"description":"The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.","type":"string","enum":["queued","in_progress","requires_action","cancelling","cancelled","failed","completed","incomplete","expired"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"required_action":{"oneOf":[{"type":"object","description":"Details on the action required to continue the run. Will be `null` if no action is required.","properties":{"type":{"description":"For now, this is always `submit_tool_outputs`.","type":"string","enum":["submit_tool_outputs"],"isRequired":true,"uniqueKey":"required_action.oneOf.0.type","typeLabel":"enum\u003cstring>"},"submit_tool_outputs":{"type":"object","description":"Details on the tool outputs needed for this run to continue.","properties":{"tool_calls":{"type":"array","description":"A list of the relevant tool calls.","items":{"type":"object","description":"Tool call objects","properties":{"id":{"type":"string","description":"The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint.","isRequired":true,"uniqueKey":"required_action.oneOf.0.submit_tool_outputs.tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","description":"The type of tool call the output is required for. For now, this is always `function`.","enum":["function"],"isRequired":true,"uniqueKey":"required_action.oneOf.0.submit_tool_outputs.tool_calls.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","description":"The function definition.","properties":{"name":{"type":"string","description":"The name of the function.","isRequired":true,"uniqueKey":"required_action.oneOf.0.submit_tool_outputs.tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"The arguments that the model expects you to pass to the function.","isRequired":true,"uniqueKey":"required_action.oneOf.0.submit_tool_outputs.tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"required":["name","arguments"],"isRequired":true,"uniqueKey":"required_action.oneOf.0.submit_tool_outputs.tool_calls.items.[INDEX].function","typeLabel":"object"}},"required":["id","type","function"],"uniqueKey":"required_action.oneOf.0.submit_tool_outputs.tool_calls.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"required_action.oneOf.0.submit_tool_outputs.tool_calls","typeLabel":"object[]"}},"required":["tool_calls"],"isRequired":true,"uniqueKey":"required_action.oneOf.0.submit_tool_outputs","typeLabel":"object"}},"required":["type","submit_tool_outputs"],"isRequired":true,"uniqueKey":"required_action.oneOf.0","typeLabel":"object"},{"type":"null","description":"Details on the action required to continue the run. Will be `null` if no action is required.","properties":{"type":{"description":"For now, this is always `submit_tool_outputs`.","type":"string","enum":["submit_tool_outputs"]},"submit_tool_outputs":{"type":"object","description":"Details on the tool outputs needed for this run to continue.","properties":{"tool_calls":{"type":"array","description":"A list of the relevant tool calls.","items":{"type":"object","description":"Tool call objects","properties":{"id":{"type":"string","description":"The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint."},"type":{"type":"string","description":"The type of tool call the output is required for. For now, this is always `function`.","enum":["function"]},"function":{"type":"object","description":"The function definition.","properties":{"name":{"type":"string","description":"The name of the function."},"arguments":{"type":"string","description":"The arguments that the model expects you to pass to the function."}},"required":["name","arguments"]}},"required":["id","type","function"]}}},"required":["tool_calls"]}},"required":["type","submit_tool_outputs"],"isRequired":true,"uniqueKey":"required_action.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"required_action","typeLabel":"object | null"},"last_error":{"oneOf":[{"type":"object","description":"The last error associated with this run. Will be `null` if there are no errors.","properties":{"code":{"type":"string","description":"One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.","enum":["server_error","rate_limit_exceeded","invalid_prompt"],"isRequired":true,"uniqueKey":"last_error.oneOf.0.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"A human-readable description of the error.","isRequired":true,"uniqueKey":"last_error.oneOf.0.message","typeLabel":"string"}},"required":["code","message"],"isRequired":true,"uniqueKey":"last_error.oneOf.0","typeLabel":"object"},{"type":"null","description":"The last error associated with this run. Will be `null` if there are no errors.","properties":{"code":{"type":"string","description":"One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.","enum":["server_error","rate_limit_exceeded","invalid_prompt"]},"message":{"type":"string","description":"A human-readable description of the error."}},"required":["code","message"],"isRequired":true,"uniqueKey":"last_error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"last_error","typeLabel":"object | null"},"expires_at":{"oneOf":[{"description":"The Unix timestamp (in seconds) for when the run will expire.","type":"integer","isRequired":true,"uniqueKey":"expires_at.oneOf.0","typeLabel":"integer"},{"description":"The Unix timestamp (in seconds) for when the run will expire.","type":"null","isRequired":true,"uniqueKey":"expires_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"expires_at","typeLabel":"integer | null"},"started_at":{"oneOf":[{"description":"The Unix timestamp (in seconds) for when the run was started.","type":"integer","isRequired":true,"uniqueKey":"started_at.oneOf.0","typeLabel":"integer"},{"description":"The Unix timestamp (in seconds) for when the run was started.","type":"null","isRequired":true,"uniqueKey":"started_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"started_at","typeLabel":"integer | null"},"cancelled_at":{"oneOf":[{"description":"The Unix timestamp (in seconds) for when the run was cancelled.","type":"integer","isRequired":true,"uniqueKey":"cancelled_at.oneOf.0","typeLabel":"integer"},{"description":"The Unix timestamp (in seconds) for when the run was cancelled.","type":"null","isRequired":true,"uniqueKey":"cancelled_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"cancelled_at","typeLabel":"integer | null"},"failed_at":{"oneOf":[{"description":"The Unix timestamp (in seconds) for when the run failed.","type":"integer","isRequired":true,"uniqueKey":"failed_at.oneOf.0","typeLabel":"integer"},{"description":"The Unix timestamp (in seconds) for when the run failed.","type":"null","isRequired":true,"uniqueKey":"failed_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"failed_at","typeLabel":"integer | null"},"completed_at":{"oneOf":[{"description":"The Unix timestamp (in seconds) for when the run was completed.","type":"integer","isRequired":true,"uniqueKey":"completed_at.oneOf.0","typeLabel":"integer"},{"description":"The Unix timestamp (in seconds) for when the run was completed.","type":"null","isRequired":true,"uniqueKey":"completed_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"completed_at","typeLabel":"integer | null"},"incomplete_details":{"oneOf":[{"description":"Details on why the run is incomplete. Will be `null` if the run is not incomplete.","type":"object","properties":{"reason":{"description":"The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.","type":"string","enum":["max_completion_tokens","max_prompt_tokens"],"uniqueKey":"incomplete_details.oneOf.0.reason","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"incomplete_details.oneOf.0","typeLabel":"object"},{"description":"Details on why the run is incomplete. Will be `null` if the run is not incomplete.","type":"null","properties":{"reason":{"description":"The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.","type":"string","enum":["max_completion_tokens","max_prompt_tokens"]}},"isRequired":true,"uniqueKey":"incomplete_details.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"incomplete_details","typeLabel":"object | null"},"model":{"description":"The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run.","type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"instructions":{"description":"The instructions that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run.","type":"string","isRequired":true,"uniqueKey":"instructions","typeLabel":"string"},"tools":{"description":"The list of tools that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run.","default":[],"type":"array","maxItems":20,"items":{"oneOf":[{"type":"object","title":"Code interpreter tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `code_interpreter`","enum":["code_interpreter"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"tools.items.[INDEX].oneOf.0","typeLabel":"Code interpreter tool · object"},{"type":"object","title":"FileSearch tool","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `file_search`","enum":["file_search"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"file_search":{"type":"object","description":"Overrides for the file search tool.","properties":{"max_num_results":{"type":"integer","minimum":1,"maximum":50,"description":"The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/number-of-chunks-returned) for more information.\n","uniqueKey":"tools.items.[INDEX].oneOf.1.file_search.max_num_results","typeLabel":"integer"}},"uniqueKey":"tools.items.[INDEX].oneOf.1.file_search","typeLabel":"object"}},"uniqueKey":"tools.items.[INDEX].oneOf.1","typeLabel":"FileSearch tool · object"},{"type":"object","title":"Function tool","required":["type","function"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","description":"The type of tool being defined: `function`","enum":["function"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.","isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.2.function.name","typeLabel":"string"},"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function.","uniqueKey":"tools.items.[INDEX].oneOf.2.function.description","typeLabel":"string"},"parameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.","additionalProperties":true,"uniqueKey":"tools.items.[INDEX].oneOf.2.function.parameters","typeLabel":"object"},"strict":{"oneOf":[{"type":"boolean","default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).","uniqueKey":"tools.items.[INDEX].oneOf.2.function.strict.oneOf.0","typeLabel":"boolean"},{"type":"null","default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).","uniqueKey":"tools.items.[INDEX].oneOf.2.function.strict.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools.items.[INDEX].oneOf.2.function.strict","typeLabel":"boolean | null"}},"required":["name"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.2.function","typeLabel":"object"}},"uniqueKey":"tools.items.[INDEX].oneOf.2","typeLabel":"Function tool · object"}],"uniqueKey":"tools.items.[INDEX]","typeLabel":"Code interpreter tool · object | FileSearch tool · object | Function tool · object"},"isRequired":true,"uniqueKey":"tools","typeLabel":"(Code interpreter tool · object | FileSearch tool · object | Function tool · object)[]"},"metadata":{"oneOf":[{"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. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n","type":"object","x-oaiTypeLabel":"map","isRequired":true,"uniqueKey":"metadata.oneOf.0","typeLabel":"object"},{"description":"Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n","type":"null","x-oaiTypeLabel":"map","isRequired":true,"uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"metadata","typeLabel":"object | null"},"usage":{"oneOf":[{"type":"object","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.).","properties":{"completion_tokens":{"type":"integer","description":"Number of completion tokens used over the course of the run.","isRequired":true,"uniqueKey":"usage.oneOf.0.completion_tokens","typeLabel":"integer"},"prompt_tokens":{"type":"integer","description":"Number of prompt tokens used over the course of the run.","isRequired":true,"uniqueKey":"usage.oneOf.0.prompt_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total number of tokens used (prompt + completion).","isRequired":true,"uniqueKey":"usage.oneOf.0.total_tokens","typeLabel":"integer"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"isRequired":true,"uniqueKey":"usage.oneOf.0","typeLabel":"object"},{"type":"null","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.).","properties":{"completion_tokens":{"type":"integer","description":"Number of completion tokens used over the course of the run."},"prompt_tokens":{"type":"integer","description":"Number of prompt tokens used over the course of the run."},"total_tokens":{"type":"integer","description":"Total number of tokens used (prompt + completion)."}},"required":["prompt_tokens","completion_tokens","total_tokens"],"isRequired":true,"uniqueKey":"usage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"usage","typeLabel":"object | null"},"max_prompt_tokens":{"oneOf":[{"type":"integer","description":"The maximum number of prompt tokens specified to have been used over the course of the run.\n","minimum":256,"isRequired":true,"uniqueKey":"max_prompt_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The maximum number of prompt tokens specified to have been used over the course of the run.\n","minimum":256,"isRequired":true,"uniqueKey":"max_prompt_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"max_prompt_tokens","typeLabel":"integer | null"},"max_completion_tokens":{"oneOf":[{"type":"integer","description":"The maximum number of completion tokens specified to have been used over the course of the run.\n","minimum":256,"isRequired":true,"uniqueKey":"max_completion_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The maximum number of completion tokens specified to have been used over the course of the run.\n","minimum":256,"isRequired":true,"uniqueKey":"max_completion_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"max_completion_tokens","typeLabel":"integer | null"},"truncation_strategy":{"oneOf":[{"type":"object","title":"Thread Truncation Controls","description":"Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.","properties":{"type":{"type":"string","description":"The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.","enum":["auto","last_messages"],"isRequired":true,"uniqueKey":"truncation_strategy.oneOf.0.type","typeLabel":"enum\u003cstring>"},"last_messages":{"oneOf":[{"type":"integer","description":"The number of most recent messages from the thread when constructing the context for the run.","minimum":1,"uniqueKey":"truncation_strategy.oneOf.0.last_messages.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The number of most recent messages from the thread when constructing the context for the run.","minimum":1,"uniqueKey":"truncation_strategy.oneOf.0.last_messages.oneOf.1","typeLabel":"null"}],"uniqueKey":"truncation_strategy.oneOf.0.last_messages","typeLabel":"integer | null"}},"required":["type"],"isRequired":true,"uniqueKey":"truncation_strategy.oneOf.0","typeLabel":"Thread Truncation Controls · object"},{"type":"null","title":"Thread Truncation Controls","description":"Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.","properties":{"type":{"type":"string","description":"The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.","enum":["auto","last_messages"]},"last_messages":{"oneOf":[{"type":"integer","description":"The number of most recent messages from the thread when constructing the context for the run.","minimum":1},{"type":"null","description":"The number of most recent messages from the thread when constructing the context for the run.","minimum":1}]}},"required":["type"],"isRequired":true,"uniqueKey":"truncation_strategy.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"truncation_strategy","typeLabel":"Thread Truncation Controls · object | null"},"tool_choice":{"oneOf":[{"type":"string","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tools and instead generates a message.\n`auto` is the default value and means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools before responding to the user.\nSpecifying a particular tool like `{\"type\": \"file_search\"}` or `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n","enum":["none","auto","required"],"x-oaiExpandable":true,"isRequired":true,"uniqueKey":"tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tools and instead generates a message.\n`auto` is the default value and means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools before responding to the user.\nSpecifying a particular tool like `{\"type\": \"file_search\"}` or `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n","required":["type"],"x-oaiExpandable":true,"properties":{"type":{"type":"string","enum":["function","code_interpreter","file_search"],"description":"The type of the tool. If type is `function`, the function name must be set","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call.","isRequired":true,"uniqueKey":"tool_choice.oneOf.1.function.name","typeLabel":"string"}},"required":["name"],"uniqueKey":"tool_choice.oneOf.1.function","typeLabel":"object"}},"isRequired":true,"uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"tool_choice.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"tool_choice","typeLabel":"enum\u003cstring> | object | null"},"parallel_tool_calls":{"description":"Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use.","type":"boolean","default":true,"isRequired":true,"uniqueKey":"parallel_tool_calls","typeLabel":"boolean"},"response_format":{"oneOf":[{"type":"string","description":"Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is valid JSON.\n\n**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.\n","enum":["none","auto"],"x-oaiExpandable":true,"isRequired":true,"uniqueKey":"response_format.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is valid JSON.\n\n**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.\n","x-oaiExpandable":true,"properties":{"type":{"type":"string","enum":["text","json_object"],"example":"json_object","default":"text","description":"Must be one of `text` or `json_object`.","uniqueKey":"response_format.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"response_format.oneOf.1","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"response_format.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"response_format","typeLabel":"enum\u003cstring> | object | null"},"temperature":{"oneOf":[{"description":"The sampling temperature used for this run. If not set, defaults to 1.","type":"number","uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"description":"The sampling temperature used for this run. If not set, defaults to 1.","type":"null","uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"top_p":{"oneOf":[{"description":"The nucleus sampling value used for this run. If not set, defaults to 1.","type":"number","uniqueKey":"top_p.oneOf.0","typeLabel":"number"},{"description":"The nucleus sampling value used for this run. If not set, defaults to 1.","type":"null","uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number | null"}},"required":["id","object","created_at","thread_id","assistant_id","status","required_action","last_error","expires_at","started_at","cancelled_at","failed_at","completed_at","model","instructions","tools","metadata","usage","incomplete_details","max_prompt_tokens","max_completion_tokens","truncation_strategy","tool_choice","parallel_tool_calls","response_format"],"x-code-samples":{"name":"The run object","beta":true,"example":"{\n \"id\": \"run_abc123\",\n \"object\": \"thread.run\",\n \"created_at\": 1698107661,\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"status\": \"completed\",\n \"started_at\": 1699073476,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699073498,\n \"last_error\": null,\n \"model\": \"gpt-4-turbo\",\n \"instructions\": null,\n \"tools\": [{\"type\": \"file_search\"}, {\"type\": \"code_interpreter\"}],\n \"metadata\": {},\n \"incomplete_details\": null,\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"},"uniqueKey":"","typeLabel":"A run on a thread · object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"thread.run","created_at":123,"thread_id":"\u003cstring>","assistant_id":"\u003cstring>","status":"queued","required_action":{"type":"submit_tool_outputs","submit_tool_outputs":{"tool_calls":[{"id":"\u003cstring>","type":"function","function":{"name":"\u003cstring>","arguments":"\u003cstring>"}}]}},"last_error":{"code":"server_error","message":"\u003cstring>"},"expires_at":123,"started_at":123,"cancelled_at":123,"failed_at":123,"completed_at":123,"incomplete_details":{"reason":"max_completion_tokens"},"model":"\u003cstring>","instructions":"\u003cstring>","tools":[],"metadata":{},"usage":{"completion_tokens":123,"prompt_tokens":123,"total_tokens":123},"max_prompt_tokens":257,"max_completion_tokens":257,"truncation_strategy":{"type":"auto","last_messages":2},"tool_choice":"none","parallel_tool_calls":true,"response_format":"none","temperature":123,"top_p":123}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"1b045ed1-29d1-400b-b610-faa0a9b17fd0":{"Portkey-Key":{"type":"apiKey","in":"header","name":"x-portkey-api-key","scopes":[],"schemeName":"Portkey-Key"},"Virtual-Key":{"type":"apiKey","in":"header","name":"x-portkey-virtual-key","scopes":[],"schemeName":"Virtual-Key"}},"392129cf-07a8-4133-8aa0-8e7ae3a40bcb":{"Portkey-Key":{"type":"apiKey","in":"header","name":"x-portkey-api-key","scopes":[],"schemeName":"Portkey-Key"},"Provider-Auth":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"Provider-Auth"},"Provider-Name":{"type":"apiKey","in":"header","name":"x-portkey-provider","scopes":[],"schemeName":"Provider-Name"}},"7a292193-f44c-4b68-8db1-33db0d7e5191":{"Portkey-Key":{"type":"apiKey","in":"header","name":"x-portkey-api-key","scopes":[],"schemeName":"Portkey-Key"},"Config":{"type":"apiKey","in":"header","name":"x-portkey-config","scopes":[],"schemeName":"Config"}},"f5ceacb5-fca7-48d0-946b-e1334ccb5507":{"Portkey-Key":{"type":"apiKey","in":"header","name":"x-portkey-api-key","scopes":[],"schemeName":"Portkey-Key"},"Provider-Auth":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"Provider-Auth"},"Provider-Name":{"type":"apiKey","in":"header","name":"x-portkey-provider","scopes":[],"schemeName":"Provider-Name"},"Custom-Host":{"type":"apiKey","in":"header","name":"x-portkey-custom-host","scopes":[],"schemeName":"Custom-Host"}}},"servers":{"90fb5039-3a97-4d48-8634-e82be9b51913":{"url":"https://api.portkey.ai/v1","description":"Portkey API Public Endpoint"},"f3741382-dba7-4d9e-9fbe-fda3bd58fc21":{"url":"SELF_HOSTED_GATEWAY_URL","description":"Self-Hosted Gateway URL"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-portkey-api-key","scopes":[],"schemeName":"Portkey-Key"},"schema":{"title":"x-portkey-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Portkey-Key","name":"x-portkey-api-key"},{"scheme":{"type":"apiKey","in":"header","name":"x-portkey-virtual-key","scopes":[],"schemeName":"Virtual-Key"},"schema":{"title":"x-portkey-virtual-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Virtual-Key","name":"x-portkey-virtual-key"}],"title":"Portkey-Key \u0026 Virtual-Key"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-portkey-api-key","scopes":[],"schemeName":"Portkey-Key"},"schema":{"title":"x-portkey-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Portkey-Key","name":"x-portkey-api-key"},{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"Provider-Auth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"Provider-Auth","name":"Authorization"},{"scheme":{"type":"apiKey","in":"header","name":"x-portkey-provider","scopes":[],"schemeName":"Provider-Name"},"schema":{"title":"x-portkey-provider","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Provider-Name","name":"x-portkey-provider"}],"title":"Portkey-Key \u0026 Provider-Auth \u0026 Provider-Name"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-portkey-api-key","scopes":[],"schemeName":"Portkey-Key"},"schema":{"title":"x-portkey-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Portkey-Key","name":"x-portkey-api-key"},{"scheme":{"type":"apiKey","in":"header","name":"x-portkey-config","scopes":[],"schemeName":"Config"},"schema":{"title":"x-portkey-config","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Config","name":"x-portkey-config"}],"title":"Portkey-Key \u0026 Config"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-portkey-api-key","scopes":[],"schemeName":"Portkey-Key"},"schema":{"title":"x-portkey-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Portkey-Key","name":"x-portkey-api-key"},{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"Provider-Auth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"Provider-Auth","name":"Authorization"},{"scheme":{"type":"apiKey","in":"header","name":"x-portkey-provider","scopes":[],"schemeName":"Provider-Name"},"schema":{"title":"x-portkey-provider","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Provider-Name","name":"x-portkey-provider"},{"scheme":{"type":"apiKey","in":"header","name":"x-portkey-custom-host","scopes":[],"schemeName":"Custom-Host"},"schema":{"title":"x-portkey-custom-host","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Custom-Host","name":"x-portkey-custom-host"}],"title":"Portkey-Key \u0026 Provider-Auth \u0026 Provider-Name \u0026 Custom-Host"}]},"originalFileLocation":"https://raw.githubusercontent.com/Portkey-AI/openapi/refs/heads/master/openapi.yaml"},"subdomain":"portkey-docs","siteName":"Portkey (Prisma AIRS AI Gateway) Docs","title":"Create Run - Portkey (Prisma AIRS AI Gateway) Docs","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"contextualStarterQuestions":[{"_id":"6aa971b40031bd0287c964fc","deploymentId":"67086365a151447bf2fa5021","questionText":"How do I use the runs API?","status":"active","generatedBy":"contextual","path":"api-reference/inference-api/assistants-api/runs/create-run","createdAt":"2026-09-15T16:26:28.550Z","updatedAt":"2026-09-15T16:26:28.550Z","__v":0},{"_id":"6aa971b40031bd0287c964fa","deploymentId":"67086365a151447bf2fa5021","questionText":"How do I create a new run?","status":"active","generatedBy":"contextual","path":"api-reference/inference-api/assistants-api/runs/create-run","createdAt":"2026-09-15T16:26:28.550Z","updatedAt":"2026-09-15T16:26:28.550Z","__v":0},{"_id":"6aa971b40031bd0287c964fb","deploymentId":"67086365a151447bf2fa5021","questionText":"What parameters are required?","status":"active","generatedBy":"contextual","path":"api-reference/inference-api/assistants-api/runs/create-run","createdAt":"2026-09-15T16:26:28.550Z","updatedAt":"2026-09-15T16:26:28.550Z","__v":0}],"navMaps":{"firstHrefInVersion":{"Latest":{"href":"/api-reference/inference-api/assistants-api/runs/create-run","matchLevel":0},"Prisma AIRS":{"href":"/aigw/introduction/welcome","matchLevel":4},"Virtual Keys (Deprecated)":{"href":"/api-reference/inference-api/assistants-api/runs/create-run","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-09-15T13:55:28.722Z","gitLastModified":"2026-08-06T05:55:04.000Z","originalFileLocation":"api-reference/inference-api/assistants-api/runs/create-run.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Portkey (Prisma AIRS AI Gateway) Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Run - Portkey (Prisma AIRS AI Gateway) Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Portkey AI Gateway Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://portkey-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Runs\u0026amp;title=Create+Run\u0026amp;theme=262137c9f2583e48984715e7\u0026amp;signature=584658c7cdd815ac1bb85f55fc260c9920e5b5e62f4151ee26d8f01c9148d30a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Run - Portkey (Prisma AIRS AI Gateway) Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://portkey-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Runs\u0026amp;title=Create+Run\u0026amp;theme=262137c9f2583e48984715e7\u0026amp;signature=584658c7cdd815ac1bb85f55fc260c9920e5b5e62f4151ee26d8f01c9148d30a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Portkey (Prisma AIRS AI Gateway) Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0891B2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/inference-api/assistants-api/runs/create-run.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.portkey.ai/#organization\",\"name\":\"Portkey (Prisma AIRS AI Gateway) Docs\",\"url\":\"https://docs.portkey.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/portkey-docs/tHk-hgNjLbEj4dhh/images/portkey-PANW-company-logo-positive.png?fit=max\u0026auto=format\u0026n=tHk-hgNjLbEj4dhh\u0026q=85\u0026s=c5fb09014ff79616583b1d3bffe27450\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.portkey.ai/docs#website\",\"name\":\"Portkey (Prisma AIRS AI Gateway) Docs\",\"url\":\"https://docs.portkey.ai/docs\",\"publisher\":{\"@id\":\"https://docs.portkey.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run#webpage\",\"url\":\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run\",\"name\":\"Create Run\",\"dateModified\":\"2026-08-06T05:55:04.000Z\",\"isPartOf\":{\"@id\":\"https://docs.portkey.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Assistants\",\"item\":\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/assistants/create-assistant\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Run\",\"item\":\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run#apireference\",\"headline\":\"Create Run\",\"name\":\"Create Run\",\"url\":\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run\",\"mainEntityOfPage\":{\"@id\":\"https://docs.portkey.ai/docs/api-reference/inference-api/assistants-api/runs/create-run#webpage\"},\"dateModified\":\"2026-08-06T05:55:04.000Z\",\"publisher\":{\"@id\":\"https://docs.portkey.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.portkey.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Portkey (Prisma AIRS AI Gateway) Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Portkey (Prisma AIRS AI Gateway) Docs","nav":{"global":null,"versions":[{"version":"Latest","tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/introduction/what-is-portkey"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/ecosystem"}]},{"tab":"Gateway APIs","groups":[{"group":"API Reference","pages":[{"title":"Introduction","href":"/api-reference/inference-api/introduction"},{"title":"Agentic Usage","href":"/api-reference/inference-api/agentic-usage"},{"title":"Supported Providers","href":"/api-reference/inference-api/supported-providers"},{"title":"Authentication","href":"/api-reference/inference-api/authentication"},{"title":"Headers","href":"/api-reference/inference-api/headers"},{"title":"Errors","href":"/api-reference/inference-api/error-codes"},{"title":"Response Schema","href":"/api-reference/inference-api/response-schema"},{"group":"More","pages":[{"title":"Gateway Config Object","href":"/api-reference/inference-api/config-object"},{"title":"OpenAPI Specification","url":"https://github.com/Portkey-AI/openapi","href":"/api-reference/inference-api/open-api-specification"}]}]},{"group":"SDK","pages":[{"title":"Supported SDKs","href":"/api-reference/sdk/list"},{"title":"Python","href":"/api-reference/sdk/python"},{"title":"Node.js","href":"/api-reference/sdk/node"},{"title":"C# (.NET)","href":"/api-reference/sdk/c-sharp"}]},{"group":"Chat Completions","pages":[{"title":"Chat","openapi":"post /chat/completions","href":"/api-reference/inference-api/chat"}]},{"group":"Responses","pages":[{"title":"Create a Response","openapi":"post /responses","href":"/api-reference/inference-api/responses/responses"},{"title":"Get a Response","openapi":"get /responses/{response_id}","href":"/api-reference/inference-api/responses/retrieve-response"},{"title":"Delete a Response","openapi":"delete /responses/{response_id}","href":"/api-reference/inference-api/responses/delete-response"},{"title":"List Input Items","openapi":"get /responses/{response_id}/input_items","href":"/api-reference/inference-api/responses/retrieve-inputs"}]},{"group":"Portkey Endpoints","pages":[{"title":"Prompt Completions","openapi":"post /prompts/{promptId}/completions","href":"/api-reference/inference-api/prompts/prompt-completion"},{"title":"Prompt Render","openapi":"post /prompts/{promptId}/render","href":"/api-reference/inference-api/prompts/render"},{"title":"Insert a Log","openapi":"post /logs","href":"/api-reference/admin-api/data-plane/logs/insert-a-log"},{"title":"Create Feedback","openapi":"post /feedback","href":"/api-reference/admin-api/data-plane/feedback/create-feedback"},{"title":"Update Feedback","openapi":"put /feedback/{id}","href":"/api-reference/admin-api/data-plane/feedback/update-feedback"},{"group":"Log Exports","pages":[{"title":"Retrieve a Log Export","openapi":"get /logs/exports/{exportId}","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/retrieve-a-log-export"},{"title":"Update a Log Export","openapi":"put /logs/exports/{exportId}","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/update-a-log-export"},{"title":"List a Log Export","openapi":"get /logs/exports","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/list-log-exports"},{"title":"Create a Log Export","openapi":"post /logs/exports","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/create-a-log-export"},{"title":"Start a Log Export","openapi":"post /logs/exports/{exportId}/start","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/start-a-log-export"},{"title":"Cancel a Log Export","openapi":"post /logs/exports/{exportId}/cancel","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/cancel-a-log-export"},{"title":"Delete a Log Export","openapi":"delete /logs/exports/{exportId}","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/delete-a-log-export"},{"title":"Download a Log Export","openapi":"get /logs/exports/{exportId}/download","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/download-a-log-export"}]}]},{"group":"Embeddings","pages":[{"title":"Embeddings","openapi":"post /embeddings","href":"/api-reference/inference-api/embeddings"}]},{"group":"Rerank","pages":[{"title":"Rerank","openapi":"post /rerank","href":"/api-reference/inference-api/rerank"}]},{"group":"Decisions","pages":[{"title":"Decisions","openapi":"post /decisions","href":"/api-reference/inference-api/decisions"}]},{"group":"OCR","pages":[{"title":"OCR","openapi":"post /ocr","href":"/api-reference/inference-api/ocr"}]},{"group":"Images","pages":[{"title":"Create Image","openapi":"post /images/generations","href":"/api-reference/inference-api/images/create-image"},{"title":"Create Image Edit","openapi":"post /images/edits","href":"/api-reference/inference-api/images/create-image-edit"},{"title":"Create Image Variation","openapi":"post /images/variations","href":"/api-reference/inference-api/images/create-image-variation"}]},{"group":"Models","pages":[{"title":"Models","openapi":"get /models","href":"/api-reference/inference-api/models/models"}]},{"group":"Audio","pages":[{"title":"Create Speech","openapi":"post /audio/speech","href":"/api-reference/inference-api/audio/create-speech"},{"title":"Create Transcription","openapi":"post /audio/transcriptions","href":"/api-reference/inference-api/audio/create-transcription"},{"title":"Create Translation","openapi":"post /audio/translations","href":"/api-reference/inference-api/audio/create-translation"}]},{"group":"Other APIs","pages":[{"title":"Gateway to Other APIs","icon":"chart-network","href":"/api-reference/inference-api/gateway-for-other-apis"}]},{"group":"Completions","pages":[{"title":"Completions","openapi":"post /completions","href":"/api-reference/inference-api/completions"}]},{"group":"Moderations","pages":[{"title":"Moderations","openapi":"post /moderations","href":"/api-reference/inference-api/moderations"}]},{"group":"Fine-tuning","pages":[{"title":"Create Fine-tuning Job","openapi":"post /fine_tuning/jobs","href":"/api-reference/inference-api/fine-tuning/create-fine-tuning-job"},{"title":"List Fine-tuning Jobs","openapi":"get /fine_tuning/jobs","href":"/api-reference/inference-api/fine-tuning/list-fine-tuning-jobs"},{"title":"Retrieve Fine-tuning Job","openapi":"get /fine_tuning/jobs/{fine_tuning_job_id}","href":"/api-reference/inference-api/fine-tuning/retrieve-fine-tuning-job"},{"title":"List Fine-tuning Events","openapi":"get /fine_tuning/jobs/{fine_tuning_job_id}/events","href":"/api-reference/inference-api/fine-tuning/list-fine-tuning-events"},{"title":"List Fine-tuning Checkpoints","openapi":"get /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints","href":"/api-reference/inference-api/fine-tuning/list-fine-tuning-checkpoints"},{"title":"Cancel Fine-tuning","openapi":"post /fine_tuning/jobs/{fine_tuning_job_id}/cancel","href":"/api-reference/inference-api/fine-tuning/cancel-fine-tuning"}]},{"group":"Batch","pages":[{"title":"Create Batch","openapi":"post /batches","href":"/api-reference/inference-api/batch/create-batch"},{"title":"List Batch","openapi":"get /batches","href":"/api-reference/inference-api/batch/list-batch"},{"title":"Retrieve Batch","openapi":"get /batches/{batch_id}","href":"/api-reference/inference-api/batch/retrieve-batch"},{"title":"Cancel Batch","openapi":"post /batches/{batch_id}/cancel","href":"/api-reference/inference-api/batch/cancel-batch"}]},{"group":"Files","pages":[{"title":"Upload File","openapi":"post /files","href":"/api-reference/inference-api/files/upload-file"},{"title":"List Files","openapi":"get /files","href":"/api-reference/inference-api/files/list-files"},{"title":"Retrieve File","openapi":"get /files/{file_id}","href":"/api-reference/inference-api/files/retrieve-file"},{"title":"Retrieve File Content","openapi":"get /files/{file_id}/content","href":"/api-reference/inference-api/files/retrieve-file-content"},{"title":"Delete File","openapi":"delete /files/{file_id}","href":"/api-reference/inference-api/files/delete-file"}]},{"group":"Assistants","pages":[{"group":"Assistants","pages":[{"title":"Create Assistant","openapi":"post /assistants","href":"/api-reference/inference-api/assistants-api/assistants/create-assistant"},{"title":"List Assistant","openapi":"get /assistants","href":"/api-reference/inference-api/assistants-api/assistants/list-assistants"},{"title":"Retrieve Assistant","openapi":"get /assistants/{assistant_id}","href":"/api-reference/inference-api/assistants-api/assistants/retrieve-assistant"},{"title":"Modify Assistant","openapi":"post /assistants/{assistant_id}","href":"/api-reference/inference-api/assistants-api/assistants/modify-assistant"},{"title":"Delete Assistant","openapi":"delete /assistants/{assistant_id}","href":"/api-reference/inference-api/assistants-api/assistants/delete-assistant"}]},{"group":"Threads","pages":[{"title":"Create Thread","openapi":"post /threads","href":"/api-reference/inference-api/assistants-api/threads/create-thread"},{"title":"Retrieve Thread","openapi":"get /threads/{thread_id}","href":"/api-reference/inference-api/assistants-api/threads/retrieve-thread"},{"title":"Modify Thread","openapi":"post /threads/{thread_id}","href":"/api-reference/inference-api/assistants-api/threads/modify-thread"},{"title":"Delete Thread","openapi":"delete /threads/{thread_id}","href":"/api-reference/inference-api/assistants-api/threads/delete-thread"}]},{"group":"Messages","pages":[{"title":"Create Message","openapi":"post /threads/{thread_id}/messages","href":"/api-reference/inference-api/assistants-api/messages/create-message"},{"title":"List Message","openapi":"get /threads/{thread_id}/messages","href":"/api-reference/inference-api/assistants-api/messages/list-messages"},{"title":"Retrieve Message","openapi":"get /threads/{thread_id}/messages/{message_id}","href":"/api-reference/inference-api/assistants-api/messages/retrieve-message"},{"title":"Modify Message","openapi":"post /threads/{thread_id}/messages/{message_id}","href":"/api-reference/inference-api/assistants-api/messages/modify-message"},{"title":"Delete Message","openapi":"delete /threads/{thread_id}/messages/{message_id}","description":"","href":"/api-reference/inference-api/assistants-api/messages/delete-message"}]},{"group":"Runs","pages":[{"title":"Create Run","openapi":"post /threads/{thread_id}/runs","href":"/api-reference/inference-api/assistants-api/runs/create-run"},{"title":"Create thread and Run","openapi":"post /threads/runs","description":"","href":"/api-reference/inference-api/assistants-api/runs/create-thread-and-run"},{"title":"list Run","openapi":"get /threads/{thread_id}/runs","href":"/api-reference/inference-api/assistants-api/runs/list-runs"},{"title":"Retrieve Run","openapi":"get /threads/{thread_id}/runs/{run_id}","href":"/api-reference/inference-api/assistants-api/runs/retrieve-run"},{"title":"Modify Run","openapi":"post /threads/{thread_id}/runs/{run_id}","href":"/api-reference/inference-api/assistants-api/runs/modify-run"},{"title":"Submit Tool Outputs to Run","openapi":"post /threads/{thread_id}/runs/{run_id}/submit_tool_outputs","href":"/api-reference/inference-api/assistants-api/runs/submit-tool-outputs-to-run"},{"title":"Cancel Run","openapi":"post /threads/{thread_id}/runs/{run_id}/cancel","href":"/api-reference/inference-api/assistants-api/runs/cancel-run"}]},{"group":"Run Steps","pages":[{"title":"List Run Steps","openapi":"get /threads/{thread_id}/runs/{run_id}/steps","href":"/api-reference/inference-api/assistants-api/run-steps/list-run-steps"},{"title":"Retrieve Run Steps","openapi":"get /threads/{thread_id}/runs/{run_id}/steps/{step_id}","href":"/api-reference/inference-api/assistants-api/run-steps/retrieve-run-steps"}]}]}]},{"tab":"Admin APIs","pages":[{"title":"Admin APIs","href":"/api-reference/admin-api/introduction"}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/guides/use-cases/run-batch-evals"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/2026/september"}]},{"tab":"Help Center","pages":[{"title":"Help Center","href":"/help-center/you-do-not-have-enough-permissions"}]}]},{"version":"Prisma AIRS","pages":[{"title":"Prisma AIRS","href":"/aigw/introduction/welcome"}]},{"version":"Virtual Keys (Deprecated)","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/virtual_key_old/introduction/what-is-portkey"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/virtual_key_old/integrations/ecosystem"}]},{"tab":"Inference API","groups":[{"group":"API Reference","pages":[{"title":"Introduction","href":"/api-reference/inference-api/introduction"},{"title":"Agentic Usage","href":"/api-reference/inference-api/agentic-usage"},{"title":"Supported Providers","href":"/api-reference/inference-api/supported-providers"},{"title":"Authentication","href":"/api-reference/inference-api/authentication"},{"title":"Headers","href":"/api-reference/inference-api/headers"},{"title":"Errors","href":"/api-reference/inference-api/error-codes"},{"title":"Response Schema","href":"/api-reference/inference-api/response-schema"},{"group":"More","pages":[{"title":"Gateway Config Object","href":"/api-reference/inference-api/config-object"},{"title":"OpenAPI Specification","url":"https://github.com/Portkey-AI/openapi","href":"/api-reference/inference-api/open-api-specification"}]}]},{"group":"SDK","pages":[{"title":"Supported SDKs","href":"/api-reference/sdk/list"},{"title":"Python","href":"/api-reference/sdk/python"},{"title":"Node.js","href":"/api-reference/sdk/node"},{"title":"C# (.NET)","href":"/api-reference/sdk/c-sharp"}]},{"group":"Chat Completions","pages":[{"title":"Chat","openapi":"post /chat/completions","href":"/api-reference/inference-api/chat"}]},{"group":"Responses","pages":[{"title":"Create a Response","openapi":"post /responses","href":"/api-reference/inference-api/responses/responses"},{"title":"Get a Response","openapi":"get /responses/{response_id}","href":"/api-reference/inference-api/responses/retrieve-response"},{"title":"Delete a Response","openapi":"delete /responses/{response_id}","href":"/api-reference/inference-api/responses/delete-response"},{"title":"List Input Items","openapi":"get /responses/{response_id}/input_items","href":"/api-reference/inference-api/responses/retrieve-inputs"}]},{"group":"Portkey Endpoints","pages":[{"title":"Prompt Completions","openapi":"post /prompts/{promptId}/completions","href":"/api-reference/inference-api/prompts/prompt-completion"},{"title":"Prompt Render","openapi":"post /prompts/{promptId}/render","href":"/api-reference/inference-api/prompts/render"},{"title":"Insert a Log","openapi":"post /logs","href":"/api-reference/admin-api/data-plane/logs/insert-a-log"},{"title":"Create Feedback","openapi":"post /feedback","href":"/api-reference/admin-api/data-plane/feedback/create-feedback"},{"title":"Update Feedback","openapi":"put /feedback/{id}","href":"/api-reference/admin-api/data-plane/feedback/update-feedback"},{"group":"Log Exports","pages":[{"title":"Retrieve a Log Export","openapi":"get /logs/exports/{exportId}","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/retrieve-a-log-export"},{"title":"Update a Log Export","openapi":"put /logs/exports/{exportId}","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/update-a-log-export"},{"title":"List a Log Export","openapi":"get /logs/exports","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/list-log-exports"},{"title":"Create a Log Export","openapi":"post /logs/exports","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/create-a-log-export"},{"title":"Start a Log Export","openapi":"post /logs/exports/{exportId}/start","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/start-a-log-export"},{"title":"Cancel a Log Export","openapi":"post /logs/exports/{exportId}/cancel","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/cancel-a-log-export"},{"title":"Delete a Log Export","openapi":"delete /logs/exports/{exportId}","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/delete-a-log-export"},{"title":"Download a Log Export","openapi":"get /logs/exports/{exportId}/download","href":"/api-reference/admin-api/data-plane/logs/log-exports-beta/download-a-log-export"}]}]},{"group":"Embeddings","pages":[{"title":"Embeddings","openapi":"post /embeddings","href":"/api-reference/inference-api/embeddings"}]},{"group":"Rerank","pages":[{"title":"Rerank","openapi":"post /rerank","href":"/api-reference/inference-api/rerank"}]},{"group":"Decisions","pages":[{"title":"Decisions","openapi":"post /decisions","href":"/api-reference/inference-api/decisions"}]},{"group":"OCR","pages":[{"title":"OCR","openapi":"post /ocr","href":"/api-reference/inference-api/ocr"}]},{"group":"Images","pages":[{"title":"Create Image","openapi":"post /images/generations","href":"/api-reference/inference-api/images/create-image"},{"title":"Create Image Edit","openapi":"post /images/edits","href":"/api-reference/inference-api/images/create-image-edit"},{"title":"Create Image Variation","openapi":"post /images/variations","href":"/api-reference/inference-api/images/create-image-variation"}]},{"group":"Audio","pages":[{"title":"Create Speech","openapi":"post /audio/speech","href":"/api-reference/inference-api/audio/create-speech"},{"title":"Create Transcription","openapi":"post /audio/transcriptions","href":"/api-reference/inference-api/audio/create-transcription"},{"title":"Create Translation","openapi":"post /audio/translations","href":"/api-reference/inference-api/audio/create-translation"}]},{"group":"Other APIs","pages":[{"title":"Gateway to Other APIs","icon":"chart-network","href":"/api-reference/inference-api/gateway-for-other-apis"}]},{"group":"Completions","pages":[{"title":"Completions","openapi":"post /completions","href":"/api-reference/inference-api/completions"}]},{"group":"Moderations","pages":[{"title":"Moderations","openapi":"post /moderations","href":"/api-reference/inference-api/moderations"}]},{"group":"Fine-tuning","pages":[{"title":"Create Fine-tuning Job","openapi":"post /fine_tuning/jobs","href":"/api-reference/inference-api/fine-tuning/create-fine-tuning-job"},{"title":"List Fine-tuning Jobs","openapi":"get /fine_tuning/jobs","href":"/api-reference/inference-api/fine-tuning/list-fine-tuning-jobs"},{"title":"Retrieve Fine-tuning Job","openapi":"get /fine_tuning/jobs/{fine_tuning_job_id}","href":"/api-reference/inference-api/fine-tuning/retrieve-fine-tuning-job"},{"title":"List Fine-tuning Events","openapi":"get /fine_tuning/jobs/{fine_tuning_job_id}/events","href":"/api-reference/inference-api/fine-tuning/list-fine-tuning-events"},{"title":"List Fine-tuning Checkpoints","openapi":"get /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints","href":"/api-reference/inference-api/fine-tuning/list-fine-tuning-checkpoints"},{"title":"Cancel Fine-tuning","openapi":"post /fine_tuning/jobs/{fine_tuning_job_id}/cancel","href":"/api-reference/inference-api/fine-tuning/cancel-fine-tuning"}]},{"group":"Batch","pages":[{"title":"Create Batch","openapi":"post /batches","href":"/api-reference/inference-api/batch/create-batch"},{"title":"List Batch","openapi":"get /batches","href":"/api-reference/inference-api/batch/list-batch"},{"title":"Retrieve Batch","openapi":"get /batches/{batch_id}","href":"/api-reference/inference-api/batch/retrieve-batch"},{"title":"Cancel Batch","openapi":"post /batches/{batch_id}/cancel","href":"/api-reference/inference-api/batch/cancel-batch"}]},{"group":"Files","pages":[{"title":"Upload File","openapi":"post /files","href":"/api-reference/inference-api/files/upload-file"},{"title":"List Files","openapi":"get /files","href":"/api-reference/inference-api/files/list-files"},{"title":"Retrieve File","openapi":"get /files/{file_id}","href":"/api-reference/inference-api/files/retrieve-file"},{"title":"Retrieve File Content","openapi":"get /files/{file_id}/content","href":"/api-reference/inference-api/files/retrieve-file-content"},{"title":"Delete File","openapi":"delete /files/{file_id}","href":"/api-reference/inference-api/files/delete-file"}]},{"group":"Assistants","pages":[{"group":"Assistants","pages":[{"title":"Create Assistant","openapi":"post /assistants","href":"/api-reference/inference-api/assistants-api/assistants/create-assistant"},{"title":"List Assistant","openapi":"get /assistants","href":"/api-reference/inference-api/assistants-api/assistants/list-assistants"},{"title":"Retrieve Assistant","openapi":"get /assistants/{assistant_id}","href":"/api-reference/inference-api/assistants-api/assistants/retrieve-assistant"},{"title":"Modify Assistant","openapi":"post /assistants/{assistant_id}","href":"/api-reference/inference-api/assistants-api/assistants/modify-assistant"},{"title":"Delete Assistant","openapi":"delete /assistants/{assistant_id}","href":"/api-reference/inference-api/assistants-api/assistants/delete-assistant"}]},{"group":"Threads","pages":[{"title":"Create Thread","openapi":"post /threads","href":"/api-reference/inference-api/assistants-api/threads/create-thread"},{"title":"Retrieve Thread","openapi":"get /threads/{thread_id}","href":"/api-reference/inference-api/assistants-api/threads/retrieve-thread"},{"title":"Modify Thread","openapi":"post /threads/{thread_id}","href":"/api-reference/inference-api/assistants-api/threads/modify-thread"},{"title":"Delete Thread","openapi":"delete /threads/{thread_id}","href":"/api-reference/inference-api/assistants-api/threads/delete-thread"}]},{"group":"Messages","pages":[{"title":"Create Message","openapi":"post /threads/{thread_id}/messages","href":"/api-reference/inference-api/assistants-api/messages/create-message"},{"title":"List Message","openapi":"get /threads/{thread_id}/messages","href":"/api-reference/inference-api/assistants-api/messages/list-messages"},{"title":"Retrieve Message","openapi":"get /threads/{thread_id}/messages/{message_id}","href":"/api-reference/inference-api/assistants-api/messages/retrieve-message"},{"title":"Modify Message","openapi":"post /threads/{thread_id}/messages/{message_id}","href":"/api-reference/inference-api/assistants-api/messages/modify-message"},{"title":"Delete Message","openapi":"delete /threads/{thread_id}/messages/{message_id}","description":"","href":"/api-reference/inference-api/assistants-api/messages/delete-message"}]},{"group":"Runs","pages":[{"title":"Create Run","openapi":"post /threads/{thread_id}/runs","href":"/api-reference/inference-api/assistants-api/runs/create-run"},{"title":"Create thread and Run","openapi":"post /threads/runs","description":"","href":"/api-reference/inference-api/assistants-api/runs/create-thread-and-run"},{"title":"list Run","openapi":"get /threads/{thread_id}/runs","href":"/api-reference/inference-api/assistants-api/runs/list-runs"},{"title":"Retrieve Run","openapi":"get /threads/{thread_id}/runs/{run_id}","href":"/api-reference/inference-api/assistants-api/runs/retrieve-run"},{"title":"Modify Run","openapi":"post /threads/{thread_id}/runs/{run_id}","href":"/api-reference/inference-api/assistants-api/runs/modify-run"},{"title":"Submit Tool Outputs to Run","openapi":"post /threads/{thread_id}/runs/{run_id}/submit_tool_outputs","href":"/api-reference/inference-api/assistants-api/runs/submit-tool-outputs-to-run"},{"title":"Cancel Run","openapi":"post /threads/{thread_id}/runs/{run_id}/cancel","href":"/api-reference/inference-api/assistants-api/runs/cancel-run"}]},{"group":"Run Steps","pages":[{"title":"List Run Steps","openapi":"get /threads/{thread_id}/runs/{run_id}/steps","href":"/api-reference/inference-api/assistants-api/run-steps/list-run-steps"},{"title":"Retrieve Run Steps","openapi":"get /threads/{thread_id}/runs/{run_id}/steps/{step_id}","href":"/api-reference/inference-api/assistants-api/run-steps/retrieve-run-steps"}]}]}]},{"tab":"Admin API","pages":[{"title":"Admin API","href":"/api-reference/admin-api/introduction"}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/guides/use-cases/run-batch-evals"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/2025/may"}]},{"tab":"Help articles","pages":[{"title":"Help articles","href":"/help-center/you-do-not-have-enough-permissions"}]}]}]},"basePath":"","title":"Create Run - Portkey (Prisma AIRS AI Gateway) Docs","buildId":"dpl_CEsowfH15TDzsBT2BFbX312Be4Ct","deploymentId":"dpl_CEsowfH15TDzsBT2BFbX312Be4Ct","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CqF8gK93.js","utils-Cfy66YIG.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-cadwlSiW.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BOSHrB55.js","snippetPresets-DuIJ6Tui.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BByZ-4eP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DWD4BnjW.js","shallow-Bo7p10ck.js","getApiPlaygroundDisplay-C7mFZ2Cg.js","CodeSnippet-DrT8v8gt.js","CodeSnippets-DGLmtlSm.js","Page-CGry0O4L.js","getPastedJson-DXZGgv-T.js","icon-DMjuBky8.js","MethodPill-C_c9VvF7.js","DuplicateIcon-D8Zrb3hW.js","createIcon-eYWxX-Sl.js","DynamicMarkdown-DORtg_Te.js","SectionHeading-DE1W9Ett.js","axios-vUo_bRtp.js","Markdown-BvSqw8zR.js","clsx-B-KWekQe.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CTE3eEYy.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Ba-QebqG.js"]}