OpenAI-Compatible API

Use one OpenAI-compatible API endpoint

LivRouter exposes an OpenAI-compatible API at https://api.livrouter.com/v1. Keep a compatible client, set the base URL and LivRouter API key, then select an exact model ID from the current catalog.

Maintained by LivRouter. Reviewed . Prices and availability can change; verify the live catalog before deployment.

Connection settings

Base URL
https://api.livrouter.com/v1
Authentication
Authorization: Bearer YOUR_API_KEY
Chat endpoint
POST /chat/completions
Model
Use the exact current catalog ID.
curl https://api.livrouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LIVROUTER_API_KEY" \
  -d '{
    "model": "YOUR_MODEL_ID",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

A successful request returns an OpenAI-style completion response. Read the assistant message from choices[0].message.content. Keep the API key on your server; do not embed it in browser code.

Create or manage an API key

Compatibility depends on the feature

OpenAI-compatible chat requests do not guarantee every provider-specific feature works identically. Check the selected model's supported capabilities and test tool calls, JSON output, streaming, context limits, and error handling in your own client.

Common setup errors

  • 401: verify the bearer key and that it is active.
  • 404: include the /v1 base path and use /chat/completions.
  • Model not found: copy the exact current model ID from the catalog.
  • 429: check available credits and rate limits; retry transient failures with backoff.