EXAONE API Platform

K-EXAONE 2.5

POST /v1/chat/completions

The K-EXAONE 2.5 model is available through the EXAONE API Platform. The EXAONE API is OpenAI-compatible.

K-EXAONE 2.5 is a text-only model.

The maximum context length is 524,288 tokens. If the number of input tokens plus max_tokens exceeds this limit, the API returns a 400 error.


Request

FieldTypeDescriptionRequired
modelstringk-exaone_v2.5mandatory
messagesarray<object>List of messages in the conversationmandatory
messages[].rolestringsystem / user / assistantmandatory
messages[].contentstringContent of the message: a prompt, query, or responsemandatory
max_tokensintMaximum number of tokens to generate, including the reasoning process. Input tokens + max_tokens โ‰ค 524,288optional
streambooleanWhether to stream the response (default: false)optional
stream_options.include_usagebooleanWhether to include a token usage chunk at the end of the stream. Available only when stream is true. (Default: false)optional
temperaturefloatControls the randomness of the output by adjusting how sharp the probability distribution is. Higher values produce more random output. Range: 0.0 or higher. (Default: 1.0)optional
top_pfloatSamples only from the smallest set of top tokens whose cumulative probability is within p. (Range: 0.0~1.0, Default: 0.95)optional
top_kintSamples only from the k most likely tokens. Range: -1, or 1 or higher. Set to -1 to disable filtering. (Default: -1)optional
presence_penaltyfloatPenalizes tokens that have already appeared, which reduces repetition and encourages new topics. Positive values make repeated tokens less likely. (Range: -2.0~2.0. Default: 0.0)optional
reasoning_effortstringReasoning (thinking) intensity: low / high / max. Higher values produce longer reasoning (default: max)optional
chat_template_kwargs.preserve_thinkingbooleanWhether to keep the reasoning content of previous assistant turns in the input for multi-turn conversations. If false, only the reasoning after the last user message is kept (default: false)optional

Response(stream: false)

FieldTypeDescription
bodyobjectA chat completion object in the standard OpenAI format

Response(stream: true)

FieldTypeDescription
datastringAn OpenAI chat completion chunk sent over SSE

Example request(stream: false)

curl 'https://api.exaone.ai/v1/chat/completions' \
  -H "Authorization: Bearer $EXAONE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "k-exaone_v2.5",
  "max_tokens": 512,
  "messages": [
    {
      "role": "user",
      "content": "Hi, EXAONE"
    }
  ],
  "stream": false
}'

Example response(stream: false)

{
  "id": "1f30a3635ebd4e4cb57e4d41e2f18d55",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "logprobs": null,
      "message": {
        "content": "\n\nHello! How can I help you today?",
        "refusal": null,
        "role": "assistant",
        "annotations": null,
        "audio": null,
        "function_call": null,
        "tool_calls": null,
        "reasoning_content": "We need answer to user \"Hi, EXAONE\". We are AI assistant accessed via API. Need respond. We shouldn't claim EXAONE? We are likely not EXAONE, unless system? The system prompt is how am I supposed to behave, no identity. User says Hi, EXAONE. We can greet back, maybe clarify: I'm EXAONE? Need be honest. We are not necessarily called EXAONE. However no explicit model identity. In API, maybe they are addressing assistant. We can say \"Hi! I'm an AI assistant. How can I help?\" If this is a test? They said \"Hi, EXAONE\", maybe expect assistant to identify as EXAONE? We need not misrepresent. If team? There is no identity, so safest: \"Hi! I don't have a name, but happy to help.\" But user might be talking to EXAONE model (LG AI Research). We shouldn't claim if not. Maybe \"Hello! How can I assist you today?\" Simple. Could mention \"I can try.\" Since asked just hi, no need. Final answer.\n"
      },
      "matched_stop": 53
    }
  ],
  "created": 1793945790,
  "model": "k-exaone_v2.5",
  "object": "chat.completion",
  "metadata": {
    "weight_version": "default",
    "weight_versions": [{ "version": "default", "start": 0, "end": 218 }]
  },
  "moderation": null,
  "service_tier": null,
  "system_fingerprint": null,
  "usage": {
    "completion_tokens": 218,
    "prompt_tokens": 22,
    "total_tokens": 240,
    "completion_tokens_details": null,
    "prompt_tokens_details": null,
    "reasoning_tokens": 209
  }
}

Example request(stream: true)

curl 'https://api.exaone.ai/v1/chat/completions' \
  -H "Authorization: Bearer $EXAONE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "k-exaone_v2.5",
  "max_tokens": 512,
  "messages": [
    {
      "role": "user",
      "content": "Hi, EXAONE"
    }
  ],
  "stream": true
}'

Example response(stream: true)

data: {"id": "2fa2bf0467cf4d758fe4c4dba28f2b18", "choices": [{"delta": {"content": "", "role": "assistant"}, "index": 0}], "created": 1793947427, "model": "k-exaone_v2.5", "object": "chat.completion.chunk"}

data: {"id": "2fa2bf0467cf4d758fe4c4dba28f2b18", "choices": [{"delta": {"reasoning_content": "We"}, "index": 0}], "created": 1793947427, "model": "k-exaone_v2.5", "object": "chat.completion.chunk"}

data: {"id": "2fa2bf0467cf4d758fe4c4dba28f2b18", "choices": [{"delta": {"reasoning_content": " need"}, "index": 0}], "created": 1793947427, "model": "k-exaone_v2.5", "object": "chat.completion.chunk"}

data: {"id": "2fa2bf0467cf4d758fe4c4dba28f2b18", "choices": [{"delta": {"reasoning_content": " answer to"}, "index": 0}], "created": 1793947427, "model": "k-exaone_v2.5", "object": "chat.completion.chunk"}

data: {"id": "2fa2bf0467cf4d758fe4c4dba28f2b18", "choices": [{"delta": {"reasoning_content": " user. They said \"Hi"}, "index": 0}], "created": 1793947427, "model": "k-exaone_v2.5", "object": "chat.completion.chunk"}

...

data: {"id": "2fa2bf0467cf4d758fe4c4dba28f2b18", "choices": [{"delta": {"content": "how"}, "index": 0}], "created": 1793947427, "model": "k-exaone_v2.5", "object": "chat.completion.chunk"}

data: {"id": "2fa2bf0467cf4d758fe4c4dba28f2b18", "choices": [{"delta": {"content": " can I help you today? ๐Ÿ˜Š"}, "index": 0}], "created": 1793947427, "model": "k-exaone_v2.5", "object": "chat.completion.chunk"}

data: {"id": "2fa2bf0467cf4d758fe4c4dba28f2b18", "choices": [{"delta": {}, "finish_reason": "stop", "index": 0, "matched_stop": 53}], "created": 1793947427, "model": "k-exaone_v2.5", "object": "chat.completion.chunk"}

data: {"id": "2fa2bf0467cf4d758fe4c4dba28f2b18", "choices": [], "created": 1793947427, "model": "k-exaone_v2.5", "object": "chat.completion.chunk", "usage": {"completion_tokens": 234, "prompt_tokens": 22, "total_tokens": 256, "reasoning_tokens": 216}}

data: [DONE]