OpenAI-compatible chat completions endpoint. Accepts the standard OpenAI request schema and returns the standard OpenAI response schema. Supports both streaming (SSE) and non-streaming modes. Works as a drop-in replacement with the OpenAI Python and TypeScript SDKs.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Swarms API Documentation","description":"Build intelligent AI agents and multi-agent swarms with the Swarms API. Create single agents, reasoning systems, and enterprise-scale swarms for automation, research, and complex problem-solving.","colors":{"primary":"#DC2626","light":"#FFFFFF","dark":"#000000"},"logo":{"light":"https://mintcdn.com/swarms/0uhx6ZFxLaCyzbhr/logo/light.svg?fit=max\u0026auto=format\u0026n=0uhx6ZFxLaCyzbhr\u0026q=85\u0026s=0c5b6851cc5173c655702a17160d54c5","dark":"https://mintcdn.com/swarms/0uhx6ZFxLaCyzbhr/logo/dark.svg?fit=max\u0026auto=format\u0026n=0uhx6ZFxLaCyzbhr\u0026q=85\u0026s=205e7749182b1789a69fa9e73ab35cfe"},"favicon":"https://mintcdn.com/swarms/0uhx6ZFxLaCyzbhr/logo.svg?fit=max\u0026auto=format\u0026n=0uhx6ZFxLaCyzbhr\u0026q=85\u0026s=a6cfd5b1a6d954eb010573a52b5a0e20","api":{"openapi":"https://api.swarms.world/openapi.json","playground":{"proxy":true}},"navbar":{"links":[{"icon":"key","href":"https://swarms.world/platform/api-keys","label":"Get API Key"},{"icon":"user","href":"https://swarms.world/platform/account","label":"Account Management"},{"icon":"headset","href":"https://cal.com/swarms/swarms-technical-support?overlayCalendar=true","label":"Support"},{"icon":"lightbulb","href":"https://status.swarms.ai","label":"Status"}]},"footer":{"socials":{"twitter":"https://twitter.com/swarms_corp","github":"https://github.com/The-Swarm-Corporation/swarms-api-docs","linkedin":"https://www.linkedin.com/company/the-swarm-corporation","discord":"https://discord.gg/EamjgSaEQf","youtube":"https://www.youtube.com/channel/UC9yXyitkbU_WSy7bd_41SqQ","medium":"https://medium.com/@kyeg"}},"seo":{"metatags":{"charset":"UTF-8","viewport":"width=device-width, initial-scale=1.0","robots":"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1","googlebot":"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1","google":"notranslate","generator":"Mintlify","theme-color":"#DC2626","color-scheme":"light dark","canonical":"https://docs.swarms.ai","format-detection":"telephone=no","referrer":"strict-origin-when-cross-origin","language":"en","copyright":"Copyright 2024 The Swarm Corporation","distribution":"global","coverage":"Worldwide","category":"Technology","target":"all","rating":"general","revisit-after":"3 days","HandheldFriendly":"True","MobileOptimized":"320","apple-mobile-web-app-capable":"yes","apple-mobile-web-app-status-bar-style":"black-translucent","apple-mobile-web-app-title":"Swarms API Docs","application-name":"Swarms API Documentation","msapplication-TileColor":"#DC2626","msapplication-navbutton-color":"#DC2626","og:title":"Swarms API Documentation - Build AI Agents \u0026 Multi-Agent Systems","og:type":"website","og:url":"https://docs.swarms.ai","og:image":"https://docs.swarms.ai/bg.jpg","og:image:width":"1200","og:image:height":"630","og:image:alt":"Swarms API Documentation - Build intelligent AI agents and multi-agent swarms","og:description":"Create intelligent AI agents and multi-agent swarms with the Swarms API. Support for OpenAI, Anthropic, and Groq models with enterprise-scale orchestration.","og:site_name":"Swarms API Documentation","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@swarms_corp","twitter:creator":"@kyegomez","twitter:title":"Swarms API Documentation - Build AI Agents \u0026 Multi-Agent Swarms","twitter:description":"Create intelligent AI agents and multi-agent swarms with the Swarms API. Support for OpenAI, Anthropic, and Groq models.","twitter:image":"https://docs.swarms.ai/bg.jpg","twitter:image:alt":"Swarms API Documentation - Build intelligent AI agents and multi-agent swarms","article:author":"The Swarm Corporation","article:section":"Technology","article:tag":"AI agents, multi-agent systems, swarm intelligence, API documentation, artificial intelligence"},"indexing":"all"},"contextual":{"options":["copy","view","chatgpt","claude","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Get Your API Key","href":"https://swarms.world/platform/api-keys"},{"anchor":"Account Management","href":"https://swarms.world/platform/account"},{"anchor":"Discord","href":"https://discord.gg/EamjgSaEQf"},{"anchor":"Technical Support","href":"https://cal.com/swarms/swarms-technical-support?overlayCalendar=true"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"swarms","hasAudioNarration":false,"actualSubdomain":"swarms","customDomains":["docs.swarms.ai"],"gitSource":{"type":"github","owner":"the-swarm-corporation","repo":"swarms-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{},"buildId":"6af000d6e24a4ea5ebc59b52","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Examples","count":108},{"language":"default","tag":"Swarms API","count":64},{"language":"default","tag":"Marketplace","count":41},{"language":"default","tag":"API Reference","count":32},{"language":"default","tag":"Multi-Agent","count":19},{"language":"default","tag":"Resources","count":19},{"language":"default","tag":"Multi-Agent Architectures","count":18},{"language":"default","tag":"Agent Capabilities","count":15},{"language":"default","tag":"Finance \u0026 Investing","count":14},{"language":"default","tag":"API","count":14}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/openai-compatible/chat-completions-openai-compatible","slug":"/api-reference/openai-compatible/chat-completions-openai-compatible","pageMetadata":{"title":"Chat Completions (OpenAI-compatible)","description":"OpenAI-compatible chat completions endpoint. Accepts the standard OpenAI request schema and returns the standard OpenAI response schema. Supports both streaming (SSE) and non-streaming modes. Works as a drop-in replacement with the OpenAI Python and TypeScript SDKs.","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/chat/completions","href":"/api-reference/openai-compatible/chat-completions-openai-compatible","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"OpenAI-compatible chat completions endpoint. Accepts the standard OpenAI request schema and returns the standard OpenAI response schema. Supports both streaming (SSE) and non-streaming modes. Works as a drop-in replacement with the OpenAI Python and TypeScript SDKs.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Chat Completions (OpenAI-compatible)","description":"OpenAI-compatible chat completions endpoint. Accepts the standard OpenAI request schema and returns the standard OpenAI response schema. Supports both streaming (SSE) and non-streaming modes. Works as a drop-in replacement with the OpenAI Python and TypeScript SDKs.","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/chat/completions","href":"/api-reference/openai-compatible/chat-completions-openai-compatible","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["OpenAI Compatible"],"summary":"Chat Completions (OpenAI-compatible)","description":"OpenAI-compatible chat completions endpoint. Accepts the standard OpenAI request schema and returns the standard OpenAI response schema. Supports both streaming (SSE) and non-streaming modes. Works as a drop-in replacement with the OpenAI Python and TypeScript SDKs.","operationId":"chat_completions_v1_chat_completions_post","parameters":["48ed9271-0347-4dd0-896f-9adf51f189e3"],"requestBody":"738d7a73-e2b0-46e3-870d-3890f5578cee","responses":{"200":"5075690c-deb5-4126-a51e-6eb09d3ec36a","422":"2d429f03-6a67-47ef-ad79-75b3ad62abf8"},"method":"post","type":"path","servers":["c74d9720-0b17-4f1a-bf3f-c552299d2e85"],"security":[],"path":"/v1/chat/completions","baseUrlOptions":["https://api.swarms.world"],"title":"Chat Completions (OpenAI-compatible)","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"48ed9271-0347-4dd0-896f-9adf51f189e3":{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"model":{"type":"string","title":"Model","description":"Model to use for completion","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"items":{"properties":{"role":{"type":"string","title":"Role","description":"The role of the message author (system, developer, user, assistant, tool). System and developer messages are joined, in order, into the system prompt.","isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","title":"Content","description":"The content of the message","uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"any"},"title":"Content","description":"The content of the message","uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"any[]"},{"type":"null","title":"Content","description":"The content of the message","uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | any[] | null"},"name":{"oneOf":[{"type":"string","title":"Name","description":"An optional name for the participant","uniqueKey":"messages.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","description":"An optional name for the participant","uniqueKey":"messages.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].name","typeLabel":"string | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"additionalProperties":true,"type":"object","uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"Tool Calls","description":"Tool calls the assistant asked for, in OpenAI function-calling shape","uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0","typeLabel":"Tool Calls · object[]"},{"type":"null","title":"Tool Calls","description":"Tool calls the assistant asked for, in OpenAI function-calling shape","uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"Tool Calls · object[] | null"},"tool_call_id":{"oneOf":[{"type":"string","title":"Tool Call Id","description":"On a tool message, the id of the call this result answers","uniqueKey":"messages.items.[INDEX].tool_call_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tool Call Id","description":"On a tool message, the id of the call this result answers","uniqueKey":"messages.items.[INDEX].tool_call_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string | null"}},"type":"object","required":["role"],"title":"ChatMessage","uniqueKey":"messages.items.[INDEX]","typeLabel":"ChatMessage · object"},"type":"array","title":"Messages","description":"A list of messages comprising the conversation","isRequired":true,"uniqueKey":"messages","typeLabel":"ChatMessage · object[]"},"temperature":{"oneOf":[{"type":"number","title":"Temperature","description":"Sampling temperature (0 to 2)","default":0.5,"maximum":2,"minimum":0,"uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"type":"null","title":"Temperature","description":"Sampling temperature (0 to 2)","default":0.5,"uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"top_p":{"oneOf":[{"type":"number","title":"Top P","description":"Nucleus sampling parameter","uniqueKey":"top_p.oneOf.0","typeLabel":"number"},{"type":"null","title":"Top P","description":"Nucleus sampling parameter","uniqueKey":"top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"top_p","typeLabel":"number | null"},"n":{"oneOf":[{"type":"integer","title":"N","description":"Number of completions to generate","default":1,"uniqueKey":"n.oneOf.0","typeLabel":"integer"},{"type":"null","title":"N","description":"Number of completions to generate","default":1,"uniqueKey":"n.oneOf.1","typeLabel":"null"}],"uniqueKey":"n","typeLabel":"integer | null"},"stream":{"oneOf":[{"type":"boolean","title":"Stream","description":"Whether to stream partial results","default":false,"uniqueKey":"stream.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Stream","description":"Whether to stream partial results","default":false,"uniqueKey":"stream.oneOf.1","typeLabel":"null"}],"uniqueKey":"stream","typeLabel":"boolean | null"},"max_tokens":{"oneOf":[{"type":"integer","title":"Max Tokens","description":"Maximum tokens to generate","minimum":1,"uniqueKey":"max_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Tokens","description":"Maximum tokens to generate","uniqueKey":"max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_tokens","typeLabel":"integer | null"},"max_completion_tokens":{"oneOf":[{"type":"integer","title":"Max Completion Tokens","description":"Maximum completion tokens (takes precedence over max_tokens)","minimum":1,"uniqueKey":"max_completion_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Completion Tokens","description":"Maximum completion tokens (takes precedence over max_tokens)","uniqueKey":"max_completion_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_completion_tokens","typeLabel":"integer | null"},"presence_penalty":{"oneOf":[{"type":"number","title":"Presence Penalty","description":"Presence penalty","uniqueKey":"presence_penalty.oneOf.0","typeLabel":"number"},{"type":"null","title":"Presence Penalty","description":"Presence penalty","uniqueKey":"presence_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"presence_penalty","typeLabel":"number | null"},"frequency_penalty":{"oneOf":[{"type":"number","title":"Frequency Penalty","description":"Frequency penalty","uniqueKey":"frequency_penalty.oneOf.0","typeLabel":"number"},{"type":"null","title":"Frequency Penalty","description":"Frequency penalty","uniqueKey":"frequency_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"frequency_penalty","typeLabel":"number | null"},"stop":{"oneOf":[{"type":"string","title":"Stop","description":"Up to 4 sequences where the model stops generating further tokens","uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.1.items.[INDEX]","typeLabel":"string"},"title":"Stop","description":"Up to 4 sequences where the model stops generating further tokens","uniqueKey":"stop.oneOf.1","typeLabel":"string[]"},{"type":"null","title":"Stop","description":"Up to 4 sequences where the model stops generating further tokens","uniqueKey":"stop.oneOf.2","typeLabel":"null"}],"uniqueKey":"stop","typeLabel":"string | string[] | null"},"user":{"oneOf":[{"type":"string","title":"User","description":"Unique identifier for the end-user","uniqueKey":"user.oneOf.0","typeLabel":"string"},{"type":"null","title":"User","description":"Unique identifier for the end-user","uniqueKey":"user.oneOf.1","typeLabel":"null"}],"uniqueKey":"user","typeLabel":"string | null"},"max_loops":{"oneOf":[{"type":"integer","title":"Max Loops","description":"Maximum number of agent reasoning loops (Swarms extension). Defaults to 1 (single pass), at most 50. Use via extra_body in the OpenAI SDK.","default":1,"maximum":50,"minimum":1,"uniqueKey":"max_loops.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Loops","description":"Maximum number of agent reasoning loops (Swarms extension). Defaults to 1 (single pass), at most 50. Use via extra_body in the OpenAI SDK.","default":1,"uniqueKey":"max_loops.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_loops","typeLabel":"integer | null"},"tools":{"oneOf":[{"type":"array","items":{"additionalProperties":true,"type":"object","uniqueKey":"tools.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"Tools","description":"Function-calling tool definitions, in OpenAI schema","uniqueKey":"tools.oneOf.0","typeLabel":"Tools · object[]"},{"type":"null","title":"Tools","description":"Function-calling tool definitions, in OpenAI schema","uniqueKey":"tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"tools","typeLabel":"Tools · object[] | null"},"tool_choice":{"oneOf":[{"type":"string","title":"Tool Choice","description":"Tool selection strategy: 'auto', 'none', 'required', or a specific function","uniqueKey":"tool_choice.oneOf.0","typeLabel":"string"},{"type":"object","title":"Tool Choice","description":"Tool selection strategy: 'auto', 'none', 'required', or a specific function","additionalProperties":true,"uniqueKey":"tool_choice.oneOf.1","typeLabel":"Tool Choice · object"},{"type":"null","title":"Tool Choice","description":"Tool selection strategy: 'auto', 'none', 'required', or a specific function","uniqueKey":"tool_choice.oneOf.2","typeLabel":"null"}],"uniqueKey":"tool_choice","typeLabel":"string | Tool Choice · object | null"}},"type":"object","required":["model","messages"],"title":"ChatCompletionRequest","uniqueKey":"","typeLabel":"ChatCompletionRequest · object"},"examples":{"Example":{"title":"Example","value":{"model":"\u003cstring>","messages":[{"role":"\u003cstring>","content":"\u003cstring>","name":"\u003cstring>","tool_calls":[{}],"tool_call_id":"\u003cstring>"}],"temperature":0.5,"top_p":123,"n":1,"stream":false,"max_tokens":2,"max_completion_tokens":2,"presence_penalty":123,"frequency_penalty":123,"stop":"\u003cstring>","user":"\u003cstring>","max_loops":1,"tools":[{}],"tool_choice":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"5075690c-deb5-4126-a51e-6eb09d3ec36a":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","title":"Id","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"created":{"type":"integer","title":"Created","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","title":"Model","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"items":{"properties":{"message":{"properties":{"role":{"type":"string","title":"Role","description":"The role of the message author (system, developer, user, assistant, tool). System and developer messages are joined, in order, into the system prompt.","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"string"},"content":{"oneOf":[{"type":"string","title":"Content","description":"The content of the message","uniqueKey":"choices.items.[INDEX].message.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"choices.items.[INDEX].message.content.oneOf.1.items.[INDEX]","typeLabel":"any"},"title":"Content","description":"The content of the message","uniqueKey":"choices.items.[INDEX].message.content.oneOf.1","typeLabel":"any[]"},{"type":"null","title":"Content","description":"The content of the message","uniqueKey":"choices.items.[INDEX].message.content.oneOf.2","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string | any[] | null"},"name":{"oneOf":[{"type":"string","title":"Name","description":"An optional name for the participant","uniqueKey":"choices.items.[INDEX].message.name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","description":"An optional name for the participant","uniqueKey":"choices.items.[INDEX].message.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.name","typeLabel":"string | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"additionalProperties":true,"type":"object","uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"Tool Calls","description":"Tool calls the assistant asked for, in OpenAI function-calling shape","uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.0","typeLabel":"Tool Calls · object[]"},{"type":"null","title":"Tool Calls","description":"Tool calls the assistant asked for, in OpenAI function-calling shape","uniqueKey":"choices.items.[INDEX].message.tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"Tool Calls · object[] | null"},"tool_call_id":{"oneOf":[{"type":"string","title":"Tool Call Id","description":"On a tool message, the id of the call this result answers","uniqueKey":"choices.items.[INDEX].message.tool_call_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tool Call Id","description":"On a tool message, the id of the call this result answers","uniqueKey":"choices.items.[INDEX].message.tool_call_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.tool_call_id","typeLabel":"string | null"}},"type":"object","required":["role"],"title":"ChatMessage","isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"ChatMessage · object"},"index":{"type":"integer","title":"Index","default":0,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"finish_reason":{"oneOf":[{"type":"string","title":"Finish Reason","default":"stop","uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"string"},{"type":"null","title":"Finish Reason","default":"stop","uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"string | null"}},"type":"object","required":["message"],"title":"ChatCompletionChoice","uniqueKey":"choices.items.[INDEX]","typeLabel":"ChatCompletionChoice · object"},"type":"array","title":"Choices","isRequired":true,"uniqueKey":"choices","typeLabel":"ChatCompletionChoice · object[]"},"usage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","title":"Total Tokens","default":0,"uniqueKey":"usage.total_tokens","typeLabel":"integer"}},"type":"object","title":"CompletionUsage","isRequired":true,"uniqueKey":"usage","typeLabel":"CompletionUsage · object"},"object":{"type":"string","title":"Object","default":"chat.completion","uniqueKey":"object","typeLabel":"string"}},"type":"object","required":["id","created","model","choices","usage"],"title":"ChatCompletionResponse","uniqueKey":"","typeLabel":"ChatCompletionResponse · object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","created":123,"model":"\u003cstring>","choices":[{"message":{"role":"\u003cstring>","content":"\u003cstring>","name":"\u003cstring>","tool_calls":[{}],"tool_call_id":"\u003cstring>"},"index":0,"finish_reason":"stop"}],"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0},"object":"chat.completion"}}},"exampleType":"generated"}},"exampleType":"generated"},"2d429f03-6a67-47ef-ad79-75b3ad62abf8":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"},"input":{"oneOf":[{"title":"Input"}],"uniqueKey":"detail.items.[INDEX].input","typeLabel":"any"},"ctx":{"type":"object","title":"Context","uniqueKey":"detail.items.[INDEX].ctx","typeLabel":"Context · object"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>","input":"\u003cunknown>","ctx":{}}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"c74d9720-0b17-4f1a-bf3f-c552299d2e85":{"url":"https://api.swarms.world","description":"Swarms Production API"}}},"originalFileLocation":"https://api.swarms.world/openapi.json"},"subdomain":"swarms","siteName":"Swarms API Documentation","title":"Swarms API Documentation - Build AI Agents \u0026 Multi-Agent Systems","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-08T04:55:55.484Z","originalFileLocation":"api-reference/openai-compatible/chat-completions-openai-compatible.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=\"description\" content=\"OpenAI-compatible chat completions endpoint. Accepts the standard OpenAI request schema and returns the standard OpenAI response schema. Supports both streaming (SSE) and non-streaming modes. Works as a drop-in replacement with the OpenAI Python and TypeScript SDKs.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Swarms API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_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=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Swarms API Documentation - Build AI Agents \u0026amp; Multi-Agent Systems\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create intelligent AI agents and multi-agent swarms with the Swarms API. Support for OpenAI, Anthropic, and Groq models with enterprise-scale orchestration.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Swarms API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.swarms.ai/bg.jpg\">\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=\"Swarms API Documentation - Build AI Agents \u0026amp; Multi-Agent Swarms\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create intelligent AI agents and multi-agent swarms with the Swarms API. Support for OpenAI, Anthropic, and Groq models.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.swarms.ai/bg.jpg\">\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=\"/mintlify-assets/_mintlify/favicons/swarms/XE756JttG-8ikCCA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Swarms API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#DC2626\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"charset\" content=\"UTF-8\">\u003cmeta data-mint-head name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\u003cmeta data-mint-head name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\">\u003cmeta data-mint-head name=\"google\" content=\"notranslate\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#DC2626\">\u003cmeta data-mint-head name=\"color-scheme\" content=\"light dark\">\u003cmeta data-mint-head name=\"format-detection\" content=\"telephone=no\">\u003cmeta data-mint-head name=\"referrer\" content=\"strict-origin-when-cross-origin\">\u003cmeta data-mint-head name=\"language\" content=\"en\">\u003cmeta data-mint-head name=\"copyright\" content=\"Copyright 2024 The Swarm Corporation\">\u003cmeta data-mint-head name=\"distribution\" content=\"global\">\u003cmeta data-mint-head name=\"coverage\" content=\"Worldwide\">\u003cmeta data-mint-head name=\"category\" content=\"Technology\">\u003cmeta data-mint-head name=\"target\" content=\"all\">\u003cmeta data-mint-head name=\"rating\" content=\"general\">\u003cmeta data-mint-head name=\"revisit-after\" content=\"3 days\">\u003cmeta data-mint-head name=\"HandheldFriendly\" content=\"True\">\u003cmeta data-mint-head name=\"MobileOptimized\" content=\"320\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-capable\" content=\"yes\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">\u003cmeta data-mint-head name=\"application-name\" content=\"Swarms API Documentation\">\u003cmeta data-mint-head name=\"msapplication-navbutton-color\" content=\"#DC2626\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"Swarms API Documentation - Build intelligent AI agents and multi-agent swarms\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@kyegomez\">\u003cmeta data-mint-head name=\"twitter:image:alt\" content=\"Swarms API Documentation - Build intelligent AI agents and multi-agent swarms\">\u003cmeta data-mint-head name=\"article:author\" content=\"The Swarm Corporation\">\u003cmeta data-mint-head name=\"article:section\" content=\"Technology\">\u003cmeta data-mint-head name=\"article:tag\" content=\"AI agents, multi-agent systems, swarm intelligence, API documentation, artificial intelligence\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/openai-compatible/chat-completions-openai-compatible.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.swarms.ai/#organization\",\"name\":\"Swarms API Documentation\",\"url\":\"https://docs.swarms.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/swarms/0uhx6ZFxLaCyzbhr/logo/light.svg?fit=max\u0026auto=format\u0026n=0uhx6ZFxLaCyzbhr\u0026q=85\u0026s=0c5b6851cc5173c655702a17160d54c5\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.swarms.ai#website\",\"name\":\"Swarms API Documentation\",\"url\":\"https://docs.swarms.ai\",\"publisher\":{\"@id\":\"https://docs.swarms.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible#webpage\",\"url\":\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible\",\"name\":\"Chat Completions (OpenAI-compatible)\",\"description\":\"OpenAI-compatible chat completions endpoint. Accepts the standard OpenAI request schema and returns the standard OpenAI response schema. Supports both streaming (SSE) and non-streaming modes. Works as a drop-in replacement with the OpenAI Python and TypeScript SDKs.\",\"dateModified\":\"2026-11-08T04:55:55.484Z\",\"isPartOf\":{\"@id\":\"https://docs.swarms.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Swarms API Documentation\",\"item\":\"https://docs.swarms.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat Completions (OpenAI-compatible)\",\"item\":\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible#apireference\",\"headline\":\"Chat Completions (OpenAI-compatible)\",\"name\":\"Chat Completions (OpenAI-compatible)\",\"description\":\"OpenAI-compatible chat completions endpoint. Accepts the standard OpenAI request schema and returns the standard OpenAI response schema. Supports both streaming (SSE) and non-streaming modes. Works as a drop-in replacement with the OpenAI Python and TypeScript SDKs.\",\"url\":\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible\",\"mainEntityOfPage\":{\"@id\":\"https://docs.swarms.ai/api-reference/openai-compatible/chat-completions-openai-compatible#webpage\"},\"image\":\"https://docs.swarms.ai/bg.jpg\",\"dateModified\":\"2026-11-08T04:55:55.484Z\",\"publisher\":{\"@id\":\"https://docs.swarms.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.swarms.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Swarms API Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Swarms API Documentation","nav":{"global":{"anchors":[{"anchor":"Get Your API Key","href":"https://swarms.world/platform/api-keys"},{"anchor":"Account Management","href":"https://swarms.world/platform/account"},{"anchor":"Discord","href":"https://discord.gg/EamjgSaEQf"},{"anchor":"Technical Support","href":"https://cal.com/swarms/swarms-technical-support?overlayCalendar=true"}]},"tabs":[{"tab":"Introduction","pages":[{"title":"Introduction","href":"/docs/introduction/overview"}]},{"tab":"Swarms API","pages":[{"title":"Swarms API","href":"/docs/documentation"}]},{"tab":"Marketplace","pages":[{"title":"Marketplace","href":"/docs/marketplace"}]},{"tab":"API Reference","groups":[{"group":"General","pages":[{"title":"API Root","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /","href":"/api-reference/general/api-root"},{"title":"Health Check","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /health","href":"/api-reference/general/health-check"}]},{"group":"Swarms","pages":[{"title":"Get Available Swarm Types","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/swarms/available","href":"/api-reference/swarms/get-available-swarm-types"},{"title":"Execute Swarm Completion","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/swarm/completions","href":"/api-reference/swarms/execute-swarm-completion"},{"title":"Execute Batch Swarm Completions","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/swarm/batch/completions","href":"/api-reference/swarms/execute-batch-swarm-completions"}]},{"group":"Account Management","pages":[{"title":"Get Premium Endpoints","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/account/premium-endpoints","href":"/api-reference/account-management/get-premium-endpoints"},{"title":"Get API Request Logs","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/account/logs","href":"/api-reference/account-management/get-api-request-logs"},{"title":"Get User Metrics Summary","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/account/metrics/summary","href":"/api-reference/account-management/get-user-metrics-summary"},{"title":"Credit Balance","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/account/credits","href":"/api-reference/account-management/credit-balance"}]},{"group":"Anthropic Compatible","pages":[{"title":"Messages (Anthropic-compatible)","description":"Anthropic Messages API format, non-streaming text only. Code written for the Anthropic SDK runs with base_url and api_key changed. Streaming, images, documents, tools, thinking, assistant prefill and any other field not listed here are rejected with a 400.","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/messages","href":"/api-reference/anthropic-compatible/messages-anthropic-compatible"}]},{"group":"OpenAI Compatible","pages":[{"title":"Chat Completions (OpenAI-compatible)","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/chat/completions","href":"/api-reference/openai-compatible/chat-completions-openai-compatible"},{"title":"Create a response (OpenAI-compatible, non-streaming)","description":"Creates a standard (non-streaming) completion response, compatible with the OpenAI response format. Use this endpoint as a drop-in replacement to create responses similar to OpenAI's chat/completions, but always returns the full response in a single payload. Requires API key authentication and is subject to rate limiting. Common use cases include chatbot interactions, assistant replies, and single-turn LLM completions.","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/responses","href":"/api-reference/openai-compatible/create-a-response-openai-compatible-non-streaming"}]},{"group":"Agents","pages":[{"title":"Execute Agent Completion","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/agent/completions","href":"/api-reference/agents/execute-agent-completion"},{"title":"Execute Batch Agent Completions","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/agent/batch/completions","href":"/api-reference/agents/execute-batch-agent-completions"},{"title":"List Agent Configurations","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/agents/list","href":"/api-reference/agents/list-agent-configurations"}]},{"group":"Reasoning Agents","pages":[{"title":"Execute Reasoning Agent Completion","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/reasoning-agent/completions","href":"/api-reference/reasoning-agents/execute-reasoning-agent-completion"},{"title":"Get Reasoning Agent Types","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/reasoning-agent/types","href":"/api-reference/reasoning-agents/get-reasoning-agent-types"}]},{"group":"Decision Models","pages":[{"title":"Execute Decision Model Completion","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/decision/completions","href":"/api-reference/decision-models/execute-decision-model-completion"},{"title":"Execute Decision Model Completion (TypeSafe API)","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/systemone","href":"/api-reference/decision-models/execute-decision-model-completion-typesafe-api"},{"title":"Get Decision Models and Prices","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/decision/models","href":"/api-reference/decision-models/get-decision-models-and-prices"}]},{"group":"Logging","pages":[{"title":"Get API Request Logs (deprecated path)","deprecated":true,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/swarm/logs","href":"/api-reference/logging/get-api-request-logs-deprecated-path"},{"title":"Get a Completion by Job ID","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/job/{job_id}","href":"/api-reference/logging/get-a-completion-by-job-id"}]},{"group":"Metrics","pages":[{"title":"Get User Metrics Summary (deprecated path)","deprecated":true,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/metrics/summary","href":"/api-reference/metrics/get-user-metrics-summary-deprecated-path"}]},{"group":"Models","pages":[{"title":"List Models (OpenAI-Compatible)","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/models","href":"/api-reference/models/list-models-openai-compatible"},{"title":"Get Available AI Models","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/models/available","href":"/api-reference/models/get-available-ai-models"},{"title":"Get Model Pricing","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/models/pricing","href":"/api-reference/models/get-model-pricing"}]},{"group":"Rate Limiting","pages":[{"title":"Get Rate Limits and Usage","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/rate/limits","href":"/api-reference/rate-limiting/get-rate-limits-and-usage"}]},{"group":"Tool Management","pages":[{"title":"Get Available API Tools","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/tools/available","href":"/api-reference/tool-management/get-available-api-tools"}]},{"group":"Batched Grid Workflow","pages":[{"title":"Execute Batched Grid Workflow","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/batched-grid-workflow/completions","href":"/api-reference/batched-grid-workflow/execute-batched-grid-workflow"}]},{"group":"Graph Workflow","pages":[{"title":"Execute Graph Workflow","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/graph-workflow/completions","href":"/api-reference/graph-workflow/execute-graph-workflow"}]},{"group":"Auto Agent Builder","pages":[{"title":"Generate Agent Configurations From a Task","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json post /v1/auto-agent-builder/completions","href":"/api-reference/auto-agent-builder/generate-agent-configurations-from-a-task"}]},{"group":"Pricing","pages":[{"title":"Get Comprehensive Pricing Details","deprecated":null,"version":null,"openapi":"https://api.swarms.world/openapi.json get /v1/usage/costs","href":"/api-reference/pricing/get-comprehensive-pricing-details"}]}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/docs/examples/examples/client-setup"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/docs/documentation/changelog"}]}]},"basePath":"","title":"Swarms API Documentation - Build AI Agents \u0026 Multi-Agent Systems","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","Page-C945cI-W.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","clsx-CR-RHrVC.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CBUH0-zX.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BmARFYNC.js"]}