LM0
Getting Started

Quickstart

Make your first request to LM0 in under a minute.

This guide gets you from zero to a streamed or non-streamed completion using the public gateway.

Prerequisites

  • An LM0 API key (from the console or admin provisioning)
  • curl, or the official OpenAI / Anthropic SDKs

Base URL:

Text 2 lines
https://api.17.wtf

OpenAI-compatible chat

Bash 10 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": "user", "content": "Say hello in one sentence." }
    ]
  }'

With the OpenAI Python SDK:

Python 13 lines
from openai import OpenAI

client = OpenAI(
    api_key="lm0_...",
    base_url="https://api.17.wtf/v1",
)

resp = client.chat.completions.create(
    model="your-pool/your-model",
    messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(resp.choices[0].message.content)

Anthropic-compatible messages

Bash 12 lines
curl https://api.17.wtf/v1/messages \
  -H "x-api-key: $LM0_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-pool/your-model",
    "max_tokens": 256,
    "messages": [
      { "role": "user", "content": "Say hello in one sentence." }
    ]
  }'

OpenAI Responses API

Bash 8 lines
curl https://api.17.wtf/v1/responses \
  -H "Authorization: Bearer $LM0_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-pool/your-model",
    "input": "Say hello in one sentence."
  }'

Model IDs

LM0 model IDs typically follow a pool/model form (for example main/gpt-4o). List what you can access:

Bash 3 lines
curl https://api.17.wtf/v1/models \
  -H "Authorization: Bearer $LM0_API_KEY"
Tip

For Anthropic-shaped model lists, send anthropic-version: 2023-06-01 on GET /v1/models.

LM0 · Documentation for every model you ship

api.17.wtf