Fanout
Part of the Rapid Router API reference. One OpenAI-compatible endpoint, https://rapidrouter.ai/api/v1, in front of every model in the catalog.
34Fanout
One prompt, up to 4 models, one call. POST /chat/fanout takes a normal chat completion body plus a models array in place of model, runs the request against every model in parallel, and returns all the answers together.
curl https://rapidrouter.ai/api/v1/chat/fanout \
-H "Authorization: Bearer $RAPIDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"models": ["google/gemini-3.6-flash", "anthropic/claude-sonnet-5"],
"messages": [{ "role": "user", "content": "Name three rivers." }]
}'
# -> { "ok": true, "data": { "results": [
# { "model": "google/gemini-3.6-flash", "status": 200,
# "body": { "object": "chat.completion", ... } },
# { "model": "anthropic/claude-sonnet-5", "status": 200,
# "body": { "object": "chat.completion", ... } }
# ] } }Each model runs as a real request through the full pipeline, key checks, allowlists, budgets, rate limits, routing, logging, and each result is billed individually at its model's normal price, exactly as if you had made the calls separately. One model failing does not sink the rest: its entry carries the error status and body while the others complete. Streaming is rejected with 400; call /chat/completions per model when you want streams.