Create a chat completion
OpenAI-compatible chat completion with Raon-run web search, storage disabled, and opt-in streaming usage.
bearerAuthAuthorizationBearer <token>Raon API key. A Bearer credential takes precedence when both authentication headers are sent.
x-portunus-user?stringThe end user behind this request, when one key serves many people: a stable pseudonymous ID, such as an HMAC of the caller's own member ID, never an email or a name. The gateway records it with the request's usage for the caller's statistics and does not forward it to the model's vendor. It changes nothing about billing, limits or access, which follow the key. A value that does not match the pattern, or a repeated header, is recorded as no end user; the request is still served.
^[A-Za-z0-9._:-]{1,128}$application/json- body
OpenAI-compatible chat request. Other backend extensions are forwarded, not validated or guaranteed by this contract. The organization safety prompt, if configured, is prepended to system content.
model*stringPublic model ID from the model catalog.
1 <= lengthmessages*array<>stream?booleanReturn SSE instead of a JSON completion.
falsestream_options?max_completion_tokens?integerMaximum generated tokens including reasoning; takes precedence over max_tokens for gateway quota accounting.
1 <= valuemax_tokens?integerDeprecatedLegacy output cap.
1 <= valuetemperature?|Sampling temperature. Raon models always use temperature=1.0; a supplied value is replaced. Other providers use their own parameter behavior.
0 <= value <= 2top_p?|Nucleus sampling probability. Raon models always use top_p=0.95; a supplied value is replaced. Other providers use their own parameter behavior.
0 <= value <= 1top_k?|Top-k sampling cutoff. Raon models always use top_k=20; a supplied value is replaced. Other providers use their own parameter behavior.
min_p?|Minimum relative token probability. Raon models always use min_p=0; a supplied value is replaced. Other providers use their own parameter behavior.
repetition_penalty?|Token repetition penalty. Raon models always use repetition_penalty=1.0; a supplied value is replaced. Other providers use their own parameter behavior.
n?integerNumber of choices. Web search rejects values greater than 1.
1 <= value1stop?|array<string>|One or more stop strings sent to the model server. Generation stops when one is produced. By default, the matching stop string is not included in the returned text.
frequency_penalty?|Token frequency penalty. Raon models always use frequency_penalty=0; a supplied value is replaced. Other providers use their own parameter behavior.
-2 <= value <= 2presence_penalty?|Topic repetition penalty. Raon models accept 0 to 1.5, clamp a value outside that range, and use 1.5 when it is omitted. Other providers use their own parameter behavior.
-2 <= value <= 2seed?integerBackend-dependent deterministic sampling seed.
logprobs?booleanRequest output token log probabilities.
top_logprobs?integerNumber of alternatives per token.
0 <= value <= 20logit_bias?Token ID to logit adjustment.
tools?array<>Client-executed functions. Do not use the name web_search alongside web_search_options.
tool_choice?|Tool-use policy: none disables tool calls, auto lets the model decide, and required requests at least one tool call. An object with type function selects a function by name.
parallel_tool_calls?booleanAllow multiple client tool calls in a turn.
response_format?||Request the answer as text, a JSON object, or JSON constrained by json_schema. Reasoning remains separate. Check the completion status before parsing potentially truncated output.
web_search_options?Enables Raon-run web search. Requires n = 1 and no caller function named web_search. A disabled search service or organization policy returns 400 unsupported_tool.
store?booleanAccepted, but any supplied value is overwritten with false. Raon provides no stored-completion retrieval.
falsemetadata?Caller metadata passed to the serving backend; this does not enable response storage.
user?stringCaller identifier passed through to the backend.
reasoning_effort?stringHow long Raon thinks before it answers: none, low, medium, high, xhigh or max. high applies when the field is omitted or null; none turns thinking off and max thinks longest. Values match ignoring case and surrounding spaces. A level outside the model's allowed list returns 400 invalid_request_error naming the field.
chat_template_kwargs?Serving template options. Raon reasons by default on all three inference APIs.
Generated output as JSON, or server-sent events when stream is true. Additional backend fields may be returned.
- response
Ordinary responses are forwarded from the serving backend. Hosted web search reports the usage of its last internal turn, which already holds the whole conversation and every search result, and can attach URL citations.
id*stringobject*stringcreated*integerUnix timestamp in seconds.
model*stringThe model ID the request named, exactly as sent: an alias stays the alias. The serving backend's own model ID is not shown. Streamed chunks and events name the same ID.
1 <= lengthchoices*array<>usage?system_fingerprint?string|nullcurl -X POST 'https://raon-api.krafton.ai/v1/chat/completions' \ -H 'Content-Type: application/json' \ -d '{ "model": "raon-1-mini", "messages": [ { "role": "user", "content": "Explain why the sky is blue." } ], "max_completion_tokens": 1024}'{ "id": "string", "object": "chat.completion", "created": 0, "model": "raon-1-mini", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "string", "reasoning": "string", "tool_calls": [ { "id": "string", "type": "function", "function": { "name": "string", "arguments": "string" } } ], "refusal": "string", "annotations": [ { "type": "url_citation", "url_citation": { "start_index": 0, "end_index": 0, "title": "string", "url": "string" } } ] }, "finish_reason": "stop", "logprobs": {} } ], "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0 } }, "system_fingerprint": "string"}
