Documentation Index
Fetch the complete documentation index at: https://docs.euri.ai/llms.txt
Use this file to discover all available pages before exploring further.
Request
POST https://api.euron.one/api/v1/euri/chat/completions
| Header | Required | Description |
|---|
Authorization | Yes | Bearer YOUR_EURI_API_KEY |
Content-Type | Yes | application/json |
Body parameters
Model ID to use. See Models for the full list.
Array of message objects representing the conversation.Each message has:
role — "system", "user", or "assistant"
content — The message text (string)
Maximum number of tokens to generate. Defaults to model maximum.
Sampling temperature between 0 and 2. Lower = more deterministic. Default: 0.7.
If true, returns a stream of Server-Sent Events (SSE). Default: false.
Nucleus sampling. Default: 1.
Penalize repeated tokens. Range: -2.0 to 2.0. Default: 0.
Penalize tokens already present. Range: -2.0 to 2.0. Default: 0.
Up to 4 sequences where the API will stop generating.
Number of completions to generate. Default: 1.
List of tools (functions) the model can call. OpenAI function-calling format.
Controls tool usage: "auto", "none", or a specific tool object.
Force output format. Example: {"type": "json_object"} for JSON mode.
Seed for deterministic sampling (best-effort).
Examples
Basic chat
curl -X POST https://api.euron.one/api/v1/euri/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_EURI_API_KEY" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain AGI in 2 simple lines."}
],
"max_tokens": 200,
"temperature": 0.7
}'
Streaming
curl -X POST https://api.euron.one/api/v1/euri/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_EURI_API_KEY" \
-d '{
"model": "gemini-2.5-flash",
"messages": [{"role": "user", "content": "Write a haiku about code."}],
"stream": true
}'
Using Claude
curl -X POST https://api.euron.one/api/v1/euri/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_EURI_API_KEY" \
-d '{
"model": "claude-sonnet-4-6",
"messages": [{"role": "user", "content": "Compare REST and GraphQL."}],
"max_tokens": 500
}'
Using Llama
curl -X POST https://api.euron.one/api/v1/euri/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_EURI_API_KEY" \
-d '{
"model": "llama-4-scout-17b-16e-instruct",
"messages": [{"role": "user", "content": "What is Rust good for?"}],
"max_tokens": 300
}'
Response
{
"id": "chatcmpl-58e31942-784a-4075-bfa9-0aad20692061",
"object": "chat.completion",
"created": 1744998577,
"model": "gpt-4o-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "AGI stands for Artificial General Intelligence..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 272,
"completion_tokens": 145,
"total_tokens": 417
}
}
Stream response
When stream: true, the response is a series of SSE events:
data: {"id":"chatcmpl-...","choices":[{"delta":{"content":"AGI"},"index":0}]}
data: {"id":"chatcmpl-...","choices":[{"delta":{"content":" stands"},"index":0}]}
data: [DONE]
Errors
| Code | Meaning |
|---|
400 | Missing messages or model, invalid parameters |
401 | Invalid or missing API key |
403 | Daily token limit reached or insufficient wallet balance |
429 | Rate limited |
500 | Upstream model error |