LLM Gateway

Chat Completions

Create a completion for the chat conversation

POST
/v1/chat/completions
AuthorizationBearer <token>

Bearer token authentication using API keys

In: header

modelstring
messagesarray<object>
temperature?number | null
max_tokens?number | null
top_p?number | null
frequency_penalty?number | null
presence_penalty?number | null
response_format?object
stream?boolean
Defaultfalse
tools?array<object>
tool_choice?string & object
reasoning_effort?string | null

Controls the reasoning effort for reasoning-capable models

Value in"low" | "medium" | "high"

Response Body

{
  "id": "string",
  "object": "string",
  "created": 0,
  "model": "string",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "string",
        "content": "string",
        "reasoning_content": "string",
        "tool_calls": [
          {
            "id": "string",
            "type": "function",
            "function": {
              "name": "string",
              "arguments": "string"
            }
          }
        ]
      },
      "finish_reason": "string"
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "total_tokens": 0,
    "reasoning_tokens": 0,
    "prompt_tokens_details": {
      "cached_tokens": 0
    }
  }
}
{
  "error": {
    "message": "string",
    "type": "string",
    "param": "string",
    "code": "string"
  }
}