Completions
Text completion endpoints
Create text 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/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "mistral-large-3", "prompt": "Write a short greeting." }'{
"id": "string",
"object": "text_completion",
"created": 0,
"model": "string",
"provider": "string",
"system_fingerprint": "string",
"choices": [
{
"text": "string",
"index": 0,
"finish_reason": "stop",
"native_finish_reason": "string",
"logprobs": {
"tokens": [
"string"
],
"token_logprobs": [
0
],
"top_logprobs": [
{
"property1": 0,
"property2": 0
}
],
"text_offset": [
0
]
},
"reasoning": "string"
}
],
"usage": {
"prompt_tokens": -9007199254740991,
"completion_tokens": -9007199254740991,
"total_tokens": -9007199254740991,
"cost": 0,
"cost_currency": "USD",
"cost_eur": 0,
"is_byok": true,
"prompt_tokens_details": {
"cached_tokens": -9007199254740991,
"audio_tokens": -9007199254740991,
"property1": null,
"property2": null
},
"completion_tokens_details": {
"cached_tokens": -9007199254740991,
"audio_tokens": -9007199254740991,
"property1": null,
"property2": null
},
"cost_details": {
"upstream_inference_cost": 0,
"upstream_inference_prompt_cost": 0,
"upstream_inference_completions_cost": 0
}
}
}