Getting started

Connect your backend

Use the key supplied for each provider. Keep keys in backend environment variables, not browser code or a public repository. OpenAI Chat Completions and Responses share an OpenAI key.

OpenAI
Base URL: https://proxy.litechat.ai/openai/v1
Model: gpt-5.6-luna
Header: Authorization: Bearer YOUR_OPENAI_KEY
Anthropic
Base URL: https://proxy.litechat.ai/anthropic
Model: claude-haiku-4-5-20251001
Header: x-api-key: YOUR_ANTHROPIC_KEY
Google Gemini
Base URL: https://proxy.litechat.ai/google
Model: gemini-3.8-flash
Header: x-goog-api-key: YOUR_GOOGLE_KEY

Choose an interface

Request basics

Send JSON from your backend with Content-Type: application/json. The examples use curl and environment variables for keys. A normal request returns a whole JSON response; the provider pages also describe how to request a stream.

Keep conversation history in your app and include it in subsequent requests. Check the finish reason or response status before treating an answer as complete. Token limits can stop an answer early. Tool calls request an action from your backend; the service does not execute your functions.

Request errors
400: correct the request. 401/403: check the key, its provider, and its expiry. 429: reduce overlapping requests and use a bounded delay.
Service errors
502/504: the upstream request failed. For 503 or persistent failures, contact the administrator. Do not automatically retry after partial output arrives. Usage can be unknown after a failure.
Images and files
Image inputs and provider file APIs are available. Files are private to an account and provider, and expire after one hour. Uploads are limited to 64 MiB per file, with 100 files and 256 MiB per account/provider. Audio and video generation are not supported.

BUILD LLM Proxy uses DeepSeek Flash for all three provider interfaces. The interfaces do not reproduce the named providers' model behavior. Local endpoint and parameter descriptions define this service; linked provider references give further interface detail.

← Getting startedBack to top ↑