LM0
API Reference API

Chat Completions

OpenAI-compatible chat completions on POST /v1/chat/completions.

The primary OpenAI SDK-compatible generation endpoint.

Endpoint

HTTP 2 lines
POST /v1/chat/completions

Authentication

HTTP 2 lines
Authorization: Bearer <api-key>

Example

Bash 12 lines
curl https://api.17.wtf/v1/chat/completions \
  -H "Authorization: Bearer $LM0_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-pool/your-model",
    "messages": [
      { "role": "system", "content": "You are a concise assistant." },
      { "role": "user", "content": "Summarize HTTP 429 in one line." }
    ],
    "temperature": 0.2
  }'

Streaming

Set "stream": true to receive SSE chunks in the OpenAI chat format. See Streaming.

JSON 6 lines
{
  "model": "your-pool/your-model",
  "stream": true,
  "messages": [{ "role": "user", "content": "Count to five." }]
}

Capabilities

Depending on the upstream target, chat completions may support:

  • Text input / output
  • Vision / image inputs
  • Tool / function calling
  • Reasoning / thinking translation where upstream exposes it

Not every OpenAI field is implemented. See Compatibility for gaps.

Maintenance

This endpoint is subject to maintenance pause. When the API is paused for generation, requests fail until pause is lifted. Model listing remains available.

LM0 · Documentation for every model you ship

api.17.wtf