Subagent
openrouter:subagent
Lets a large model break work into focused sub-tasks and hand them to a smaller, cheaper worker model. Each subagent is any OpenRouter model, optionally equipped with its own tools, and its usage folds into the parent request.
How it works
For focused work that does not need your main model’s full capability, like summarizing, extraction, or boilerplate.
Your model hands off a self-contained task with a name and a full description.
The worker model completes it from that description alone, using any tools you gave it.
Your model gets the outcome back and carries on. Worker usage is reported on the request.
Providers and pricing
Standard model token costs apply to every request.
Using this tool
OpenRouter runs the tool during the request and returns the result to the model, so no client-side tool loop is needed.
Supported APIs: Chat Completions and Responses.
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.2",
"tools": [
{
"type": "openrouter:subagent",
"parameters": {
"model": "~anthropic/claude-haiku-latest"
}
}
],
"messages": [
{
"role": "user",
"content": "Research three competing databases and delegate one comparison to a subagent each."
}
]
}'Setup, parameters, and examples in the docs.
Read the integration guide