Pre-launchAPI access is by invitation. Prices shown are estimates.Request access →
Contact sales
ModelsPricingDedicatedDocsEnterpriseContact sales
API reference

Docs / API reference

POST /v1/chat/completions

Request and response reference for Chat Completions.

View .md
POST https://api.kurrens.ai/v1/chat/completions
Authorization: Bearer <KURRENS_API_KEY>
Content-Type: application/json

Request body

Field Type Required Description
model string ✓ Model id, e.g. deepseek-ai/DeepSeek-V4.1-Flash
messages array ✓ Conversation so far: system/developer, user, assistant, tool messages
max_tokens integer Max tokens to generate (includes reasoning tokens)
temperature number Sampling temperature
top_p number Nucleus sampling
stop string | string[] Up to 4 stop sequences
stream boolean Stream server-sent events
stream_options object { "include_usage": true }
tools array Function definitions
tool_choice string | object auto, none, required, or a named function
response_format object json_object or json_schema
reasoning_effort string low, medium, high on reasoning models
seed integer Best-effort determinism
service_tier string priority or flex where offered

Per-model support and ranges are declared in models.json.

Response

{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "created": 1790640000,
  "model": "deepseek-ai/DeepSeek-V4.1-Flash",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "…" },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 31,
    "total_tokens": 55,
    "prompt_tokens_details": { "cached_tokens": 0 },
    "completion_tokens_details": { "reasoning_tokens": 0 }
  }
}

finish_reason is one of stop, length, tool_calls, or content_filter.

Errors are described in Errors.

    Type to search titles, headings, and page text.

    ↑↓ to move · ↵ to open