{"openapi":"3.1.0","info":{"title":"Swarms API","description":"The Swarms API delivers a high-performance, enterprise-grade platform for orchestrating advanced multi-agent systems. Built on a Rust-powered agent runtime, it enables scalable, robust, and secure agent collaboration, supporting complex workflows and dynamic agent communication. The API exposes a comprehensive suite of RESTful endpoints for the management, execution, and monitoring of agents, swarms, and related resources, empowering organizations to automate and optimize mission-critical processes. To access the API, obtain your API key from the [Swarms API Keys page](https://swarms.world/platform/api-keys). For detailed integration guides, best practices, and reference material, consult the [Swarms API Documentation](https://docs.swarms.ai).","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/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/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/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"},"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"},"title":"Swarms"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"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":{"type":"object","additionalProperties":true,"title":"Response Run Reasoning Agent Completions V1 Reasoning Agent Completions Post"}}}},"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 and their capabilities.","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":{"type":"object","additionalProperties":true,"title":"Response Get Reasoning Agent Types V1 Reasoning Agent Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/swarm/logs":{"get":{"tags":["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_swarm_logs_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/SwarmLogsOutput"}}}},"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":{"type":"object","additionalProperties":true,"title":"Response List Agents V1 Agents List Get"}}}},"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":"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/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/auto-swarm-builder/completions":{"post":{"tags":["Auto Swarm Builder"],"summary":"Auto-Generate Agent Swarm","description":"Generate and orchestrate agent swarms autonomously using AI-powered swarm composition and task decomposition.","operationId":"auto_swarm_builder_v1_auto_swarm_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/AutoSwarmBuilderSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoSwarmBuilderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/advanced-research/completions":{"post":{"tags":["Advanced Research"],"summary":"Execute Advanced Research Session","description":"Execute comprehensive research sessions with multi-source data collection, analysis, and synthesis capabilities.","operationId":"run_advanced_research_v1_advanced_research_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/AdvancedResearchInputSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvancedResearchOutputSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/advanced-research/batch/completions":{"post":{"tags":["Advanced Research"],"summary":"Execute Batch of Research Sessions","description":"Execute multiple advanced research sessions concurrently with independent configurations for high-throughput research workflows.","operationId":"run_advanced_research_batch_v1_advanced_research_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":{"$ref":"#/components/schemas/BatchedAdvancedResearchInputSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdvancedResearchOutputSchema"},"title":"Response Run Advanced Research Batch V1 Advanced Research Batch Completions Post"}}}},"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/auto-swarm-builder/execution-types":{"get":{"tags":["Auto Swarm Builder"],"summary":"Get Auto Swarm Builder Execution Types","description":"Retrieve all available execution types and return formats for the Auto Swarm Builder endpoint.","operationId":"get_auto_swarm_builder_return_types_v1_auto_swarm_builder_execution_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":{"type":"array","items":{"type":"string"},"title":"Response Get Auto Swarm Builder Return Types V1 Auto Swarm Builder Execution Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/marketplace/agents":{"post":{"tags":["Marketplace"],"summary":"Get Marketplace Agents","description":"Retrieve free agents from the marketplace.","operationId":"get_marketplace_agents_v1_marketplace_agents_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/GetMarketplacePromptsInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplacePromptsResponse"}}}},"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/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":{"AdvancedResearchConfig":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the advanced research session","default":"Advanced Research"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the advanced research session","default":"Advanced Research"},"worker_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Model Name","description":"Model name for worker agents","default":"gpt-4.1"},"director_agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Director Agent Name","description":"Name of the director agent","default":"Director-Agent"},"director_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Director Model Name","description":"Model name for the director agent","default":"gpt-4.1"},"director_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Director Max Tokens","description":"Maximum tokens for the director agent's output","default":8000},"max_loops":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Loops","description":"Number of research loops to run","default":1},"director_max_loops":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Director Max Loops","description":"Maximum loops for the director agent","default":1},"exa_search_num_results":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exa Search Num Results","description":"Number of results to return from the Exa search tool","default":2},"exa_search_max_characters":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exa Search Max Characters","description":"Maximum characters to return from the Exa search tool","default":100}},"type":"object","title":"AdvancedResearchConfig"},"AdvancedResearchInputSchema":{"properties":{"config":{"anyOf":[{"$ref":"#/components/schemas/AdvancedResearchConfig"},{"type":"null"}],"description":"The configuration for the advanced research"},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"The task to be completed"},"img":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Img","description":"The image to be used for the advanced research"}},"type":"object","required":["config","task"],"title":"AdvancedResearchInputSchema"},"AdvancedResearchOutputSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The id of the advanced research session"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the advanced research session"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the advanced research session"},"outputs":{"anyOf":[{},{"type":"null"}],"title":"Outputs","description":"The outputs of the advanced research session"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"The timestamp of the advanced research session"},"sources":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sources","description":"The number of sources used for the advanced research session"},"characters_per_source":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Characters Per Source","description":"The number of characters per source used for the advanced research session"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage","description":"The usage of the advanced research session"}},"type":"object","required":["id","name","description","outputs","timestamp","sources","characters_per_source","usage"],"title":"AdvancedResearchOutputSchema"},"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","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":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"History","description":"The history of the agent's previous tasks and responses. Can be either a dictionary or a list of message objects."},"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":{"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."},"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-4o, gpt-4.1, openai/o3-mini","default":"gpt-4.1"},"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"},{"type":"null"}],"title":"Max Tokens","description":"The maximum number of tokens that the agent is allowed to generate in its responses, limiting output length.","default":8192},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"A parameter that controls the randomness of the agent's output; lower values result in more deterministic responses. 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"},{"type":"null"}],"title":"Max Loops","description":"Maximum number of iterations the agent can perform for its task. Accepts an integer 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 a list of tool names to restrict which tools the agent can use, or omit to allow all safe defaults. Available tools: create_plan, think, subtask_done, complete_task, respond_to_user, create_file, update_file, read_file, list_directory, delete_file, create_sub_agent, assign_task. Note: run_bash is not permitted."},"mcp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Url","description":"The URL of the MCP server that the agent can use to complete its task."},"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":"Additional arguments to pass to the LLM such as top_p, frequency_penalty, presence_penalty, etc."},"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":true},"mcp_config":{"anyOf":[{"$ref":"#/components/schemas/MCPConnection"},{"type":"null"}],"description":"The MCP connection to use for the agent."},"mcp_configs":{"anyOf":[{"$ref":"#/components/schemas/MultipleMCPConnections"},{"type":"null"}],"description":"The MCP connections to use for the agent. This is a list of MCP connections. Includes multiple MCP connections."},"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"},{"type":"null"}],"title":"Reasoning Effort","description":"The effort to put into reasoning. Options: 'low', 'medium', 'high'.","default":"low"},"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.","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. Required 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"},"type":"array"},{"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."}},"type":"object","title":"AgentSpec"},"AutoSwarmBuilderResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the swarm was built successfully."},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id","description":"The job ID of the swarm."},"outputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputs","description":"The outputs of the auto swarms builder."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"The type of the swarm execution.","default":"auto-swarm-builder"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"The timestamp of the swarm execution."},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage","description":"The usage of the swarm execution."}},"type":"object","required":["success"],"title":"AutoSwarmBuilderResponse","description":"Schema for the Auto Swarm Builder API response.\n\nAttributes:\n    success (bool): Whether the swarm was built successfully.\n    job_id (Optional[str]): The job ID of the swarm.\n    outputs (Optional[dict]): The outputs of the auto swarms builder.\n    type (Optional[str]): The type of the swarm execution.\n    timestamp (Optional[str]): The timestamp of the swarm execution.\n    usage (Optional[dict]): The usage statistics of the swarm execution."},"AutoSwarmBuilderSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the swarm."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A description of the swarm."},"max_loops":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Loops","description":"Maximum number of loops to run.","default":1},"execution_type":{"anyOf":[{"type":"string","enum":["return-agents","return-swarm-router-config","return-agents-objects"]},{"type":"null"}],"title":"Execution Type","description":"The type of execution to perform.","default":"return-agents"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name","description":"The model name to use for the swarm.","default":"gpt-4.1"},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"The task for the swarm, if any."},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","description":"The maximum number of tokens to use for the swarm."}},"type":"object","title":"AutoSwarmBuilderSchema","description":"Schema for the Auto Swarm Builder input configuration.\n\nAttributes:\n    name (Optional[str]): The name of the swarm.\n    description (Optional[str]): A description of the swarm.\n    max_loops (Optional[int]): Maximum number of loops to run (default: 1).\n    return_agents (Optional[bool]): Whether to return agents after building (default: True).\n    model_name (Optional[str]): The model name to use for the swarm (default: \"gpt-4.1\").\n    generate_router_config (Optional[bool]): Whether to generate router configuration (default: False).\n    task (Optional[str]): The main task for the swarm (required).\n    max_tokens (Optional[int]): The maximum number of tokens to use for the swarm."},"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"},"BatchedAdvancedResearchInputSchema":{"properties":{"input_schemas":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdvancedResearchInputSchema"},"type":"array"},{"type":"null"}],"title":"Input Schemas","description":"The input schemas for the advanced research"}},"type":"object","required":["input_schemas"],"title":"BatchedAdvancedResearchInputSchema"},"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","description":"The configuration of the agent to be completed."},"type":"array"},{"type":"null"}],"title":"Agent Completions","description":"The agent completions to be completed by the batched grid workflow."},"tasks":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tasks","description":"The tasks to be completed by the batched grid workflow."},"max_loops":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Loops","description":"The maximum number of loops to be completed by the batched grid workflow."},"imgs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Imgs","description":"The images to be used by the batched grid workflow."}},"type":"object","title":"BatchedGridWorkflowInput"},"BatchedGridWorkflowOutput":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The job ID of the batched grid workflow."},"name":{"type":"string","title":"Name","description":"The name of the batched grid workflow."},"description":{"type":"string","title":"Description","description":"The description of the batched grid workflow."},"status":{"type":"string","title":"Status","description":"The status of the batched grid workflow."},"outputs":{"title":"Outputs","description":"The outputs of the batched grid workflow."},"usage":{"$ref":"#/components/schemas/api__batched_grid_workflow__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","name","description","status","outputs","usage","timestamp"],"title":"BatchedGridWorkflowOutput"},"ChatCompletionChoice":{"properties":{"index":{"type":"integer","title":"Index","default":0},"message":{"$ref":"#/components/schemas/ChatMessage"},"finish_reason":{"type":"string","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"},{"type":"null"}],"title":"Temperature","description":"Sampling temperature","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"},{"type":"null"}],"title":"Max Tokens","description":"Maximum tokens to generate"},"max_completion_tokens":{"anyOf":[{"type":"integer"},{"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"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"Unique identifier for the end-user"},"max_loops":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Loops","description":"Maximum number of agent reasoning loops (Swarms extension). Defaults to 1 (single pass). Use via extra_body in the OpenAI SDK.","default":1}},"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, user, assistant)"},"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"}},"type":"object","required":["role"],"title":"ChatMessage"},"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":"Regular credit balance."},"free_credit":{"type":"number","title":"Free Credit","description":"Free credit balance."},"referral_credits":{"type":"number","title":"Referral Credits","description":"Referral credits balance."},"total_credits":{"type":"number","title":"Total Credits","description":"Total available credits (sum of all credit types)."}},"type":"object","required":["credit","free_credit","referral_credits","total_credits"],"title":"CreditBalanceOutput"},"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."},"GetMarketplacePromptsInput":{"properties":{"number_of_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Items","description":"Number of items to return","default":10}},"type":"object","title":"GetMarketplacePromptsInput"},"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","description":"The configuration of the agent to be completed."},"type":"array"},{"type":"null"}],"title":"Agents","description":"List of agent specifications to be used as nodes in the workflow graph."},"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."},"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."},"img":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Img","description":"Optional image path 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/api__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"},"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"},"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":"Authentication token for accessing the MCP server"},"transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transport","description":"The transport protocol to use for the MCP server","default":"streamable_http"},"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":"Timeout for the MCP server","default":10}},"additionalProperties":true,"type":"object","title":"MCPConnection"},"MarketplacePrompt":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the prompt"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the prompt"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the prompt"},"created_at":{"type":"string","title":"Created At","description":"Timestamp when the prompt was created"},"user_id":{"type":"string","title":"User Id","description":"ID of the user who created the prompt"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"The actual prompt text"},"use_cases":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Use Cases","description":"Use cases - can be dict or list of dicts"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Status of the prompt"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags","description":"Tags associated with the prompt"},"category":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Category","description":"Category name(s) - can be string or list"},"links":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Links","description":"Associated links - can be list of dicts or strings","default":[]}},"type":"object","required":["id","created_at","user_id"],"title":"MarketplacePrompt","description":"Schema for marketplace prompts from the swarms_cloud_prompts table."},"MarketplacePromptsResponse":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"The status of the marketplace prompts response.","default":"success"},"prompts":{"items":{"$ref":"#/components/schemas/MarketplacePrompt"},"type":"array","title":"Prompts","description":"List of marketplace prompts"},"total_count":{"type":"integer","title":"Total Count","description":"Total number of prompts available"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"The timestamp of the marketplace prompts response.","default":"2026-06-06T17:05:40.620806"}},"type":"object","required":["prompts","total_count"],"title":"MarketplacePromptsResponse","description":"Response schema for marketplace prompts endpoint."},"ModelsAvailableOutput":{"properties":{"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success","default":true},"models":{"anyOf":[{},{"type":"null"}],"title":"Models"}},"type":"object","title":"ModelsAvailableOutput"},"MultipleMCPConnections":{"properties":{"connections":{"items":{"$ref":"#/components/schemas/MCPConnection"},"type":"array","title":"Connections","description":"List of MCP connections"}},"type":"object","required":["connections"],"title":"MultipleMCPConnections"},"PricingDetailsOutput":{"properties":{"usage_pricing":{"$ref":"#/components/schemas/UsagePricingModel","description":"Usage pricing for all API operations including token costs, agent costs, search, scrape, 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"},"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-4-20250514"},"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"},{"type":"null"}],"title":"Max Loops","description":"The maximum number of times the reasoning agent is allowed to repeat its task.","default":1},"swarm_type":{"anyOf":[{"type":"string","enum":["reasoning-duo","self-consistency","ire","reasoning-agent","consistency-agent","ire-agent","ReflexionAgent","GKPAgent","AgentJudge"]},{"type":"null"}],"title":"Swarm Type","description":"The type of reasoning swarm to use (e.g., reasoning duo, self-consistency, IRE).","default":"reasoning_duo"},"num_samples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Samples","description":"The number of samples to generate for the reasoning agent.","default":1},"output_type":{"anyOf":[{"type":"string","enum":["list","dict","dictionary","string","str","final","last","json","all","yaml","xml","dict-all-except-first","str-all-except-first","basemodel","dict-final","list-final"]},{"type":"null"}],"title":"Output Type","description":"The type of output format for the reasoning agent.","default":"dict-all-except-first"},"num_knowledge_items":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Knowledge Items","description":"The number of knowledge items to use for the reasoning agent."},"memory_capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memory Capacity","description":"The memory capacity for the reasoning agent."},"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task","description":"The task to be completed by the reasoning agent."}},"type":"object","title":"ReasoningAgentSpec"},"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."}},"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"},"logs":{"anyOf":[{},{"type":"null"}],"title":"Logs"},"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","description":"The configuration of the agent to be completed."},"type":"array"},{"type":"null"}],"title":"Agents","description":"A list of agents or specifications that define the agents participating in the swarm."},"max_loops":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Loops","description":"The maximum number of execution loops allowed for the swarm, enabling repeated processing if needed.","default":1},"swarm_type":{"anyOf":[{"type":"string","enum":["AgentRearrange","MixtureOfAgents","SequentialWorkflow","ConcurrentWorkflow","GroupChat","MultiAgentRouter","AutoSwarmBuilder","HierarchicalSwarm","auto","MajorityVoting","CouncilAsAJudge","HeavySwarm","BatchedGridWorkflow","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":"Instructions on how to rearrange the flow of tasks among agents, if applicable."},"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 image URL that may be associated with the swarm's task or representation."},"rules":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rules","description":"Guidelines or constraints that govern the behavior and interactions of the agents within the swarm."},"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_loops_per_agent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Heavy Swarm Loops Per Agent","description":"The number of loops to run per agent in the heavy swarm.","default":1},"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-4.1"},"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-4-20250514"}},"type":"object","title":"SwarmSpec"},"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.","default":"2026-06-06T17:05:40.608364"},"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","AutoSwarmBuilder","HierarchicalSwarm","auto","MajorityVoting","CouncilAsAJudge","HeavySwarm","BatchedGridWorkflow","LLMCouncil","DebateWithJudge","RoundRobin","PlannerWorkerSwarm"]}},"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."},"UsagePricingModel":{"properties":{"swarm_completions_agent_cost":{"type":"number","title":"Swarm Completions Agent Cost","description":"Cost per agent in swarm completions (USD).","default":0.01},"swarm_completions_input_cost_per_1m":{"type":"number","title":"Swarm Completions Input Cost Per 1M","description":"Cost per 1 million input tokens for swarm completions (USD).","default":6.5},"swarm_completions_output_cost_per_1m":{"type":"number","title":"Swarm Completions Output Cost Per 1M","description":"Cost per 1 million output tokens for swarm completions (USD).","default":18.5},"agent_completions_input_cost_per_1m":{"type":"number","title":"Agent Completions Input Cost Per 1M","description":"Cost per 1 million input tokens for agent completions (USD).","default":6.5},"agent_completions_output_cost_per_1m":{"type":"number","title":"Agent Completions Output Cost Per 1M","description":"Cost per 1 million output tokens for agent completions (USD).","default":18.5},"agent_completions_img_cost":{"type":"number","title":"Agent Completions Img Cost","description":"Cost per image for agent completions (USD).","default":0.25},"agent_completions_mcp_cost":{"type":"number","title":"Agent Completions Mcp Cost","description":"Cost per MCP call for agent completions (USD).","default":0.1},"search_cost":{"type":"number","title":"Search Cost","description":"Cost per search operation in dollars (USD).","default":0.04},"scrape_cost":{"type":"number","title":"Scrape Cost","description":"Cost per scrape operation in dollars (USD).","default":0.15},"night_time_discount":{"type":"number","title":"Night Time Discount","description":"Discount multiplier for night time usage (0.50 = 50% discount).","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"},"api__batched_grid_workflow__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."},"token_cost":{"type":"number","title":"Token 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."}},"type":"object","required":["input_tokens","output_tokens","total_tokens","token_cost","cost_per_agent"],"title":"Usage"},"api__schemas__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."},"token_cost":{"type":"number","title":"Token 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}},"type":"object","required":["input_tokens","output_tokens","total_tokens","token_cost"],"title":"Usage","description":"Usage statistics for the workflow execution."}}}}