wand-sparklesAuto Router

Get Model Selection

post
/model/selection

Returns the optimal model recommendation for a given prompt and parameters without making the actual completion request. Uses FastRouter's intelligent routing engine to analyze the prompt and suggest the best model.

Available at both:

  • POST https://api.fastrouter.ai/api/v1/model/selection

  • POST https://api.fastrouter.ai/v1/model/selection

Set model to fastrouter/auto to use automatic model selection. If a specific model is provided, it is returned as-is with selection_strategy: "explicit".

Authorizations
AuthorizationstringRequired

FastRouter API Key. Get yours at https://fastrouter.ai

Format: Authorization: Bearer YOUR_API_KEY

Body
modelstringRequired

Set to fastrouter/auto for automatic model selection, or provide a specific model ID.

Example: fastrouter/auto
Responses
chevron-right
200

Model selection result

application/json
selected_modelstringOptional

The recommended model ID in provider/model format

Example: openai/gpt-4o
assigned_tagsstring[]Optional

Tags assigned to the prompt based on analysis (e.g., complexity, domain, task type)

Example: ["complex","coding","reasoning"]
top_candidatesstring[]Optional

Top 5 candidate models considered for this prompt

Example: ["openai/gpt-4o","anthropic/claude-sonnet-4-20250514","google/gemini-2.5-pro"]
selection_strategystring · enumOptional

auto when fastrouter/auto routing was used, explicit when a specific model was provided

Example: autoPossible values:
errorstring · nullableOptional

Error message if the selection process encountered issues

post
/model/selection

Last updated