{"openapi":"3.1.0","info":{"title":"Swarms API","description":"Swarms API provides scalable, secure orchestration for multi-agent systems. Access robust endpoints for managing agents and swarms, automating workflows, and monitoring execution. Requires an API key—see the [API Keys page](https://swarms.world/platform/api-keys). Refer to [Swarms API Documentation](https://docs.swarms.ai) for guides and details.","version":"1.0.0"},"servers":[{"url":"https://api.swarms.world","description":"Swarms Production API"}],"paths":{"/":{"get":{"tags":["General"],"summary":"API Root","description":"Root endpoint providing API welcome message and links to documentation and API key management.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"tags":["General"],"summary":"Health Check","description":"Health check endpoint to verify API service availability and operational status.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthOutput"}}}}}}},"/v1/swarms/available":{"get":{"tags":["Swarms"],"summary":"Get Available Swarm Types","description":"Retrieve all available swarm types supported by the Swarms API.","operationId":"check_swarm_types_v1_swarms_available_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmTypesOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/premium-endpoints":{"get":{"tags":["Account Management"],"summary":"Get Premium Endpoints","description":"Retrieve all API endpoints that require a premium subscription.","operationId":"premium_endpoints_v1_account_premium_endpoints_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PremiumEndpointsOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/swarm/completions":{"post":{"tags":["Swarms"],"summary":"Execute Swarm Completion","description":"Execute a swarm completion with the specified task. Supports both standard and streaming responses.","operationId":"run_swarm_v1_swarm_completions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmSpec"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmCompletion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages":{"post":{"tags":["Anthropic Compatible"],"summary":"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.","operationId":"messages_v1_messages_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"400":{"description":"An unsupported field or content block, named in the message, or messages that don't end with a user turn","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicErrorResponse"}}}},"402":{"description":"Not enough credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicErrorResponse"}}}},"404":{"description":"Unknown model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions":{"post":{"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":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/responses":{"post":{"tags":["OpenAI Compatible","Completions","Responses","Non-Streaming","LLM","v1"],"summary":"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.","operationId":"create_response_v1_responses_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseObject"}}}},"400":{"description":"An unsupported field or input item, named in the message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIErrorResponse"}}}},"404":{"description":"Unknown model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/completions":{"post":{"tags":["Agents"],"summary":"Execute Agent Completion","description":"Execute a single agent completion with the specified task. Supports both standard and streaming responses.","operationId":"run_agent_v1_agent_completions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCompletion"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCompletionOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/batch/completions":{"post":{"tags":["Agents","Batch Processing"],"summary":"Execute Batch Agent Completions","description":"Execute multiple agent completions concurrently using optimized thread pool execution. This is a premium-only feature.","operationId":"run_agent_batch_v1_agent_batch_completions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentCompletion"},"maxItems":50,"title":"Agent Completions"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBatchCompletionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/swarm/batch/completions":{"post":{"tags":["Swarms","Batch Processing"],"summary":"Execute Batch Swarm Completions","description":"Execute multiple swarm completions concurrently using optimized thread pool execution. This is a premium-only feature.","operationId":"run_batch_completions_v1_swarm_batch_completions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SwarmSpec"},"maxItems":50,"title":"Swarms"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SwarmBatchCompletionOutput"},"title":"Response Run Batch Completions V1 Swarm Batch Completions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reasoning-agent/completions":{"post":{"tags":["Reasoning Agents"],"summary":"Execute Reasoning Agent Completion","description":"Execute a reasoning agent with advanced cognitive capabilities for complex problem-solving tasks. This is a premium-only feature.","operationId":"run_reasoning_agent_completions_v1_reasoning_agent_completions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasoningAgentSpec"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasoningAgentCompletionOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reasoning-agent/types":{"get":{"tags":["Reasoning Agents"],"summary":"Get Reasoning Agent Types","description":"Retrieve all available reasoning agent types.","operationId":"get_reasoning_agent_types_v1_reasoning_agent_types_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasoningAgentTypesOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decision/completions":{"post":{"tags":["Decision Models"],"summary":"Execute Decision Model Completion","description":"Ask a decision model typed questions about a state and get calibrated probabilities back instead of generated text.","operationId":"run_decision_model_completions_v1_decision_completions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionModelCompletion"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionModelCompletionOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/systemone":{"post":{"tags":["Decision Models"],"summary":"Execute Decision Model Completion (TypeSafe API)","description":"Decision model completions in the TypeSafe API's exact request and response format, so the TypeSafe SDKs work with base_url set to this API. Billed like POST /v1/decision/completions; the charge is in the x-swarms-total-cost header.","operationId":"run_systemone_completions_v1_systemone_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/decision/models":{"get":{"tags":["Decision Models"],"summary":"Get Decision Models and Prices","description":"List the available decision models and their price per million input and output tokens.","operationId":"get_decision_models_v1_decision_models_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionModelsOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/swarm/logs":{"get":{"tags":["Logging","Monitoring"],"summary":"Get API Request Logs (deprecated path)","description":"Deprecated alias for /v1/account/logs, kept for backwards compatibility.","operationId":"get_logs_legacy_v1_swarm_logs_get","deprecated":true,"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"description":"Return at most this many logs, newest first (1-1000). Leave unset for the 1000 newest.","title":"Limit"},"description":"Return at most this many logs, newest first (1-1000). Leave unset for the 1000 newest."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Skip this many of the newest logs first. Advance it by limit to page back through the history; count is the total. Defaults to 0.","default":0,"title":"Offset"},"description":"Skip this many of the newest logs first. Advance it by limit to page back through the history; count is the total. Defaults to 0."},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmLogsOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/logs":{"get":{"tags":["Account Management","Logging","Monitoring"],"summary":"Get API Request Logs","description":"Retrieve all API request logs for all API keys associated with the authenticated user, excluding logs containing client IP information.","operationId":"get_logs_v1_account_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"description":"Return at most this many logs, newest first (1-1000). Leave unset for the 1000 newest.","title":"Limit"},"description":"Return at most this many logs, newest first (1-1000). Leave unset for the 1000 newest."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Skip this many of the newest logs first. Advance it by limit to page back through the history; count is the total. Defaults to 0.","default":0,"title":"Offset"},"description":"Skip this many of the newest logs first. Advance it by limit to page back through the history; count is the total. Defaults to 0."},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwarmLogsOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/job/{job_id}":{"get":{"tags":["Logging","Results","Completions","Jobs","Job Retrieval","History","Data Access"],"summary":"Get a Completion by Job ID","description":"Fetch the stored result of a past completion by the job_id its response returned, or of a past /v1/agent/batch/completions call by its batch_id. Returns 404 when no completion with that id belongs to any API key on the caller's account, and 503 when the lookup fails and can be retried.","operationId":"get_job_v1_job__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","title":"Job Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResultOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/list":{"get":{"tags":["Agents","Agent Management","Agent Configuration"],"summary":"List Agent Configurations","description":"Retrieve all unique agent configurations that the user has created or used, without task-specific details. Enables reuse of agent configurations across different tasks.","operationId":"list_agents_v1_agents_list_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentsListOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/summary":{"get":{"tags":["Metrics","Monitoring"],"summary":"Get User Metrics Summary (deprecated path)","description":"Deprecated alias for /v1/account/metrics/summary, kept for backwards compatibility.","operationId":"get_metrics_summary_legacy_v1_metrics_summary_get","deprecated":true,"parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsSummaryOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/metrics/summary":{"get":{"tags":["Account Management","Metrics","Monitoring"],"summary":"Get User Metrics Summary","description":"Retrieve a summary of the authenticated user's core usage metrics, including unique agents used, lifetime completion calls, successful completions, and recent-window completion counts.","operationId":"get_metrics_summary_v1_account_metrics_summary_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsSummaryOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models":{"get":{"tags":["Models"],"summary":"List Models (OpenAI-Compatible)","description":"List all available models in the OpenAI-compatible format. Use with any OpenAI SDK or client that discovers models via GET /v1/models.","operationId":"list_models_v1_models_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Return at most this many models. Leave unset to return every model.","title":"Limit"},"description":"Return at most this many models. Leave unset to return every model."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Skip this many models before returning any, to page through the list with limit. Defaults to 0.","default":0,"title":"Offset"},"description":"Skip this many models before returning any, to page through the list with limit. Defaults to 0."},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models/available":{"get":{"tags":["Models"],"summary":"Get Available AI Models","description":"Retrieve comprehensive information about all AI models available for use in agent and swarm configurations.","operationId":"get_available_models_v1_models_available_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Return at most this many models. Leave unset to return every model.","title":"Limit"},"description":"Return at most this many models. Leave unset to return every model."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Skip this many models before returning any, to page through the list with limit. Defaults to 0.","default":0,"title":"Offset"},"description":"Skip this many models before returning any, to page through the list with limit. Defaults to 0."},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsAvailableOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models/pricing":{"get":{"tags":["Models"],"summary":"Get Model Pricing","description":"Get what one model costs per 1M input and output tokens, including the service fee.","operationId":"get_model_pricing_v1_models_pricing_get","parameters":[{"name":"model_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"The model to price, e.g. gpt-5.4 or openrouter/moonshotai/kimi-k3.","title":"Model Name"},"description":"The model to price, e.g. gpt-5.4 or openrouter/moonshotai/kimi-k3."},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelPricingOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/rate/limits":{"get":{"tags":["Rate Limiting","Account Management"],"summary":"Get Rate Limits and Usage","description":"Retrieve current rate limit status and usage statistics for the authenticated user across multiple time windows.","operationId":"get_rate_limits_v1_rate_limits_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitsOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/available":{"get":{"tags":["Tool Management"],"summary":"Get Available API Tools","description":"Retrieve comprehensive information about all available tools and capabilities supported by the Swarms API.","operationId":"get_available_tools_v1_tools_available_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableToolsOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batched-grid-workflow/completions":{"post":{"tags":["Batched Grid Workflow"],"summary":"Execute Batched Grid Workflow","description":"Execute a batched grid workflow enabling parallel execution of multiple agents across multiple tasks in a single request. This is a premium-only feature.","operationId":"run_batched_grid_workflow_v1_batched_grid_workflow_completions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchedGridWorkflowInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchedGridWorkflowOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/graph-workflow/completions":{"post":{"tags":["Graph Workflow"],"summary":"Execute Graph Workflow","description":"Execute a graph workflow with directed agent nodes and edges. Enables complex multi-agent collaboration with parallel execution, automatic compilation, and comprehensive workflow orchestration.","operationId":"run_graph_workflow_v1_graph_workflow_completions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphWorkflowInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphWorkflowOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auto-agent-builder/completions":{"post":{"tags":["Auto Agent Builder"],"summary":"Generate Agent Configurations From a Task","description":"Generate a roster of agent configurations for a task. A single builder agent designs the team and returns ready-to-post AgentSpec entries — the generated agents are not executed by this endpoint.","operationId":"run_auto_agent_builder_v1_auto_agent_builder_completions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAgentBuilderInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoAgentBuilderOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage/costs":{"get":{"tags":["Pricing"],"summary":"Get Comprehensive Pricing Details","description":"Retrieves comprehensive pricing details for all API features including usage costs, service costs, and special pricing features.","operationId":"usage_costs_v1_usage_costs_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingDetailsOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/credits":{"get":{"tags":["Account Management","Credits"],"summary":"Credit Balance","description":"Retrieves the current API credit balance for the authenticated user.","operationId":"credit_balance_v1_account_credits_get","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalanceOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentBatchCompletionResponse":{"properties":{"batch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id","description":"The unique identifier for the agent batch completion."},"total_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Requests","description":"The total number of requests in the batch."},"results":{"anyOf":[{},{"type":"null"}],"title":"Results","description":"The outputs generated by the agent."},"execution_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Execution Time","description":"The execution time of the agent batch completion."},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"The timestamp when the agent batch completion was created."}},"type":"object","title":"AgentBatchCompletionResponse"},"AgentCompletion":{"properties":{"agent_config":{"$ref":"#/components/schemas/AgentSpec-Input","description":"The configuration of the agent to be completed."},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"The task to be completed by the agent."},"history":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{"$ref":"#/components/schemas/HistoryTurn"},"type":"array"},{"type":"null"}],"title":"History","description":"Earlier turns of the conversation. A list of {role, content} messages reaches the model as chat turns before the task when every role is user, assistant or system. A list with any other role (an agent name, developer, tool), a list sent without a task, or a dictionary reaches the model as text ahead of the task."},"img":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Img","description":"A base64 encoded image for the agent to process. Encode your image file to base64 and pass it here."},"imgs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Imgs","description":"A list of base64 encoded images for the agent to process. Encode your image files to base64 and pass them here."},"tools_enabled":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools Enabled","description":"A list of tools that the agent should use to complete its task."}},"type":"object","required":["agent_config"],"title":"AgentCompletion"},"AgentCompletionOutput":{"properties":{"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id","description":"The unique identifier for the agent completion."},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Indicates whether the agent completion was successful.","default":true},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the agent."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A description of the agent or completion."},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"The temperature setting used for the agent's response generation."},"outputs":{"anyOf":[{},{"type":"null"}],"title":"Outputs","description":"The outputs generated by the agent."},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage","description":"Usage statistics or metadata for the agent completion."},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"The timestamp when the agent completion was created."}},"type":"object","title":"AgentCompletionOutput"},"AgentSpec-Input":{"properties":{"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"The unique name assigned to the agent, which identifies its role and functionality within the swarm. Required unless marketplace_prompt_id is set."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A detailed explanation of the agent's purpose, capabilities, and any specific tasks it is designed to perform."},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"The initial instruction or context provided to the agent, guiding its behavior and responses during execution."},"marketplace_prompt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketplace Prompt Id","description":"The ID of a prompt from the Swarms marketplace to use as the system prompt. If provided, the prompt will be automatically retrieved from the marketplace."},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name","description":"The name of the AI model that the agent will utilize for processing tasks and generating outputs. For example: gpt-5.4, claude-sonnet-5, openrouter/moonshotai/kimi-k3","default":"claude-sonnet-5"},"fallback_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fallback Models","description":"An ordered list of models to try if the primary model errors: the request is retried with the next model on failure. If set while model_name is omitted, the first entry becomes the primary model. Example: ['claude-sonnet-5', 'gpt-5.4']."},"fallback_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Model Name","description":"A single fallback model to try if the primary model fails, tried after any `fallback_models`. Example: 'openrouter/deepseek/deepseek-v4.1-flash'."},"auto_generate_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Generate Prompt","description":"A flag indicating whether the agent should automatically create prompts based on the task requirements.","default":false},"max_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Tokens","description":"The maximum number of tokens that the agent is allowed to generate in its responses, limiting output length. Must be at least 1.","default":16000},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"A parameter that controls the randomness of the agent's output; lower values result in more deterministic responses. Accepted range: 0 to 2. If omitted, no temperature is sent to the model (the provider's own default applies)."},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"The designated role of the agent within the swarm, which influences its behavior and interaction with other agents.","default":"worker"},"max_loops":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Max Loops","description":"Maximum number of iterations the agent can perform for its task. Accepts an integer from 1 to 50 for a fixed count, or 'auto' to allow the system to determine the necessary number based on the task's complexity.","default":1},"tools_list_dictionary":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools List Dictionary","description":"A dictionary of tools that the agent can use to complete its task."},"selected_tools":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Tools","description":"Tools to enable for the autonomous looper when max_loops='auto'. Pass one tool name or a list of tool names to restrict which tools the agent can use, or 'all' or omit to allow all safe defaults. An unknown name returns 422. Available tools: create_plan, think, subtask_done, complete_task, respond_to_user, create_sub_agent, assign_task. Shell and file tools (run_bash, create_file, update_file, read_file, list_directory, delete_file) are not permitted and return 422."},"mcp_url":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/MCPConnection"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Mcp Url","description":"The MCP server the agent can use to complete its task. An https:// URL string for an unauthenticated server, or a connection object configuring auth and transport."},"streaming_on":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Streaming On","description":"A flag indicating whether the agent should stream its output.","default":false},"llm_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Llm Args","description":"Sampling arguments to pass to the LLM. Accepted keys: top_p, top_k, frequency_penalty, presence_penalty, stop, seed, logit_bias and response_format."},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","description":"The top_p parameter to pass to the LLM."},"dynamic_temperature_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dynamic Temperature Enabled","description":"A flag indicating whether the agent should dynamically adjust its temperature based on the task.","default":false},"mcp_config":{"anyOf":[{"$ref":"#/components/schemas/MCPConnection"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Mcp Config","description":"The MCP connection to use for the agent."},"mcp_configs":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/MCPConnection"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Mcp Configs","description":"The MCP connections to use for the agent. This is a list of MCP connections. Includes multiple MCP connections."},"mcp_urls":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/MCPConnection"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Mcp Urls","description":"Several MCP servers for the agent. Each entry is an https:// URL string for an unauthenticated server, or a connection object configuring auth and transport. Tools from every server are combined."},"tool_call_summary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tool Call Summary","description":"A parameter enabling an agent to summarize tool calls.","default":true},"reasoning_effort":{"anyOf":[{"type":"string","enum":["minimal","low","medium","high","none","xhigh","ultra","max","None"]},{"type":"null"}],"title":"Reasoning Effort","description":"How much effort the agent puts into reasoning. Accepted values, tracking the reasoning levels the installed litellm advertises: 'minimal', 'low', 'medium', 'high', 'none', 'xhigh', 'ultra', 'max', 'None'. 'max' is the top tier (deepest reasoning) and no beta header is required. At 'xhigh' and above, pair with a large max_tokens so the model has room to think and answer."},"thinking_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thinking Tokens","description":"The number of tokens to use for thinking."},"reasoning_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reasoning Enabled","description":"A parameter enabling an agent to use reasoning.","default":false},"publish_to_marketplace":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Publish To Marketplace","description":"A flag indicating whether to publish this agent to the Swarms marketplace, under the account of the API key that sent the request.","default":false},"use_cases":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Use Cases","description":"A list of use case dictionaries with 'title' and 'description' keys, shown on the marketplace listing. Optional, including when publish_to_marketplace is True."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"A list of searchable tags/keywords for the marketplace (e.g., ['finance', 'analysis'])."},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities","description":"A list of agent capabilities or features (e.g., ['trend-analysis', 'risk-assessment'])."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"The marketplace category for the agent (e.g., 'research', 'content', 'coding', 'finance', 'healthcare', 'education', 'legal')."},"is_free":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Free","description":"A flag indicating whether the agent is free to use in the marketplace.","default":true},"price_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Usd","description":"The price in USD for using this agent in the marketplace (if not free)."},"handoffs":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentSpec-Input"},"type":"array","maxItems":2000},{"type":"null"}],"title":"Handoffs","description":"A list of agent specifications that this agent can hand off tasks to. These agents will be created and passed to the agent's handoffs parameter. At most 2000 agents in total, counting the handoffs of each handoff."}},"type":"object","title":"AgentSpec"},"AgentSpec-Output":{"properties":{"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"The unique name assigned to the agent, which identifies its role and functionality within the swarm. Required unless marketplace_prompt_id is set."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A detailed explanation of the agent's purpose, capabilities, and any specific tasks it is designed to perform."},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"The initial instruction or context provided to the agent, guiding its behavior and responses during execution."},"marketplace_prompt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketplace Prompt Id","description":"The ID of a prompt from the Swarms marketplace to use as the system prompt. If provided, the prompt will be automatically retrieved from the marketplace."},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name","description":"The name of the AI model that the agent will utilize for processing tasks and generating outputs. For example: gpt-5.4, claude-sonnet-5, openrouter/moonshotai/kimi-k3","default":"claude-sonnet-5"},"fallback_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fallback Models","description":"An ordered list of models to try if the primary model errors: the request is retried with the next model on failure. If set while model_name is omitted, the first entry becomes the primary model. Example: ['claude-sonnet-5', 'gpt-5.4']."},"fallback_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Model Name","description":"A single fallback model to try if the primary model fails, tried after any `fallback_models`. Example: 'openrouter/deepseek/deepseek-v4.1-flash'."},"auto_generate_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Generate Prompt","description":"A flag indicating whether the agent should automatically create prompts based on the task requirements.","default":false},"max_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Tokens","description":"The maximum number of tokens that the agent is allowed to generate in its responses, limiting output length. Must be at least 1.","default":16000},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"A parameter that controls the randomness of the agent's output; lower values result in more deterministic responses. Accepted range: 0 to 2. If omitted, no temperature is sent to the model (the provider's own default applies)."},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"The designated role of the agent within the swarm, which influences its behavior and interaction with other agents.","default":"worker"},"max_loops":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Max Loops","description":"Maximum number of iterations the agent can perform for its task. Accepts an integer from 1 to 50 for a fixed count, or 'auto' to allow the system to determine the necessary number based on the task's complexity.","default":1},"tools_list_dictionary":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools List Dictionary","description":"A dictionary of tools that the agent can use to complete its task."},"selected_tools":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Tools","description":"Tools to enable for the autonomous looper when max_loops='auto'. Pass one tool name or a list of tool names to restrict which tools the agent can use, or 'all' or omit to allow all safe defaults. An unknown name returns 422. Available tools: create_plan, think, subtask_done, complete_task, respond_to_user, create_sub_agent, assign_task. Shell and file tools (run_bash, create_file, update_file, read_file, list_directory, delete_file) are not permitted and return 422."},"mcp_url":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/MCPConnection"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Mcp Url","description":"The MCP server the agent can use to complete its task. An https:// URL string for an unauthenticated server, or a connection object configuring auth and transport."},"streaming_on":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Streaming On","description":"A flag indicating whether the agent should stream its output.","default":false},"llm_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Llm Args","description":"Sampling arguments to pass to the LLM. Accepted keys: top_p, top_k, frequency_penalty, presence_penalty, stop, seed, logit_bias and response_format."},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","description":"The top_p parameter to pass to the LLM."},"dynamic_temperature_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dynamic Temperature Enabled","description":"A flag indicating whether the agent should dynamically adjust its temperature based on the task.","default":false},"mcp_config":{"anyOf":[{"$ref":"#/components/schemas/MCPConnection"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Mcp Config","description":"The MCP connection to use for the agent."},"mcp_configs":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/MCPConnection"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Mcp Configs","description":"The MCP connections to use for the agent. This is a list of MCP connections. Includes multiple MCP connections."},"mcp_urls":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/MCPConnection"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Mcp Urls","description":"Several MCP servers for the agent. Each entry is an https:// URL string for an unauthenticated server, or a connection object configuring auth and transport. Tools from every server are combined."},"tool_call_summary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tool Call Summary","description":"A parameter enabling an agent to summarize tool calls.","default":true},"reasoning_effort":{"anyOf":[{"type":"string","enum":["minimal","low","medium","high","none","xhigh","ultra","max","None"]},{"type":"null"}],"title":"Reasoning Effort","description":"How much effort the agent puts into reasoning. Accepted values, tracking the reasoning levels the installed litellm advertises: 'minimal', 'low', 'medium', 'high', 'none', 'xhigh', 'ultra', 'max', 'None'. 'max' is the top tier (deepest reasoning) and no beta header is required. At 'xhigh' and above, pair with a large max_tokens so the model has room to think and answer."},"thinking_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thinking Tokens","description":"The number of tokens to use for thinking."},"reasoning_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reasoning Enabled","description":"A parameter enabling an agent to use reasoning.","default":false},"publish_to_marketplace":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Publish To Marketplace","description":"A flag indicating whether to publish this agent to the Swarms marketplace, under the account of the API key that sent the request.","default":false},"use_cases":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Use Cases","description":"A list of use case dictionaries with 'title' and 'description' keys, shown on the marketplace listing. Optional, including when publish_to_marketplace is True."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"A list of searchable tags/keywords for the marketplace (e.g., ['finance', 'analysis'])."},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities","description":"A list of agent capabilities or features (e.g., ['trend-analysis', 'risk-assessment'])."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"The marketplace category for the agent (e.g., 'research', 'content', 'coding', 'finance', 'healthcare', 'education', 'legal')."},"is_free":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Free","description":"A flag indicating whether the agent is free to use in the marketplace.","default":true},"price_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Usd","description":"The price in USD for using this agent in the marketplace (if not free)."},"handoffs":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentSpec-Output"},"type":"array","maxItems":2000},{"type":"null"}],"title":"Handoffs","description":"A list of agent specifications that this agent can hand off tasks to. These agents will be created and passed to the agent's handoffs parameter. At most 2000 agents in total, counting the handoffs of each handoff."}},"type":"object","title":"AgentSpec"},"AgentsListOutput":{"properties":{"success":{"type":"boolean","title":"Success","description":"Indicates whether the agent list was retrieved successfully.","default":true},"count":{"type":"integer","title":"Count","description":"Total number of unique agent configurations."},"agents":{"items":{},"type":"array","title":"Agents","description":"List of agent configuration objects."},"timestamp":{"type":"string","title":"Timestamp","description":"ISO timestamp when the list was generated."}},"type":"object","required":["count","agents","timestamp"],"title":"AgentsListOutput"},"AnthropicError":{"properties":{"type":{"type":"string","title":"Type","description":"invalid_request_error, authentication_error, billing_error, permission_error, not_found_error, rate_limit_error or api_error"},"message":{"type":"string","title":"Message"}},"type":"object","required":["type","message"],"title":"AnthropicError"},"AnthropicErrorResponse":{"properties":{"type":{"type":"string","const":"error","title":"Type","default":"error"},"error":{"$ref":"#/components/schemas/AnthropicError"}},"type":"object","required":["error"],"title":"AnthropicErrorResponse","description":"Error body in the Anthropic shape."},"AutoAgentBuilderInput":{"properties":{"task":{"type":"string","minLength":1,"title":"Task","description":"The task the generated team should be able to handle. This is the only required field."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of this auto agent builder run."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of this auto agent builder run."},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name","description":"The model backing the builder agent itself — not the models given to the generated agents; the builder chooses those per agent. Defaults to the framework's builder default."},"max_agents":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Max Agents","description":"Upper bound on roster size. This is a ceiling, not a target — the builder prefers the smallest roster that covers the task.","default":5},"num_agents":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Num Agents","description":"Exact number of agents to generate. When set, this overrides max_agents and the builder's prefer-fewer guidance."},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Custom instructions for the builder agent. Defaults to the framework's builder system prompt."},"agent_kwargs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Kwargs","description":"Passed to the builder, but it has no effect on the response: the builder sets only agent_name, description, system_prompt and model_name, and every other field is the AgentSpec default. Set fields such as max_loops on the returned agents before running them."}},"type":"object","required":["task"],"title":"AutoAgentBuilderInput"},"AutoAgentBuilderOutput":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The job ID of the auto agent builder run."},"name":{"type":"string","title":"Name","description":"The name of the auto agent builder run."},"description":{"type":"string","title":"Description","description":"The description of the auto agent builder run."},"status":{"type":"string","title":"Status","description":"The status of the auto agent builder run."},"agents":{"items":{"$ref":"#/components/schemas/AgentSpec-Output","description":"The configuration of the agent to be completed."},"type":"array","title":"Agents","description":"The generated roster. Each entry is a complete AgentSpec that can be posted unmodified to /v1/swarm/completions or the other multi-agent endpoints."},"usage":{"$ref":"#/components/schemas/Usage","description":"The usage of the auto agent builder run."},"timestamp":{"type":"string","title":"Timestamp","description":"The timestamp of the auto agent builder run."}},"type":"object","required":["job_id","name","description","status","agents","usage","timestamp"],"title":"AutoAgentBuilderOutput"},"AvailableModel":{"properties":{"model_name":{"type":"string","title":"Model Name","description":"The model name to pass as model_name."},"input_cost_per_1m":{"type":"number","title":"Input Cost Per 1M","description":"Price per 1M input tokens (USD), including the service fee."},"output_cost_per_1m":{"type":"number","title":"Output Cost Per 1M","description":"Price per 1M output tokens (USD), including the service fee."},"price_source":{"type":"string","title":"Price Source","description":"Where the price came from: 'openrouter', 'litellm' or 'fallback'."}},"type":"object","required":["model_name","input_cost_per_1m","output_cost_per_1m","price_source"],"title":"AvailableModel","description":"One model the caller can use, with its price per 1M tokens."},"AvailableToolsOutput":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"The status of the available tools.","default":"success"},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools","description":"The list of available tools."}},"type":"object","title":"AvailableToolsOutput"},"BatchedGridWorkflowInput":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the batched grid workflow."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the batched grid workflow."},"agent_completions":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentSpec-Input","description":"The configuration of the agent to be completed."},"type":"array","maxItems":50},{"type":"null"}],"title":"Agent Completions","description":"The agent completions to be completed by the batched grid workflow."},"tasks":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Tasks","description":"The tasks to be completed by the batched grid workflow."},"max_loops":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Max Loops","description":"The maximum number of loops to be completed by the batched grid workflow. At most 50.","default":1},"imgs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Imgs","description":"Not supported. The grid runs every agent without images, so a non-empty list is rejected with 422."}},"type":"object","title":"BatchedGridWorkflowInput"},"BatchedGridWorkflowOutput":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The job ID of the batched grid workflow."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the batched grid workflow."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the batched grid workflow."},"status":{"type":"string","title":"Status","description":"\"success\" when every agent ran, \"partial\" when at least one failed. A run where every agent fails returns 502 and is not charged."},"outputs":{"title":"Outputs","description":"One entry per loop, mapping each agent name to its output, or to {\"error\": \"<ExceptionType>: <message>\"} if that agent failed."},"usage":{"$ref":"#/components/schemas/Usage","description":"The usage of the batched grid workflow."},"timestamp":{"type":"string","title":"Timestamp","description":"The timestamp of the batched grid workflow."}},"type":"object","required":["job_id","status","outputs","usage","timestamp"],"title":"BatchedGridWorkflowOutput"},"ChatCompletionChoice":{"properties":{"index":{"type":"integer","title":"Index","default":0},"message":{"$ref":"#/components/schemas/ChatMessage"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason","default":"stop"}},"type":"object","required":["message"],"title":"ChatCompletionChoice"},"ChatCompletionRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Model to use for completion"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Messages","description":"A list of messages comprising the conversation"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"Sampling temperature (0 to 2)","default":0.5},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","description":"Nucleus sampling parameter"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","description":"Number of completions to generate","default":1},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"Whether to stream partial results","default":false},"max_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Tokens","description":"Maximum tokens to generate"},"max_completion_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Completion Tokens","description":"Maximum completion tokens (takes precedence over max_tokens)"},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","description":"Presence penalty"},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","description":"Frequency penalty"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop","description":"Up to 4 sequences where the model stops generating further tokens"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"Unique identifier for the end-user"},"max_loops":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"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},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Function-calling tool definitions, in OpenAI schema"},"tool_choice":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice","description":"Tool selection strategy: 'auto', 'none', 'required', or a specific function"}},"type":"object","required":["model","messages"],"title":"ChatCompletionRequest"},"ChatCompletionResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"chat.completion"},"created":{"type":"integer","title":"Created"},"model":{"type":"string","title":"Model"},"choices":{"items":{"$ref":"#/components/schemas/ChatCompletionChoice"},"type":"array","title":"Choices"},"usage":{"$ref":"#/components/schemas/CompletionUsage"}},"type":"object","required":["id","created","model","choices","usage"],"title":"ChatCompletionResponse"},"ChatMessage":{"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."},"content":{"anyOf":[{"type":"string"},{"items":{},"type":"array"},{"type":"null"}],"title":"Content","description":"The content of the message"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"An optional name for the participant"},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"Tool calls the assistant asked for, in OpenAI function-calling shape"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id","description":"On a tool message, the id of the call this result answers"}},"type":"object","required":["role"],"title":"ChatMessage"},"ChoiceQuestion":{"properties":{"type":{"type":"string","const":"choice","title":"Type","description":"Picks one of the options in criteria."},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Instructions","description":"What the model should decide when choosing an option."},"criteria":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}]},"type":"object","title":"Criteria","description":"Option names mapped to a description of when each applies, or null to go by the name alone."}},"type":"object","required":["type","criteria"],"title":"ChoiceQuestion"},"CompletionUsage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0},"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","default":0}},"type":"object","title":"CompletionUsage"},"CreditBalanceOutput":{"properties":{"credit":{"type":"number","title":"Credit","description":"Purchased credit balance. Pays for API usage once `free_credit` is used up."},"free_credit":{"type":"number","title":"Free Credit","description":"Free credit balance. Spent before `credit` on every billed call."},"referral_credits":{"type":"number","title":"Referral Credits","description":"Referral credits balance. Shown for reference only; referral credits no longer pay for API usage."},"total_credits":{"type":"number","title":"Total Credits","description":"Spendable balance, `credit` plus `free_credit`. This is the balance checked against the $1.00 minimum on billable routes."}},"type":"object","required":["credit","free_credit","referral_credits","total_credits"],"title":"CreditBalanceOutput"},"DecisionModelCompletion":{"properties":{"state":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"State","description":"The content every question is asked about: text, a JSON object or a list."},"questions":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/ChoiceQuestion"},{"$ref":"#/components/schemas/ScoreQuestion"},{"$ref":"#/components/schemas/NoulQuestion"}],"discriminator":{"propertyName":"type","mapping":{"choice":"#/components/schemas/ChoiceQuestion","noul":"#/components/schemas/NoulQuestion","score":"#/components/schemas/ScoreQuestion"}}},"type":"object","minProperties":1,"title":"Questions","description":"Questions keyed by a name you choose. The answers come back under the same names."},"model_name":{"type":"string","title":"Model Name","description":"Decision model that answers the questions; also accepted as model. GET /v1/decision/models lists the available models and their prices.","default":"jev-latest"}},"type":"object","required":["state","questions"],"title":"DecisionModelCompletion"},"DecisionModelCompletionOutput":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"Unique identifier for this completion."},"status":{"type":"string","title":"Status","description":"Status of the request, success when completed."},"model_name":{"type":"string","title":"Model Name","description":"The decision model requested."},"model":{"type":"string","title":"Model","description":"The model version that answered, which may differ from an alias such as jev-latest."},"answers":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Answers","description":"Answers keyed by question name. A choice answer has choice, probabilities and confidence; a score answer has score, legend, probabilities and confidence; a noul answer has noul, the probability from 0 to 1."},"usage":{"$ref":"#/components/schemas/DecisionModelUsage","description":"Token usage and cost of this request."},"timestamp":{"type":"string","title":"Timestamp","description":"ISO 8601 time the completion finished."}},"type":"object","required":["job_id","status","model_name","model","answers","usage","timestamp"],"title":"DecisionModelCompletionOutput"},"DecisionModelPrice":{"properties":{"name":{"type":"string","title":"Name","description":"Model name to pass as model_name or model."},"description":{"type":"string","title":"Description","description":"The model's provider and price."},"release_date":{"type":"string","title":"Release Date","description":"Kept for TypeSafe SDK compatibility; empty because providers do not publish a release date for every model or alias.","default":""},"provider":{"type":"string","title":"Provider","description":"Provider that runs the model."},"input_cost_per_1m":{"type":"number","title":"Input Cost Per 1M","description":"Price per 1 million input tokens in USD."},"output_cost_per_1m":{"type":"number","title":"Output Cost Per 1M","description":"Price per 1 million output tokens in USD."}},"type":"object","required":["name","description","provider","input_cost_per_1m","output_cost_per_1m"],"title":"DecisionModelPrice"},"DecisionModelUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Input tokens reported by the provider."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Output tokens reported by the provider."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Input plus output tokens."},"input_cost":{"type":"number","title":"Input Cost","description":"Cost of the input tokens in USD."},"output_cost":{"type":"number","title":"Output Cost","description":"Cost of the output tokens in USD."},"total_cost":{"type":"number","title":"Total Cost","description":"Amount charged for this request in USD."}},"type":"object","required":["input_tokens","output_tokens","total_tokens","input_cost","output_cost","total_cost"],"title":"DecisionModelUsage"},"DecisionModelsOutput":{"properties":{"status":{"type":"string","title":"Status","description":"Status of the request, success when completed."},"models":{"items":{"$ref":"#/components/schemas/DecisionModelPrice"},"type":"array","title":"Models","description":"Every decision model available, with its price."}},"type":"object","required":["status","models"],"title":"DecisionModelsOutput"},"DirectorSettings":{"properties":{"agent_name":{"type":"string","title":"Agent Name"},"system_prompt":{"type":"string","title":"System Prompt"},"planning_system_prompt":{"type":"string","title":"Planning System Prompt"},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature"},"top_p":{"type":"number","title":"Top P"},"max_tokens":{"type":"integer","maximum":128000.0,"minimum":1.0,"title":"Max Tokens"}},"additionalProperties":false,"type":"object","title":"DirectorSettings"},"EdgeSpec":{"properties":{"source":{"type":"string","title":"Source","description":"The source node ID."},"target":{"type":"string","title":"Target","description":"The target node ID."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata for the edge."}},"type":"object","required":["source","target"],"title":"EdgeSpec","description":"Schema for defining an edge between nodes in the workflow graph."},"GraphWorkflowInput":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the graph workflow."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the graph workflow."},"agents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentSpec-Input","description":"The configuration of the agent to be completed."},"type":"array","maxItems":2000},{"type":"null"}],"title":"Agents","description":"List of agent specifications to be used as nodes in the workflow graph. At most 2000."},"edges":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/EdgeSpec"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Edges","description":"List of edges connecting nodes. Can be EdgeSpec objects or dictionaries with 'source' and 'target' keys. The edges must not form a cycle: a cyclic graph returns 400."},"entry_points":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entry Points","description":"List of node IDs that serve as starting points for the workflow."},"end_points":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"End Points","description":"List of node IDs that serve as ending points for the workflow."},"max_loops":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Loops","description":"The maximum number of execution loops for the workflow.","default":1},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"The task to be executed by the workflow. Required: a missing or blank task returns 400."},"img":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Img","description":"Optional https:// image URL or base64 encoded image for vision-enabled agents."},"auto_compile":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Compile","description":"Whether to automatically compile the workflow for optimization.","default":true},"verbose":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verbose","description":"Whether to enable detailed logging.","default":false}},"type":"object","title":"GraphWorkflowInput","description":"Input schema for GraphWorkflow completion requests."},"GraphWorkflowOutput":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The job ID of the graph workflow."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the graph workflow."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the graph workflow."},"status":{"type":"string","title":"Status","description":"The status of the graph workflow."},"outputs":{"title":"Outputs","description":"The outputs of the graph workflow."},"usage":{"$ref":"#/components/schemas/Usage","description":"The usage statistics of the workflow."},"timestamp":{"type":"string","title":"Timestamp","description":"The timestamp of the graph workflow execution."}},"type":"object","required":["job_id","status","outputs","usage","timestamp"],"title":"GraphWorkflowOutput","description":"Output schema for GraphWorkflow completion responses."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthOutput":{"properties":{"status":{"type":"string","title":"Status","default":"ok"}},"type":"object","title":"HealthOutput"},"HistoryTurn":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"HistoryTurn"},"IncompleteDetails":{"properties":{"reason":{"type":"string","const":"max_output_tokens","title":"Reason","description":"Why generation stopped early."}},"type":"object","required":["reason"],"title":"IncompleteDetails"},"InputTokensDetails":{"properties":{"cached_tokens":{"type":"integer","title":"Cached Tokens","description":"Always 0; prompt caching is not reported.","default":0}},"type":"object","title":"InputTokensDetails"},"JobResultOutput":{"properties":{"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id","description":"The job_id the completion response returned. Absent on /v1/agent/batch/completions results, which carry `batch_id` instead."},"batch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id","description":"The batch_id a /v1/agent/batch/completions response returned. Present only on batch results."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"The run's status, e.g. 'success'. Absent on /v1/agent/completions results, which report `success` instead."},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage","description":"Token counts and the cost charged for the run, as the original response reported them."},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"When the run finished, in ISO 8601. Absent on /v1/swarm/completions results."}},"additionalProperties":true,"type":"object","title":"JobResultOutput","description":"A past completion's stored response body, exactly as its endpoint\nreturned it. Fields beyond those below depend on that endpoint."},"MCPConnection":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"The type of connection, defaults to 'mcp'","default":"mcp"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The URL endpoint for the MCP server","default":"http://localhost:8000/mcp"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human readable name for the server, used in logs and tool routing"},"tool_configurations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Configurations","description":"Dictionary containing configuration settings for MCP tools"},"authorization_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization Token","description":"Bearer token for accessing the MCP server"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"API key for the MCP server. Sent using api_key_header/api_key_prefix."},"api_key_header":{"type":"string","title":"Api Key Header","description":"Header used to send the API key, e.g. 'Authorization' or 'X-API-Key'.","default":"Authorization"},"api_key_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Prefix","description":"Prefix prepended to the API key value. Set to None/'' for raw keys.","default":"Bearer"},"auth_type":{"anyOf":[{"type":"string","enum":["none","api_key","bearer","oauth","custom"]},{"type":"null"}],"title":"Auth Type","description":"Explicit auth mode. Inferred from the other fields when omitted."},"oauth":{"anyOf":[{"$ref":"#/components/schemas/MCPOAuthConfig"},{"type":"null"}],"description":"OAuth 2.1 configuration for this server."},"transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transport","description":"Transport protocol: 'streamable_http', 'sse', 'stdio', or 'auto'","default":"auto"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Headers to send to the MCP server"},"timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timeout","description":"Request timeout for the MCP server","default":30},"sse_read_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sse Read Timeout","description":"How long to wait for streamed events before giving up","default":300},"tool_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tool Timeout","description":"How long a single tool call may run before timing out. Separate from `timeout`, which bounds HTTP requests.","default":120},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command","description":"Executable to launch for the 'stdio' transport"},"args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Args","description":"Arguments passed to the 'stdio' command"},"env":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Env","description":"Environment variables for the 'stdio' command"}},"additionalProperties":true,"type":"object","title":"MCPConnection"},"MCPOAuthConfig":{"properties":{"grant_type":{"type":"string","enum":["authorization_code","client_credentials"],"title":"Grant Type","description":"OAuth grant to use when no static access_token is supplied.","default":"authorization_code"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id","description":"OAuth client id. Optional for authorization_code when the server supports dynamic client registration."},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret","description":"OAuth client secret. Required for client_credentials."},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"Scopes to request, e.g. ['mcp:tools', 'offline_access']."},"redirect_uri":{"type":"string","title":"Redirect Uri","description":"Loopback redirect URI used to capture the authorization code.","default":"http://127.0.0.1:8765/callback"},"client_name":{"type":"string","title":"Client Name","description":"Client name sent during dynamic client registration.","default":"Swarms Agent"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri","description":"Client homepage sent during dynamic client registration."},"authorization_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization Url","description":"Explicit authorization endpoint. Discovered automatically when omitted."},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url","description":"Explicit token endpoint. Discovered automatically when omitted."},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token","description":"Pre-obtained access token. When set, no OAuth flow is performed."},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token","description":"Pre-obtained refresh token, paired with access_token."},"token_storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Storage Path","description":"File used to cache OAuth tokens. Defaults to ~/.swarms/mcp_auth/<server>.json."},"use_token_cache":{"type":"boolean","title":"Use Token Cache","description":"Persist tokens to disk so the browser flow is only run once.","default":true},"open_browser":{"type":"boolean","title":"Open Browser","description":"Open the system browser for the authorization step. When False the URL is logged instead.","default":true},"callback_timeout":{"type":"integer","title":"Callback Timeout","description":"Seconds to wait for the user to complete the browser flow.","default":300}},"additionalProperties":true,"type":"object","title":"MCPOAuthConfig","description":"OAuth 2.1 configuration for an MCP server.\n\nThree flavours are supported:\n\n1. ``grant_type=\"authorization_code\"`` (default) — the interactive browser\n   flow described by the MCP authorization spec. PKCE and RFC 7591 dynamic\n   client registration are handled by the MCP SDK, so ``client_id`` is\n   optional. Tokens are cached on disk so the browser prompt only happens\n   once.\n2. ``grant_type=\"client_credentials\"`` — a headless machine-to-machine\n   flow. Requires ``client_id``/``client_secret``. The token endpoint is\n   discovered from the server's ``/.well-known/oauth-authorization-server``\n   metadata unless ``token_url`` is given.\n3. ``access_token=...`` — a token you already obtained elsewhere. No flow\n   is run; the token is simply sent as a bearer credential.\n\nAny string field may use ``\"env:MY_VAR\"`` or ``\"${MY_VAR}\"`` to read the\nvalue from the environment instead of hardcoding a secret."},"Message":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role","description":"Who wrote the turn"},"content":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"}],"title":"Content","description":"A string, or a list of content blocks. Only {\"type\": \"text\", \"text\": \"...\"} blocks are accepted; any other block type is rejected with a 400."}},"type":"object","required":["role","content"],"title":"Message"},"MessagesRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Model to use"},"max_tokens":{"type":"integer","minimum":1.0,"title":"Max Tokens","description":"Maximum tokens to generate"},"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Messages","description":"Alternating user and assistant turns"},"system":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"System","description":"System prompt: a string or text blocks"},"temperature":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"Sampling temperature"},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P","description":"Nucleus sampling cutoff"}},"additionalProperties":true,"type":"object","required":["model","max_tokens","messages"],"title":"MessagesRequest"},"MessagesResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique id, prefixed msg_"},"type":{"type":"string","const":"message","title":"Type","default":"message"},"role":{"type":"string","const":"assistant","title":"Role","default":"assistant"},"model":{"type":"string","title":"Model","description":"The model that answered"},"content":{"items":{"$ref":"#/components/schemas/TextBlock"},"type":"array","title":"Content","description":"Always a single text block"},"stop_reason":{"type":"string","enum":["end_turn","max_tokens"],"title":"Stop Reason","description":"end_turn when the model finished, max_tokens when it hit the max_tokens limit"},"stop_sequence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Sequence","description":"Always null; stop sequences are not supported"},"usage":{"$ref":"#/components/schemas/MessagesUsage"}},"type":"object","required":["id","model","content","stop_reason","usage"],"title":"MessagesResponse","description":"A completed message in the Anthropic Messages API shape."},"MessagesUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Tokens in the prompt, system included"},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Tokens the model generated"}},"type":"object","required":["input_tokens","output_tokens"],"title":"MessagesUsage"},"MetricsSummaryOutput":{"properties":{"success":{"type":"boolean","title":"Success","description":"Indicates whether the metrics summary was retrieved successfully.","default":true},"unique_agents":{"type":"integer","title":"Unique Agents","description":"Number of unique agent configurations the user has used."},"total_completion_calls":{"type":"integer","title":"Total Completion Calls","description":"Lifetime count of completion calls."},"successful_completions":{"type":"integer","title":"Successful Completions","description":"Lifetime count of completions with status 'success'."},"completions_last_24h":{"type":"integer","title":"Completions Last 24H","description":"Completion calls in the last 24 hours."},"completions_last_7d":{"type":"integer","title":"Completions Last 7D","description":"Completion calls in the last 7 days."},"timestamp":{"type":"string","title":"Timestamp","description":"ISO timestamp when the summary was generated."}},"type":"object","required":["unique_agents","total_completion_calls","successful_completions","completions_last_24h","completions_last_7d","timestamp"],"title":"MetricsSummaryOutput"},"ModelListResponse":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/ModelObject"},"type":"array","title":"Data"},"has_more":{"type":"boolean","title":"Has More","description":"Whether more models follow this page; raise offset to get them.","default":false}},"type":"object","required":["data"],"title":"ModelListResponse"},"ModelObject":{"properties":{"id":{"type":"string","title":"Id","description":"The model identifier"},"object":{"type":"string","title":"Object","default":"model"},"created":{"type":"integer","title":"Created","default":0},"owned_by":{"type":"string","title":"Owned By","default":"swarms"},"pricing":{"anyOf":[{"$ref":"#/components/schemas/ModelPricing"},{"type":"null"}],"description":"Price per 1M tokens, including the service fee."}},"type":"object","required":["id"],"title":"ModelObject"},"ModelPricing":{"properties":{"input_cost_per_1m":{"type":"number","title":"Input Cost Per 1M","description":"Price per 1M input tokens (USD), including the service fee."},"output_cost_per_1m":{"type":"number","title":"Output Cost Per 1M","description":"Price per 1M output tokens (USD), including the service fee."},"price_source":{"type":"string","title":"Price Source","description":"Where the price came from: 'openrouter', 'litellm' or 'fallback'."}},"type":"object","required":["input_cost_per_1m","output_cost_per_1m","price_source"],"title":"ModelPricing","description":"What a model costs per 1M tokens, service fee included."},"ModelPricingOutput":{"properties":{"status":{"type":"string","title":"Status","description":"The status of the request.","default":"success"},"model_name":{"type":"string","title":"Model Name","description":"The model that was priced."},"input_cost_per_1m":{"type":"number","title":"Input Cost Per 1M","description":"Price per 1M input tokens (USD), including the service fee."},"output_cost_per_1m":{"type":"number","title":"Output Cost Per 1M","description":"Price per 1M output tokens (USD), including the service fee."},"price_source":{"type":"string","title":"Price Source","description":"Where the price came from: 'openrouter', 'litellm' or 'fallback'."},"timestamp":{"type":"string","title":"Timestamp","description":"ISO timestamp when the price was looked up."}},"type":"object","required":["model_name","input_cost_per_1m","output_cost_per_1m","price_source","timestamp"],"title":"ModelPricingOutput","description":"Response for GET /v1/models/pricing: one model's price per 1M tokens."},"ModelsAvailableOutput":{"properties":{"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","default":true},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","description":"The number of models in this response."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"The number of models available to the caller's tier, before limit and offset."},"models":{"items":{"$ref":"#/components/schemas/AvailableModel"},"type":"array","title":"Models","description":"The models available to the caller's tier, in a stable order, with their price per 1M tokens including the service fee. Every model unless limit or offset is set."}},"type":"object","title":"ModelsAvailableOutput"},"NoulCriteria":{"properties":{"true":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"True","description":"What counts as a yes answer."},"false":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"False","description":"What counts as a no answer."}},"additionalProperties":false,"type":"object","title":"NoulCriteria"},"NoulQuestion":{"properties":{"type":{"type":"string","const":"noul","title":"Type","description":"Gives the probability that a yes/no question or statement is true."},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Instructions","description":"The yes/no question or statement to evaluate."},"criteria":{"anyOf":[{"$ref":"#/components/schemas/NoulCriteria"},{"type":"null"}],"description":"What counts as a yes and as a no answer."}},"type":"object","required":["type"],"title":"NoulQuestion"},"OpenAIError":{"properties":{"message":{"type":"string","title":"Message"},"type":{"type":"string","title":"Type","description":"invalid_request_error, or server_error."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"model_not_found for an unknown model."},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param"}},"type":"object","required":["message","type"],"title":"OpenAIError"},"OpenAIErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/OpenAIError"}},"type":"object","required":["error"],"title":"OpenAIErrorResponse","description":"Error body in the OpenAI shape."},"OutputTokensDetails":{"properties":{"reasoning_tokens":{"type":"integer","title":"Reasoning Tokens","description":"Always 0; reasoning tokens are not reported.","default":0}},"type":"object","title":"OutputTokensDetails"},"PremiumEndpointInfo":{"properties":{"route":{"type":"string","title":"Route","description":"The API route path that requires a premium subscription."},"name":{"type":"string","title":"Name","description":"Human-readable feature name for the endpoint."},"description":{"type":"string","title":"Description","description":"What the endpoint allows a premium subscriber to do."}},"type":"object","required":["route","name","description"],"title":"PremiumEndpointInfo","description":"Metadata for a single premium-only API endpoint.\n\nAttributes:\n    route (str): The API route path that requires a premium subscription.\n    name (str): Human-readable feature name for the endpoint.\n    description (str): What the endpoint allows a premium subscriber to do."},"PremiumEndpointsOutput":{"properties":{"status":{"type":"boolean","title":"Status","description":"Indicates whether fetching premium endpoints was successful.","default":true},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"The ISO formatted timestamp when this response was generated."},"total":{"type":"integer","title":"Total","description":"Number of premium endpoints."},"premium_endpoints":{"items":{"$ref":"#/components/schemas/PremiumEndpointInfo"},"type":"array","title":"Premium Endpoints","description":"Route, name and description for every premium-only endpoint."},"upgrade_url":{"type":"string","title":"Upgrade Url","description":"Where to upgrade to a premium subscription.","default":"https://cloud.swarms.world/settings"}},"type":"object","required":["total","premium_endpoints"],"title":"PremiumEndpointsOutput","description":"Response model listing every endpoint that requires a premium subscription.\n\nAttributes:\n    status (bool): Indicates success of the operation.\n    timestamp (str): The ISO formatted timestamp of the response.\n    total (int): Number of premium endpoints.\n    premium_endpoints (List[PremiumEndpointInfo]): Route, name and description\n        for every premium-only endpoint.\n    upgrade_url (str): Where to upgrade to a premium subscription."},"PricingDetailsOutput":{"properties":{"usage_pricing":{"$ref":"#/components/schemas/UsagePricingModel","description":"Usage pricing for all API operations including token costs, agent costs, search and special pricing features."},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"ISO timestamp when the pricing information was retrieved."}},"type":"object","required":["usage_pricing"],"title":"PricingDetailsOutput","description":"Comprehensive pricing details for all API features.\nIncludes usage costs for all API operations and additional service costs."},"RateLimitLimits":{"properties":{"maximum_requests_per_minute":{"type":"integer","title":"Maximum Requests Per Minute","description":"The maximum number of requests allowed per minute."},"maximum_requests_per_hour":{"type":"integer","title":"Maximum Requests Per Hour","description":"The maximum number of requests allowed per hour."},"maximum_requests_per_day":{"type":"integer","title":"Maximum Requests Per Day","description":"The maximum number of requests allowed per day."},"tokens_per_agent":{"type":"integer","title":"Tokens Per Agent","description":"The maximum number of tokens allowed per agent."}},"type":"object","required":["maximum_requests_per_minute","maximum_requests_per_hour","maximum_requests_per_day","tokens_per_agent"],"title":"RateLimitLimits"},"RateLimitWindow":{"properties":{"count":{"type":"integer","title":"Count","description":"The number of requests made in this time window."},"limit":{"type":"integer","title":"Limit","description":"The maximum number of requests allowed in this time window."},"exceeded":{"type":"boolean","title":"Exceeded","description":"Whether the rate limit has been exceeded for this time window."},"remaining":{"type":"integer","title":"Remaining","description":"The number of requests remaining before hitting the limit."},"reset_time":{"type":"string","title":"Reset Time","description":"ISO timestamp when the rate limit will reset."}},"type":"object","required":["count","limit","exceeded","remaining","reset_time"],"title":"RateLimitWindow"},"RateLimitsInfo":{"properties":{"minute":{"$ref":"#/components/schemas/RateLimitWindow","description":"Rate limit information for the last minute."},"hour":{"$ref":"#/components/schemas/RateLimitWindow","description":"Rate limit information for the last hour."},"day":{"$ref":"#/components/schemas/RateLimitWindow","description":"Rate limit information for the last day."}},"type":"object","required":["minute","hour","day"],"title":"RateLimitsInfo"},"RateLimitsOutput":{"properties":{"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","description":"Indicates whether the rate limits request was successful.","default":true},"rate_limits":{"anyOf":[{"$ref":"#/components/schemas/RateLimitsInfo"},{"type":"null"}],"description":"Current rate limit usage information for different time windows."},"limits":{"anyOf":[{"$ref":"#/components/schemas/RateLimitLimits"},{"type":"null"}],"description":"The configured rate limits based on the user's subscription tier."},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier","description":"The user's current subscription tier (free or premium)."},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"ISO timestamp when the rate limits information was retrieved."}},"type":"object","required":["rate_limits","limits","tier","timestamp"],"title":"RateLimitsOutput"},"ReasoningAgentCompletionOutput":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"Unique identifier for the reasoning agent run."},"status":{"type":"string","title":"Status","description":"Status of the reasoning agent run.","default":"success"},"outputs":{"title":"Outputs","description":"The output generated by the reasoning agent. Shape varies by reasoning type."},"timestamp":{"type":"string","title":"Timestamp","description":"ISO-formatted timestamp of when the run was executed."},"agent_name":{"type":"string","title":"Agent Name","description":"Name of the agent."},"agent_type":{"type":"string","title":"Agent Type","description":"Type of the agent (swarm type)."},"agent_id":{"type":"string","title":"Agent Id","description":"Unique identifier for the agent instance."},"usage":{"additionalProperties":true,"type":"object","title":"Usage","description":"Usage statistics: input, output and total tokens plus the run's total_cost (a float, so this cannot be Dict[str, int])."}},"type":"object","required":["job_id","outputs","timestamp","agent_name","agent_type","agent_id","usage"],"title":"ReasoningAgentCompletionOutput"},"ReasoningAgentSpec":{"properties":{"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"The unique name assigned to the reasoning agent.","default":"reasoning-agent"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A detailed explanation of the reasoning agent's purpose and capabilities.","default":"A reasoning agent that can answer questions and help with tasks."},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name","description":"The name of the AI model that the reasoning agent will utilize.","default":"claude-sonnet-5"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"The initial instruction or context provided to the reasoning agent."},"max_loops":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Max Loops","description":"The maximum number of times the reasoning agent is allowed to repeat its task. At most 50.","default":1},"swarm_type":{"type":"string","enum":["AgentJudge","ReflexionAgent","self-consistency","consistency-agent"],"title":"Swarm Type","description":"The type of reasoning agent to run: AgentJudge, ReflexionAgent, self-consistency or consistency-agent.","default":"self-consistency"},"num_samples":{"type":"integer","maximum":2000.0,"minimum":1.0,"title":"Num Samples","description":"How many independent answers self-consistency and consistency-agent generate before aggregating; each one sends the prompt again and is billed for it. Between 1 and 2000.","default":1},"memory_capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memory Capacity","description":"The memory capacity for a ReflexionAgent."},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"The task to be completed by the reasoning agent."}},"type":"object","title":"ReasoningAgentSpec"},"ReasoningAgentTypesOutput":{"properties":{"status":{"type":"string","title":"Status","description":"Status of the request.","default":"success"},"agent_types":{"items":{"type":"string"},"type":"array","title":"Agent Types","description":"List of available reasoning agent type identifiers."}},"type":"object","required":["agent_types"],"title":"ReasoningAgentTypesOutput"},"ResponseObject":{"properties":{"id":{"type":"string","title":"Id","description":"Response identifier, resp_ prefixed."},"object":{"type":"string","const":"response","title":"Object","default":"response"},"created_at":{"type":"integer","title":"Created At","description":"Unix time the response was created."},"model":{"type":"string","title":"Model","description":"The model that answered."},"status":{"type":"string","enum":["completed","incomplete"],"title":"Status","description":"incomplete when max_output_tokens cut the answer short."},"incomplete_details":{"anyOf":[{"$ref":"#/components/schemas/IncompleteDetails"},{"type":"null"}],"description":"Set only when status is incomplete."},"error":{"type":"null","title":"Error","description":"Always null; failures are HTTP errors."},"output":{"items":{"$ref":"#/components/schemas/ResponseOutputMessage"},"type":"array","title":"Output","description":"One assistant message."},"usage":{"$ref":"#/components/schemas/ResponseUsage"}},"type":"object","required":["id","created_at","model","status","output","usage"],"title":"ResponseObject","description":"A completed or incomplete response, in the OpenAI Responses API shape."},"ResponseOutputMessage":{"properties":{"type":{"type":"string","const":"message","title":"Type","default":"message"},"id":{"type":"string","title":"Id","description":"Message identifier, msg_ prefixed."},"role":{"type":"string","const":"assistant","title":"Role","default":"assistant"},"status":{"type":"string","enum":["completed","incomplete"],"title":"Status","description":"Same as the response status."},"content":{"items":{"$ref":"#/components/schemas/ResponseOutputText"},"type":"array","title":"Content","description":"One output_text part."}},"type":"object","required":["id","status","content"],"title":"ResponseOutputMessage"},"ResponseOutputText":{"properties":{"type":{"type":"string","const":"output_text","title":"Type","default":"output_text"},"text":{"type":"string","title":"Text","description":"The generated text."},"annotations":{"items":{},"type":"array","title":"Annotations","description":"Always empty."}},"type":"object","required":["text"],"title":"ResponseOutputText"},"ResponseRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Model to use. See GET /v1/models/available for the models you can use."},"input":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"}],"title":"Input","description":"The user's text, or a list of message items with role user, assistant, system or developer. Message content is a string or a list of input_text and output_text parts. At least one user message is required; other item types and image or file parts return 400."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"System prompt. Joined with any system or developer messages in input, in that order."},"max_output_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Output Tokens","description":"Maximum number of tokens to generate. When the limit is reached, status is incomplete with reason max_output_tokens."},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"Sampling temperature, 0 to 2. Omitted by default so the model's own default applies."},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","description":"Nucleus sampling cutoff."}},"additionalProperties":true,"type":"object","required":["model","input"],"title":"ResponseRequest","description":"Request body for POST /v1/responses. Any other field set to a non-empty value, such as stream, tools or previous_response_id, returns 400 until it is supported."},"ResponseUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Prompt tokens billed."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Generated tokens billed."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"input plus output."},"input_tokens_details":{"$ref":"#/components/schemas/InputTokensDetails"},"output_tokens_details":{"$ref":"#/components/schemas/OutputTokensDetails"}},"type":"object","required":["input_tokens","output_tokens","total_tokens","input_tokens_details","output_tokens_details"],"title":"ResponseUsage"},"ScoreQuestion":{"properties":{"type":{"type":"string","const":"score","title":"Type","description":"Rates the state against the levels in criteria."},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Instructions","description":"What the model should rate."},"criteria":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}]},"type":"array","minItems":1,"title":"Criteria","description":"Level descriptions ordered from lowest to highest. Each level's position is its score, starting at 0."}},"type":"object","required":["type","criteria"],"title":"ScoreQuestion"},"SwarmBatchCompletionOutput":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"The execution status of the swarm ('success' or 'error')."},"swarm_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swarm Name","description":"The name of the swarm."},"result":{"anyOf":[{},{"type":"null"}],"title":"Result","description":"The result of the swarm execution (present on success)."},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage","description":"Resource usage statistics for the swarm (present on success)."},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"Error details for the swarm (present on error)."}},"type":"object","title":"SwarmBatchCompletionOutput","description":"A single swarm's result within a batch swarm completion response.\n\nEach element mirrors the per-swarm dict produced by the batch processor:\na success entry (status/swarm_name/result/usage) or an error entry\n(status/swarm_name/detail). Nested payloads are kept permissive (Any)\nbecause swarm outputs vary by swarm type."},"SwarmCompletion":{"properties":{"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id","description":"The unique identifier for the swarm completion."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"The status of the swarm completion."},"swarm_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swarm Name","description":"The name of the swarm."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the swarm."},"swarm_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Swarm Type","description":"The type of the swarm."},"output":{"anyOf":[{},{"type":"null"}],"title":"Output","description":"The output of the swarm."},"number_of_agents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Agents","description":"The number of agents in the swarm."},"execution_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Execution Time","description":"The execution time of the swarm."},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage","description":"The usage of the swarm."},"tasks":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tasks","description":"The batch of tasks the request carried, echoed back so a caller can match results to what it sent. null for a single-task run."},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Messages","description":"The messages the request carried, echoed back. null when the request did not supply any."}},"type":"object","required":["job_id","status","swarm_name","description","swarm_type","output","number_of_agents","execution_time","usage"],"title":"SwarmCompletion"},"SwarmLogsOutput":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","description":"The total number of matching logs across every API key on the account, not the number in logs. Page through them with limit and offset."},"logs":{"anyOf":[{},{"type":"null"}],"title":"Logs","description":"The newest logs first: at most limit of them (1000 when unset), after skipping offset."},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","title":"SwarmLogsOutput"},"SwarmSpec":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name","description":"The name of the swarm, which serves as an identifier for the group of agents and their collective task."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A comprehensive description of the swarm's objectives, capabilities, and intended outcomes."},"agents":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentSpec-Input","description":"The configuration of the agent to be completed."},"type":"array","maxItems":2000},{"type":"null"}],"title":"Agents","description":"A list of agents or specifications that define the agents participating in the swarm. At most 2000. GroupChat needs at least 2, and DebateWithJudge exactly 3 in the order pro, con, judge."},"max_loops":{"anyOf":[{"type":"integer","maximum":50.0},{"type":"null"}],"title":"Max Loops","description":"The maximum number of execution loops allowed for the swarm, enabling repeated processing if needed. At most 50.","default":1},"swarm_type":{"anyOf":[{"type":"string","enum":["AgentRearrange","MixtureOfAgents","SequentialWorkflow","ConcurrentWorkflow","GroupChat","MultiAgentRouter","HierarchicalSwarm","MajorityVoting","CouncilAsAJudge","HeavySwarm","LLMCouncil","DebateWithJudge","RoundRobin","PlannerWorkerSwarm"]},{"type":"null"}],"title":"Swarm Type","description":"The classification of the swarm, indicating its operational style and methodology."},"rearrange_flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rearrange Flow","description":"Required for AgentRearrange: agent names joined by '->' for sequential steps and ',' for concurrent ones. Every name must be the name of one of the agents."},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"The specific task or objective that the swarm is designed to accomplish."},"img":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Img","description":"An optional https:// image URL or base64 encoded image that may be associated with the swarm's task or representation."},"tasks":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tasks","description":"A list of tasks that the swarm should complete."},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Messages","description":"A list of messages that the swarm should complete."},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"A flag indicating whether the swarm should stream its output.","default":false},"heavy_swarm_question_agent_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Heavy Swarm Question Agent Model Name","description":"The model name to use for the question agent in the heavy swarm.","default":"gpt-5.4"},"heavy_swarm_worker_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Heavy Swarm Worker Model Name","description":"The model name to use for the worker agent in the heavy swarm.","default":"claude-sonnet-5"},"heavy_swarm_variant":{"anyOf":[{"type":"string","enum":["default","medium","heavy"]},{"type":"null"}],"title":"Heavy Swarm Variant","description":"For HeavySwarm: which agent variant to run. One of 'default', 'medium', or 'heavy'.","default":"default"},"council_judge_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Council Judge Model Name","description":"For CouncilAsAJudge: the model the evaluating judge agents use. The aggregator that writes the final ruling keeps its own default model, gpt-5.4.","default":"gpt-5.4"},"chairman_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chairman Model","description":"For LLMCouncil: the model name used by the chairman that synthesizes the council's responses.","default":"gpt-5.1"},"multi_agent_collab_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Multi Agent Collab Prompt","description":"Inject the multi-agent collaboration prompt so agents coordinate with one another. Set False to disable.","default":true},"heavy_swarm_max_loops":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Heavy Swarm Max Loops","description":"For HeavySwarm: how many times the whole pipeline runs (question generation, the workers, then synthesis). It is not a per-agent loop limit.","default":1},"list_all_agents":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"List All Agents","description":"Whether to list all agents and their descriptions to one another so each agent is aware of the others.","default":false},"director_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Director Model Name","description":"The model name to use for the director/overseer agent (if any). For HierarchicalSwarm, this is the model name of the director.","default":"gpt-5.4"},"director_settings":{"anyOf":[{"$ref":"#/components/schemas/DirectorSettings"},{"type":"null"}],"description":"Optional settings for the director agent. For HierarchicalSwarm, this configures the director. Accepts only agent_name, system_prompt, planning_system_prompt, temperature (0 to 2), top_p and max_tokens (1 to 128000). Any other key returns 422. temperature and top_p reach the director's model only when set here; otherwise the model's own default applies."}},"type":"object","title":"SwarmSpec"},"SwarmTypeMetadata":{"properties":{"swarm_type":{"type":"string","title":"Swarm Type","description":"The identifier to pass in the `swarm_type` field of a swarm request."},"name":{"type":"string","title":"Name","description":"Human-readable display name for the architecture."},"description":{"type":"string","title":"Description","description":"What the architecture does and how it orchestrates its agents."},"category":{"type":"string","title":"Category","description":"High-level grouping, e.g. \"workflow\", \"collaboration\", \"routing\", \"judgment\" or \"auto\"."},"best_for":{"items":{"type":"string"},"type":"array","title":"Best For","description":"Representative use cases and workflow types the architecture is best suited for."},"parameters":{"items":{"type":"string"},"type":"array","title":"Parameters","description":"Swarm-type specific SwarmSpec fields that tune this architecture, beyond the common ones (agents, task, max_loops)."},"documentation_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentation Url","description":"Link to the architecture's documentation page, if one exists."}},"type":"object","required":["swarm_type","name","description","category"],"title":"SwarmTypeMetadata","description":"Descriptive metadata for a single swarm type (multi-agent architecture).\n\nAttributes:\n    swarm_type (str): The identifier to pass in the swarm_type field of a swarm request.\n    name (str): Human-readable display name for the architecture.\n    description (str): What the architecture does and how it orchestrates its agents.\n    category (str): High-level grouping, e.g. \"workflow\", \"collaboration\", \"routing\", \"judgment\" or \"auto\".\n    best_for (List[str]): Representative use cases and workflow types the architecture suits.\n    parameters (List[str]): Swarm-type specific SwarmSpec fields that tune this architecture,\n        beyond the common ones (agents, task, max_loops).\n    documentation_url (Optional[str]): Link to the architecture's documentation page, if one exists."},"SwarmTypesOutput":{"properties":{"status":{"type":"boolean","title":"Status","description":"Indicates whether fetching swarm types was successful.","default":true},"timestamp":{"type":"string","title":"Timestamp","description":"The ISO formatted timestamp when this response was generated."},"swarm_types":{"items":{"type":"string"},"type":"array","title":"Swarm Types","description":"A list of supported swarm type names.","default":["AgentRearrange","MixtureOfAgents","SequentialWorkflow","ConcurrentWorkflow","GroupChat","MultiAgentRouter","HierarchicalSwarm","MajorityVoting","CouncilAsAJudge","HeavySwarm","LLMCouncil","DebateWithJudge","RoundRobin","PlannerWorkerSwarm"]},"swarm_types_metadata":{"items":{"$ref":"#/components/schemas/SwarmTypeMetadata"},"type":"array","title":"Swarm Types Metadata","description":"Rich metadata for every swarm type: description, category, best-for use cases, tuning parameters and documentation link."}},"type":"object","title":"SwarmTypesOutput","description":"Response model for supported swarm types.\n\nAttributes:\n    status (bool): Indicates success of the operation.\n    timestamp (str): The ISO formatted timestamp of the response.\n    swarm_types (List[str]): A list of available swarm type names.\n    swarm_types_metadata (List[SwarmTypeMetadata]): Rich metadata for every swarm\n        type: description, category, best-for use cases, tuning parameters and docs link."},"SystemOneOutput":{"properties":{"model":{"type":"string","title":"Model","description":"The model version that answered, which may differ from an alias such as jev-latest."},"answers":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Answers","description":"Answers keyed by question name. A choice answer has choice, probabilities and confidence; a score answer has score, legend, probabilities and confidence; a noul answer has noul, the probability from 0 to 1."},"usage":{"$ref":"#/components/schemas/SystemOneUsage","description":"Token counts for this request. The amount charged is in the x-swarms-total-cost header."}},"type":"object","required":["model","answers","usage"],"title":"SystemOneOutput"},"SystemOneRequest":{"properties":{"state":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"State","description":"The content every question is asked about: text, a JSON object or a list."},"questions":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/ChoiceQuestion"},{"$ref":"#/components/schemas/ScoreQuestion"},{"$ref":"#/components/schemas/NoulQuestion"}],"discriminator":{"propertyName":"type","mapping":{"choice":"#/components/schemas/ChoiceQuestion","noul":"#/components/schemas/NoulQuestion","score":"#/components/schemas/ScoreQuestion"}}},"type":"object","minProperties":1,"title":"Questions","description":"Questions keyed by a name you choose. The answers come back under the same names."},"model":{"type":"string","title":"Model","description":"Decision model that answers the questions, as in the TypeSafe API. GET /v1/decision/models lists the available models and their prices."}},"type":"object","required":["state","questions","model"],"title":"SystemOneRequest"},"SystemOneUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Input tokens reported by the provider."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Output tokens reported by the provider."}},"type":"object","required":["input_tokens","output_tokens"],"title":"SystemOneUsage"},"TextBlock":{"properties":{"type":{"type":"string","const":"text","title":"Type","default":"text"},"text":{"type":"string","title":"Text","description":"The generated text"}},"type":"object","required":["text"],"title":"TextBlock"},"Usage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"The number of input tokens."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"The number of output tokens."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"The total number of tokens."},"total_cost":{"type":"number","title":"Total Cost","description":"The cost in credits for the tokens."},"cost_per_agent":{"type":"number","title":"Cost Per Agent","description":"The cost in credits for the agents.","default":0.01},"flash_sale_applied":{"type":"boolean","title":"Flash Sale Applied","description":"Whether the tokens were billed at the flash sale price.","default":false}},"type":"object","required":["input_tokens","output_tokens","total_tokens","total_cost"],"title":"Usage","description":"Usage statistics for the workflow execution."},"UsagePricingModel":{"properties":{"fallback_input_cost_per_1m":{"type":"number","title":"Fallback Input Cost Per 1M","description":"Cost per 1 million input tokens (USD, before the service fee) for a model with no OpenRouter or LiteLLM price, or when OpenRouter cannot be reached.","default":6.5},"fallback_output_cost_per_1m":{"type":"number","title":"Fallback Output Cost Per 1M","description":"Cost per 1 million output tokens (USD, before the service fee) for a model with no OpenRouter or LiteLLM price, or when OpenRouter cannot be reached.","default":18.5},"swarm_completions_agent_cost":{"type":"number","title":"Swarm Completions Agent Cost","description":"Cost per agent in swarm completions (USD); agents on OpenRouter free models are not charged it.","default":0.01},"agent_completions_img_cost":{"type":"number","title":"Agent Completions Img Cost","description":"Cost per image for agent completions (USD).","default":0.25},"search_cost":{"type":"number","title":"Search Cost","description":"Cost per search operation in dollars (USD).","default":0.04},"night_time_discount":{"type":"number","title":"Night Time Discount","description":"Discount multiplier for night time usage (0.50 = 50% discount), for paid plans only.","default":0.5},"flash_sale_active":{"type":"boolean","title":"Flash Sale Active","description":"A flag indicating whether the flash sale is active.","default":false},"flash_sale_discount":{"type":"number","title":"Flash Sale Discount","description":"Share of the provider token price charged during a flash sale (0.50 = 50% off), with the full service fee added on top. The night time discount applies instead when it is cheaper.","default":0.5}},"type":"object","title":"UsagePricingModel","description":"Unified pricing model for all API usage costs.\nCaptures input and output token costs, agent costs, and additional fees for different cost structures."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}