EON

API reference

Chat completions

POST /v1/chat/completions creates a reply for a conversation.

POST https://www.eon-agent.com/api/v1/chat/completions

Request body

FieldTypeDescription
modelstringUse "eon".
messagesarrayThe conversation. Each item has role (system, user, assistant or tool) and content.
streambooleanSend the reply as server-sent events. Default false.
stream_options.include_usagebooleanWith stream, send a final chunk with token usage.
max_tokensintegerLongest reply in tokens. Up to 1,024 with an API key.
temperaturenumberHigher is more varied, lower is more focused.
toolsarrayFunctions the model may call. See Tools.
tool_choicestring or objectauto, none, required, or a specific function.

Example

curl https://www.eon-agent.com/api/v1/chat/completions \
  -H "Authorization: Bearer $EON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "eon",
    "messages": [
      { "role": "system", "content": "You are a helpful assistant." },
      { "role": "user", "content": "Write a haiku about orbit." }
    ]
  }'