Skip to content
llms.party

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

MethodPathPurpose
GET/v1/modelsList the model groups this key can call.
GET/v1/usageBudget, spend and model access for the calling key.
POST/v1/chat/completionsChat completions, with optional streaming and images.
POST/v1/videosCreate a MiniMax H3 or BytePlus Seedance job.
GET/v1/videos/{id}Poll a video job.
GET/v1/videos/{id}/contentDownload the finished clip.
GET/health/livenessProcess liveness probe.
GET/health/readinessReadiness probe, including database connectivity.

GET /v1/models

curl -sS "https://llms.party/v1/models" \
  -H "Authorization: Bearer $LLMS_PARTY_KEY"
{
  "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
  }'
{
  "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"
  }'
{
  "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"
{
  "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.mp4

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"
  }
}
StatusMeaning
401Missing, malformed or revoked key, or the key lacks this model group.
422Validation failed, or the key is over budget.
429Key or upstream rate limit.
500Internal proxy error.
502 / 503Upstream provider error or no healthy upstream.
504Upstream timed out.

See Errors & limits for retries, budgets and fallback behaviour.