Skip to content
llms.party

Chat completions

POST /v1/chat/completions is the OpenAI chat surface, re-exported by the gateway. If your SDK already speaks OpenAI, only baseURL and the model group change.

Try it

Try a completion

POST /v1/chat/completions

Response

No response yet.

Request

{
  "model": "deepseek-flash",
  "messages": [
    { "role": "system", "content": "You are concise." },
    { "role": "user", "content": "What is an LLM gateway?" }
  ],
  "temperature": 0.7,
  "max_tokens": 1024,
  "stream": false
}
FieldNotes
modelA model group or one of its aliases.
messagesStandard OpenAI roles: system, user, assistant.
temperature0–2; forwarded to the provider.
max_tokensUpper bound on the completion, up to the group's max output.
streamtrue returns SSE chunks; recommended for slow reasoning.
reasoning_effortDeepSeek groups: none, low, high (default), max.

Response

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "...",
        "reasoning_content": "..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 61,
    "total_tokens": 85
  }
}

usage is what the gateway meters against the key's budget. The model field echoes the group you requested; it does not identify the provider or a fallback that served the call.

Streaming

With "stream": true the response is text/event-stream. Each chunk is a data: {...} line; the stream ends with data: [DONE].

curl -N -sS "https://llms.party/v1/chat/completions" \
  -H "Authorization: Bearer $LLMS_PARTY_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "stream": true,
    "messages": [{"role": "user", "content": "Plan a migration in three bullets."}]
  }'

Vision

deepseek-flash accepts images in the standard OpenAI content-part shape:

{
  "model": "deepseek-flash",
  "messages": [
    {
      "role": "user",
      "content": [
        { "type": "text", "text": "What is in this image?" },
        {
          "type": "image_url",
          "image_url": { "url": "https://example.com/chart.png" }
        }
      ]
    }
  ]
}

Reasoning

deepseek-flash and deepseek-v4-pro both run with thinking enabled by default. Set reasoning_effort to control how much work the model does before it answers.

reasoning_effortBehaviour
noneThinking off. Fastest, lowest token count.
lowShort trace. A small latency and token cost.
highDefault. A full trace for most prompts.
maxLongest trace. Use it for hard multi-step problems.

The trace comes back in reasoning_content. Its size is reported in usage.completion_tokens_details.reasoning_tokens, and the tokens count toward the completion and the key's budget.

Response fieldMeaning
choices[].message.reasoning_contentThe model's thinking trace, when thinking is on.
usage.completion_tokens_details.reasoning_tokensTokens spent on the trace.