Chat Completions
curl --request POST \
--url https://api.euron.one/api/v1/euri/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"messages": [
{}
],
"max_tokens": 123,
"temperature": 123,
"stream": true,
"top_p": 123,
"frequency_penalty": 123,
"presence_penalty": 123,
"stop": {},
"n": 123,
"tools": [
{}
],
"tool_choice": {},
"response_format": {},
"seed": 123
}
'import requests
url = "https://api.euron.one/api/v1/euri/chat/completions"
payload = {
"model": "<string>",
"messages": [{}],
"max_tokens": 123,
"temperature": 123,
"stream": True,
"top_p": 123,
"frequency_penalty": 123,
"presence_penalty": 123,
"stop": {},
"n": 123,
"tools": [{}],
"tool_choice": {},
"response_format": {},
"seed": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
messages: [{}],
max_tokens: 123,
temperature: 123,
stream: true,
top_p: 123,
frequency_penalty: 123,
presence_penalty: 123,
stop: {},
n: 123,
tools: [{}],
tool_choice: {},
response_format: {},
seed: 123
})
};
fetch('https://api.euron.one/api/v1/euri/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.euron.one/api/v1/euri/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'messages' => [
[
]
],
'max_tokens' => 123,
'temperature' => 123,
'stream' => true,
'top_p' => 123,
'frequency_penalty' => 123,
'presence_penalty' => 123,
'stop' => [
],
'n' => 123,
'tools' => [
[
]
],
'tool_choice' => [
],
'response_format' => [
],
'seed' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.euron.one/api/v1/euri/chat/completions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"messages\": [\n {}\n ],\n \"max_tokens\": 123,\n \"temperature\": 123,\n \"stream\": true,\n \"top_p\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"stop\": {},\n \"n\": 123,\n \"tools\": [\n {}\n ],\n \"tool_choice\": {},\n \"response_format\": {},\n \"seed\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.euron.one/api/v1/euri/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"messages\": [\n {}\n ],\n \"max_tokens\": 123,\n \"temperature\": 123,\n \"stream\": true,\n \"top_p\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"stop\": {},\n \"n\": 123,\n \"tools\": [\n {}\n ],\n \"tool_choice\": {},\n \"response_format\": {},\n \"seed\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.euron.one/api/v1/euri/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"messages\": [\n {}\n ],\n \"max_tokens\": 123,\n \"temperature\": 123,\n \"stream\": true,\n \"top_p\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"stop\": {},\n \"n\": 123,\n \"tools\": [\n {}\n ],\n \"tool_choice\": {},\n \"response_format\": {},\n \"seed\": 123\n}"
response = http.request(request)
puts response.read_bodyAPI Reference
Chat Completions
Generate text completions using 40+ LLMs. OpenAI-compatible request and response format.
POST
/
chat
/
completions
Chat Completions
curl --request POST \
--url https://api.euron.one/api/v1/euri/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"messages": [
{}
],
"max_tokens": 123,
"temperature": 123,
"stream": true,
"top_p": 123,
"frequency_penalty": 123,
"presence_penalty": 123,
"stop": {},
"n": 123,
"tools": [
{}
],
"tool_choice": {},
"response_format": {},
"seed": 123
}
'import requests
url = "https://api.euron.one/api/v1/euri/chat/completions"
payload = {
"model": "<string>",
"messages": [{}],
"max_tokens": 123,
"temperature": 123,
"stream": True,
"top_p": 123,
"frequency_penalty": 123,
"presence_penalty": 123,
"stop": {},
"n": 123,
"tools": [{}],
"tool_choice": {},
"response_format": {},
"seed": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
messages: [{}],
max_tokens: 123,
temperature: 123,
stream: true,
top_p: 123,
frequency_penalty: 123,
presence_penalty: 123,
stop: {},
n: 123,
tools: [{}],
tool_choice: {},
response_format: {},
seed: 123
})
};
fetch('https://api.euron.one/api/v1/euri/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.euron.one/api/v1/euri/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'messages' => [
[
]
],
'max_tokens' => 123,
'temperature' => 123,
'stream' => true,
'top_p' => 123,
'frequency_penalty' => 123,
'presence_penalty' => 123,
'stop' => [
],
'n' => 123,
'tools' => [
[
]
],
'tool_choice' => [
],
'response_format' => [
],
'seed' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.euron.one/api/v1/euri/chat/completions"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"messages\": [\n {}\n ],\n \"max_tokens\": 123,\n \"temperature\": 123,\n \"stream\": true,\n \"top_p\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"stop\": {},\n \"n\": 123,\n \"tools\": [\n {}\n ],\n \"tool_choice\": {},\n \"response_format\": {},\n \"seed\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.euron.one/api/v1/euri/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"messages\": [\n {}\n ],\n \"max_tokens\": 123,\n \"temperature\": 123,\n \"stream\": true,\n \"top_p\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"stop\": {},\n \"n\": 123,\n \"tools\": [\n {}\n ],\n \"tool_choice\": {},\n \"response_format\": {},\n \"seed\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.euron.one/api/v1/euri/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"messages\": [\n {}\n ],\n \"max_tokens\": 123,\n \"temperature\": 123,\n \"stream\": true,\n \"top_p\": 123,\n \"frequency_penalty\": 123,\n \"presence_penalty\": 123,\n \"stop\": {},\n \"n\": 123,\n \"tools\": [\n {}\n ],\n \"tool_choice\": {},\n \"response_format\": {},\n \"seed\": 123\n}"
response = http.request(request)
puts response.read_bodyRequest
POST https://api.euron.one/api/v1/euri/chat/completions
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer YOUR_EURI_API_KEY |
Content-Type | Yes | application/json |
Body parameters
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
}'
from openai import OpenAI
client = OpenAI(
api_key="YOUR_EURI_API_KEY",
base_url="https://api.euron.one/api/v1/euri"
)
response = client.chat.completions.create(
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
)
print(response.choices[0].message.content)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'YOUR_EURI_API_KEY',
baseURL: 'https://api.euron.one/api/v1/euri',
});
const response = await client.chat.completions.create({
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,
});
console.log(response.choices[0].message.content);
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
}'
stream = client.chat.completions.create(
model="gemini-2.5-flash",
messages=[{"role": "user", "content": "Write a haiku about code."}],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
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
Whenstream: 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 |
⌘I