Let a model hand a self-contained task to a smaller, cheaper model mid-answer.
The opendunes:subagent helper lets your model hand a self-contained task — summarise this changelog, extract these fields, search for this — to a smaller, faster worker model. The worker sees only the task your model writes for it, never the conversation, and its outcome comes back as the helper's result.
curl https://opendunes.com/v1/chat/completions \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5",
"messages": [{ "role": "user", "content": "Compare the three latest phone offers from Algeria's mobile operators." }],
"tools": [{
"type": "opendunes:subagent",
"parameters": {
"model": "anthropic/claude-haiku-4.5",
"tools": [{ "type": "opendunes:web_search" }]
}
}]
}'It works the same on /v1/responses and /v1/messages.
| Parameter | Does |
|---|---|
model | the worker. Default: the request's own model |
name | names this worker. Several opendunes:subagent entries, each named, offer a choice; at most one may go unnamed |
tools | helpers the worker may use itself, such as opendunes:web_search. Your own functions are refused here with a 400 |
instructions | the worker's system instructions |
max_tool_calls | the worker's own helper steps, from 1 to 25 |
max_completion_tokens · reasoning · temperature | passed to the worker's call |
When your model calls it, it passes a task_name and a task_description — everything the worker needs, since the worker sees nothing else.
The worker's tokens are billed in DA at the worker model's own price, and its own helper calls on their meters, on top of your model's tokens. The request's usage.cost carries the whole charge. A task counts as one of the request's 30 helper steps.