EON

EON Developer

Build with EON.

A free, OpenAI-compatible API for your own apps. Join the program, register an app and send your first request in a minute.

Join for free

API reference

Quickstart

EON's API is compatible with the OpenAI Chat Completions format, so any OpenAI SDK or tool works by changing two settings: the base URL and the key.

  1. 1Join the EON Developer program. It is free.
  2. 2Register an app to get its API key. The key is shown once, so store it safely.
  3. 3Point your client at the base URL below and send a request.
Your first request
curl https://eon-agent.com/api/v1/chat/completions \
  -H "Authorization: Bearer eon_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "eon",
    "messages": [
      { "role": "system", "content": "You are a helpful assistant." },
      { "role": "user", "content": "Summarize the news about AI today." }
    ]
  }'

Authentication

Every request needs your app's API key as a Bearer token in the Authorization header. Keys start with eon_sk_.

Header
Authorization: Bearer eon_sk_...

Keep keys on your server. Never put them in a web page or mobile app where people can read them. If a key leaks, delete the app in the Developer portal and register a new one.

POST/v1/chat/completions

Create a chat completion

Send a conversation and get EON's next message.

Request body

modelstringRequired

Always "eon".

messagesarrayRequired

The conversation so far. Each item has a role ("system", "user" or "assistant") and content.

streamboolean

Send the reply as server-sent events while it is written. Default false.

max_tokensinteger

Longest reply in tokens, up to 1,024.

temperaturenumber

From 0 to 2. Lower is more focused, higher is more creative.

toolsarray

Functions EON may call, in the OpenAI tools format.

Request
curl https://eon-agent.com/api/v1/chat/completions \
  -H "Authorization: Bearer eon_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "eon",
    "messages": [
      { "role": "system", "content": "You are a helpful assistant." },
      { "role": "user", "content": "Summarize the news about AI today." }
    ]
  }'
Response
{
  "id": "chatcmpl-8f2c...",
  "object": "chat.completion",
  "created": 1794720000,
  "model": "eon",
  "choices": [{
    "index": 0,
    "message": { "role": "assistant", "content": "Here is today's AI news..." },
    "finish_reason": "stop"
  }],
  "usage": { "prompt_tokens": 42, "completion_tokens": 186, "total_tokens": 228 }
}

Streaming

Set stream to true to receive the reply in pieces as server-sent events, in the same format as OpenAI. The stream ends with data: [DONE].

Stream a reply
const stream = await eon.chat.completions.create({
  model: 'eon',
  stream: true,
  messages: [{ role: 'user', content: 'Write a haiku about orbit.' }],
})
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? '')
}
GET/v1/models

Models

EON exposes one model, eon. It runs on Cloudflare's global network.

List models
curl https://eon-agent.com/api/v1/models

Errors

Errors use standard HTTP status codes and an OpenAI-style error object.

400invalid_request_errorThe request is missing something, like messages.
401invalid_api_keyThe key is missing, wrong or deleted.
429rate_limitToo many requests. Wait for the Retry-After seconds, then try again.
503server_errorEON is busy or resting for the day. Try again later.
Error body
{
  "error": {
    "message": "Slow down: one request every few seconds.",
    "type": "rate_limit",
    "code": "rate_limit"
  }
}

Rate limits

The EON API is free, with fair use limits per account. Going over returns HTTP 429 with a Retry-After header. Your limits and usage are in the Developer portal after you join.