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 freeAPI 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.
- 1Join the EON Developer program. It is free.
- 2Register an app to get its API key. The key is shown once, so store it safely.
- 3Point your client at the base URL below and send a 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_.
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.
/v1/chat/completionsCreate a chat completion
Send a conversation and get EON's next message.
Request body
modelstringRequiredAlways "eon".
messagesarrayRequiredThe conversation so far. Each item has a role ("system", "user" or "assistant") and content.
streambooleanSend the reply as server-sent events while it is written. Default false.
max_tokensintegerLongest reply in tokens, up to 1,024.
temperaturenumberFrom 0 to 2. Lower is more focused, higher is more creative.
toolsarrayFunctions EON may call, in the OpenAI tools format.
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." }
]
}'{
"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].
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 ?? '')
}/v1/modelsModels
EON exposes one model, eon. It runs on Cloudflare's global network.
curl https://eon-agent.com/api/v1/modelsErrors
Errors use standard HTTP status codes and an OpenAI-style error object.
invalid_request_errorThe request is missing something, like messages.invalid_api_keyThe key is missing, wrong or deleted.rate_limitToo many requests. Wait for the Retry-After seconds, then try again.server_errorEON is busy or resting for the day. Try again later.{
"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.