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

ClientBase URL
OpenAI SDKs and most toolshttps://api.llm-hub.dev/v1
Anthropic SDK and Claude Codehttps://api.llm-hub.dev (without /v1)
Gemini-style image requestshttps://api.llm-hub.dev/v1beta

Auth headers

HeaderWhere it works
Authorization: Bearer YOUR_KEYAll endpoints
x-api-key: YOUR_KEYChat 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