Getting started
Authentication and base URLs
Every request is authenticated with your LLMHub API key. The same key works for the OpenAI, Anthropic, and Gemini-compatible endpoints.
Base URLs
| Client | Base URL |
|---|---|
| OpenAI SDKs and most tools | https://api.llm-hub.dev/v1 |
| Anthropic SDK and Claude Code | https://api.llm-hub.dev (without /v1) |
| Gemini-style image requests | https://api.llm-hub.dev/v1beta |
Auth headers
| Header | Where it works |
|---|---|
Authorization: Bearer YOUR_KEY | All endpoints |
x-api-key: YOUR_KEY | Chat Completions, Responses, Anthropic Messages, Models |
x-goog-api-key: YOUR_KEY | /v1beta/models/{model}:generateContent |
Use only your LLMHub key. Do not send upstream provider credentials — LLMHub never needs them.
Key budget
Each key has a spending budget. When it is used up, requests return HTTP 402. Check the remaining amount with Key balance.
Last updated
