API reference
The gateway is an OpenAI-compatible HTTP API. Send requests to
https://llms.party/v1 with an API key as a bearer token.
export LLMS_PARTY_KEY="sk-..."Endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /v1/models | List the model groups this key can call. |
GET | /v1/usage | Budget, spend and model access for the calling key. |
POST | /v1/chat/completions | Chat completions, with optional streaming and images. |
POST | /v1/videos | Create a MiniMax H3 or BytePlus Seedance job. |
GET | /v1/videos/{id} | Poll a video job. |
GET | /v1/videos/{id}/content | Download the finished clip. |
GET | /health/liveness | Process liveness probe. |
GET | /health/readiness | Readiness probe, including database connectivity. |
GET /v1/models
curl -sS "https://llms.party/v1/models" \
-H "Authorization: Bearer $LLMS_PARTY_KEY"const response = await fetch('https://llms.party/v1/models', {
headers: { authorization: `Bearer ${process.env.LLMS_PARTY_KEY}` },
});
const { data } = await response.json();
console.log(data);import os
import requests
response = requests.get(
"https://llms.party/v1/models",
headers={"Authorization": f"Bearer {os.environ['LLMS_PARTY_KEY']}"},
timeout=30,
)
print(response.json()["data"]){
"data": [
{
"id": "deepseek-flash",
"object": "model",
"owned_by": "openai",
"mode": "chat",
"max_input_tokens": 1048576,
"max_output_tokens": 393216
}
]
}The list depends on the key and deployment. A group missing from data is not
available to that key. owned_by is LiteLLM's OpenAI-compatible placeholder;
use id for routing and the models guide for the provider mapping.
POST /v1/chat/completions
curl -sS "https://llms.party/v1/chat/completions" \
-H "Authorization: Bearer $LLMS_PARTY_KEY" \
-H "content-type: application/json" \
-d '{
"model": "deepseek-flash",
"messages": [
{ "role": "system", "content": "You are concise." },
{ "role": "user", "content": "What is an LLM gateway?" }
],
"temperature": 0.7,
"max_tokens": 1024
}'const response = await fetch('https://llms.party/v1/chat/completions', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.LLMS_PARTY_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'deepseek-flash',
messages: [
{ role: 'system', content: 'You are concise.' },
{ role: 'user', content: 'What is an LLM gateway?' },
],
temperature: 0.7,
max_tokens: 1024,
}),
});
const completion = await response.json();
console.log(completion.choices[0]?.message.content);import os
import requests
response = requests.post(
"https://llms.party/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['LLMS_PARTY_KEY']}"},
json={
"model": "deepseek-flash",
"messages": [
{"role": "system", "content": "You are concise."},
{"role": "user", "content": "What is an LLM gateway?"},
],
"temperature": 0.7,
"max_tokens": 1024,
},
timeout=300,
)
completion = response.json()
print(completion["choices"][0]["message"]["content"]){
"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
}
}Set "stream": true to receive text/event-stream chunks ending in
data: [DONE]. The model field echoes the group you requested. See
Chat completions for streaming, vision and reasoning controls.
POST /v1/videos
curl -sS "https://llms.party/v1/videos" \
-H "Authorization: Bearer $LLMS_PARTY_KEY" \
-H "content-type: application/json" \
-d '{
"model": "minimax-h3",
"prompt": "A glass city at sunset, slow aerial push-in.",
"seconds": 4,
"resolution": "768P",
"ratio": "16:9"
}'const response = await fetch('https://llms.party/v1/videos', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.LLMS_PARTY_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'minimax-h3',
prompt: 'A glass city at sunset, slow aerial push-in.',
seconds: 4,
resolution: '768P',
ratio: '16:9',
}),
});
const job = await response.json();
console.log(job.id, job.status);import os
import requests
response = requests.post(
"https://llms.party/v1/videos",
headers={"Authorization": f"Bearer {os.environ['LLMS_PARTY_KEY']}"},
json={
"model": "minimax-h3",
"prompt": "A glass city at sunset, slow aerial push-in.",
"seconds": 4,
"resolution": "768P",
"ratio": "16:9",
},
timeout=60,
)
job = response.json()
print(job["id"], job["status"]){
"id": "video_...",
"object": "video",
"model": "minimax-h3",
"status": "queued",
"progress": 0,
"created_at": 1760000000
}For Seedance, use "model": "seedance" with lowercase resolutions
(480p, 720p, 1080p) and an optional input_reference image URL. See
Video generation for the group-specific limits and pricing.
GET /v1/videos/{id}
curl -sS "https://llms.party/v1/videos/$VIDEO_ID" \
-H "Authorization: Bearer $LLMS_PARTY_KEY"const videoId = 'video_...';
const response = await fetch(`https://llms.party/v1/videos/${videoId}`, {
headers: { authorization: `Bearer ${process.env.LLMS_PARTY_KEY}` },
});
console.log(await response.json());import os
import requests
video_id = "video_..."
response = requests.get(
f"https://llms.party/v1/videos/{video_id}",
headers={"Authorization": f"Bearer {os.environ['LLMS_PARTY_KEY']}"},
timeout=30,
)
print(response.json()){
"id": "video_...",
"object": "video",
"model": "minimax-h3",
"status": "completed",
"progress": 100,
"created_at": 1760000000,
"completed_at": 1760000060,
"seconds": "4",
"size": "1366x768"
}Statuses are queued, in_progress, completed, failed and cancelled.
Terminal states are completed, failed and cancelled.
GET /v1/videos/{id}/content
curl -sS "https://llms.party/v1/videos/$VIDEO_ID/content" \
-H "Authorization: Bearer $LLMS_PARTY_KEY" \
-o clip.mp4import { writeFile } from 'node:fs/promises';
const videoId = 'video_...';
const response = await fetch(
`https://llms.party/v1/videos/${videoId}/content`,
{ headers: { authorization: `Bearer ${process.env.LLMS_PARTY_KEY}` } },
);
const clip = Buffer.from(await response.arrayBuffer());
await writeFile('clip.mp4', clip);import os
import requests
video_id = "video_..."
response = requests.get(
f"https://llms.party/v1/videos/{video_id}/content",
headers={"Authorization": f"Bearer {os.environ['LLMS_PARTY_KEY']}"},
timeout=300,
)
with open("clip.mp4", "wb") as clip:
clip.write(response.content)The response is video/mp4. Range requests are supported; send a Range
header to resume or slice a download. Task records are kept for 7 days.
Errors
Errors use the OpenAI error object:
{
"error": {
"message": "Invalid proxy server token passed.",
"type": "auth_error",
"code": "invalid_api_key"
}
}| Status | Meaning |
|---|---|
401 | Missing, malformed or revoked key, or the key lacks this model group. |
422 | Validation failed, or the key is over budget. |
429 | Key or upstream rate limit. |
500 | Internal proxy error. |
502 / 503 | Upstream provider error or no healthy upstream. |
504 | Upstream timed out. |
See Errors & limits for retries, budgets and fallback behaviour.