Chat
Chat completion endpoints
Create chat completion
Authorization
bearerAuth API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.eurouter.ai/api/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "mistral-large-3", "messages": [ { "role": "user", "content": "Hello!" } ] }'{
"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,
"cost_currency": "USD",
"cost_eur": 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
}
}