Chat

Create chat completion

Generate a chat response from a model. OpenAI-compatible format. Supports streaming, tool calling, structured outputs, and prompt caching.

post/chat/completions

Request

  • Base URL: https://kymaapi.com/v1
  • URL: https://kymaapi.com/v1/chat/completions
  • Auth: HTTP bearer

Request body

modelstring required

Model ID or alias. Aliases: best, fast, code, cheap, long-context, vision, reasoning, agent, balanced

temperaturenumber

Sampling temperature. Lower = more focused, higher = more creative

max_tokensinteger

Maximum tokens to generate. Default 4096. Forwarded directly to model with no gateway cap

streamboolean

Stream response as server-sent events

top_pnumber

Nucleus sampling parameter

toolsobject[]

List of tools/functions the model can call. Supported on 15/16 models

Example request

{
  "model": "qwen-3.6-plus"
}

Response

Chat completion response

idstring required
object'chat.completion' required
createdinteger required
modelstring required

Actual model used

Changes

No recorded changes to this operation across all 1 revision of this API.