Messages
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
Model ID. Use anthropic/ prefix or bare Anthropic model name. Examples: anthropic/claude-sonnet-4-20250514, claude-sonnet-4-20250514, anthropic/claude-opus-4-20250514
anthropic/claude-sonnet-4-20250514The maximum number of tokens to generate before stopping. Required for all requests.
1024System prompt. Can be a string or an array of content blocks for advanced use cases like prompt caching.
Amount of randomness injected into the response. Ranges from 0.0 to 1.0.
1Nucleus sampling parameter. Use a lower value to ignore less probable options.
0.999Only sample from the top K options for each subsequent token.
Custom text sequences that will cause the model to stop generating.
Whether to stream the response using Server-Sent Events (SSE).
falseExample: falseMessage created successfully
Bad Request - The request is malformed. This could be due to missing parameters, invalid formats, or CORS issues.
Invalid Credentials - Your API key is invalid, disabled, or your OAuth session has expired. Check your credentials.
Insufficient Credits - Your account or API key has run out of credits. Add more credits and retry the request.
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Model Down / Invalid Response - The selected model is currently unavailable or returned an invalid response. Retry or use fallback models.
Last updated
