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:
https://api.17.wtf
OpenAI-compatible chat
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:
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
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
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:
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.