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)
Number of chat completion choices to generate
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
Whether to store the conversation for later retrieval
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", "property1": null, "property2": null } ], "property1": null, "property2": null }'{
"id": "string",
"provider": "string",
"object": "chat.completion",
"created": 0,
"model": "string",
"service_tier": "string",
"system_fingerprint": "string",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "string",
"name": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"index": 0,
"function": {
"name": "string",
"arguments": "string"
}
}
],
"refusal": "string",
"reasoning": "string",
"annotations": [
null
],
"property1": null,
"property2": null
},
"finish_reason": "tool_calls",
"native_finish_reason": "string",
"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,
"image_tokens": 0,
"property1": null,
"property2": null
},
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0,
"cache_write_tokens": 0,
"video_tokens": 0,
"property1": null,
"property2": null
},
"cost": 0,
"is_byok": true,
"cost_details": {
"upstream_inference_cost": 0,
"upstream_inference_prompt_cost": 0,
"upstream_inference_completions_cost": 0,
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
}