Skip to content
All systems operationalStatus

Create a chat completion

OpenAI-compatible Chat Completions endpoint for every model.

OpenAI-compatible Chat Completions. It accepts every model on your key, Claude and GPT alike, which makes it the easiest endpoint for third-party tools.

POSThttps://api.evolved.to/v1/chat/completions

Request

Authenticate with Authorization: Bearer <your key> and send a JSON body.

Body parameters

modelstringrequired
Any model ID from Models.
messagesarrayrequired
The conversation: system, user, assistant and tool messages.
max_completion_tokensinteger
Upper bound on generated tokens, including reasoning tokens.
streamboolean
Stream partial results as server-sent events.
stream_optionsobject
Set include_usage to receive token usage in the final chunk.
toolsarray
Function tools the model may call.
tool_choicestring | object
Controls which tool, if any, is called.
response_formatobject
Request JSON output, optionally constrained by a JSON Schema, where the model supports it.

Response

idstring
Unique ID of the completion.
choicesarray
Generated choices. Each has a message (with content and optional tool_calls) and a finish_reason: stop, length, tool_calls or content_filter.
usageobject
prompt_tokens, completion_tokens, total_tokens, and prompt_tokens_details.cached_tokens for input served from the prompt cache.
modelstring
The model that served the request.

Streaming

With "stream": true, each event is a data: line containing a chat.completion.chunk object whose choices[].delta holds new content. The stream ends with data: [DONE].

curl https://api.evolved.to/v1/chat/completions \
  -H "Authorization: Bearer $EVOLVED_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "gpt-5",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.evolved.to/v1", api_key=os.environ["EVOLVED_API_KEY"])

completion = client.chat.completions.create(
    model="gpt-5",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(completion.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.evolved.to/v1", apiKey: process.env.EVOLVED_API_KEY });

const completion = await client.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(completion.choices[0]?.message.content);
Response · 200
{
  "id": "chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG",
  "object": "chat.completion",
  "created": 1790000000,
  "model": "gpt-5",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Hi! How can I help?" },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 8,
    "total_tokens": 17,
    "prompt_tokens_details": { "cached_tokens": 0 }
  }
}