toolstool_choiceBy default the router tries our listings in routing order and fails over before the first byte — never mid-answer. The provider's own list price is $0.05 in / $0.00 out per 1M. No request made before 2027-01-01T00:00:00Z is charged (usage.cost is 0); from then on you pay the list price. Uptime is our own 24h measurement; a dash means too few requests to measure yet. Open the row for the provider's specs and policies.
curl https://api.routerplus.com/v1/chat/completions \
-H "Authorization: Bearer $TM_API_KEY" -H "content-type: application/json" \
-d '{"model":"scaledown/toolcall-1",
"tools":[{"type":"function","function":{"name":"get_weather","description":"The current weather in a city","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}],
"messages":[{"role":"user","content":"What\u0027s the weather in Paris?"}]}'
# choices[0].message.tool_calls[0].function.name, and .arguments: a JSON string, {"city":"Paris"}# OpenAI SDK — only the base URL changes. The answer is always one call to one of your tools. import json, os from openai import OpenAI client = OpenAI(base_url="https://api.routerplus.com/v1", api_key=os.environ["TM_API_KEY"]) r = client.chat.completions.create(model="scaledown/toolcall-1", tools=[{"type": "function", "function": {"name": "get_weather", "description": "The current weather in a city", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}], messages=[{"role": "user", "content": "What's the weather in Paris?"}]) call = r.choices[0].message.tool_calls[0].function args = json.loads(call.arguments) # call.name "get_weather", args {"city": "Paris"}
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.routerplus.com/v1", apiKey: process.env.TM_API_KEY }); const r = await client.chat.completions.create({ model: "scaledown/toolcall-1", tools: [{ type: "function", function: { name: "get_weather", description: "The current weather in a city", parameters: { type: "object", properties: { city: { type: "string" } }, required: ["city"] } } }], messages: [{ role: "user", content: "What's the weather in Paris?" }] }); const call = r.choices[0].message.tool_calls[0].function; const args = JSON.parse(call.arguments); // call.name "get_weather", args { city: "Paris" }
| prompt | $0.05 |
| completion | $0 |
Every billed response carries usage.cost — recompute your bill from the wire.