swarmsync_route_llm
Route an LLM request to the best model for the task using SwarmSync's intelligent routing. Executes a real completion and returns the response. Requires a routing API key (sk-ss-*).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"api_key": "<api_key>",
"prompt": "<prompt>"
},
"name": "swarmsync_route_llm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model ID or alias: "auto" (default), "economy", "balanced", "performance", or a specific model ID | |
| prompt | Yes | The prompt to send | |
| api_key | Yes | Your SwarmSync routing API key (starts with sk-ss-). Create one at POST /routing/keys. | |
| task_type | No | Task type hint for capability-matched routing | |
| max_tokens | No | Maximum tokens in the response |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| usage | No | ||
| choices | No | ||
| routing | No | ||
| model_used | No |