Chat
Chat completion endpoints
Create chat completion
Authorization
bearerAuth API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Request Body
application/json
Model identifier (e.g., "openai/gpt-4")
Fallback model list (not yet implemented)
Routing rule ID to apply
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidRouting rule name to apply
Conversation messages
1 <= itemsEnable streaming responses
Streaming options
Maximum tokens to generate (deprecated, use max_completion_tokens)
Maximum tokens to generate
Sampling temperature (0-2)
Nucleus sampling probability (0-1)
Frequency penalty (-2 to 2)
Presence penalty (-2 to 2)
Token logit biases
Return log probabilities
Number of top logprobs to return (0-20)
Random seed for deterministic generation
Stop sequences
Reasoning parameters (for reasoning models)
Response format specification
Tool calling behavior
Available tools for the model
End-user identifier for abuse detection
Custom metadata
Provider routing preferences
Response Body
application/json
curl -X POST "https://api.eurouter.ai/api/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system", "content": "string" } ] }'{
"id": "string",
"object": "chat.completion",
"created": 0,
"model": "string",
"system_fingerprint": "string",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "string",
"name": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
],
"refusal": "string",
"reasoning": "string"
},
"finish_reason": "tool_calls",
"logprobs": {
"content": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
],
"top_logprobs": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
]
}
]
}
],
"refusal": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
],
"top_logprobs": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
]
}
]
}
]
}
}
],
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0,
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
},
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
}
}
}