Getting Started
This guide covers the shortest path from creating an API key to making a successful LLMAPI request.
Base URL
Examples in this documentation use:
text
https://api.llmapi.siteUse the public service URL shown by your deployment when it differs.
Create an API Key
- Sign in to the website and open the API Key page.
- Select Create Key.
- Choose the group for the platform and models you want to call.
- Configure quota, rate limits, and expiration when needed.
- Submit the form, then copy and store the generated key.
See Create API Keys for group selection and verification details.
Configure Coding Clients
The website's Use Key action generates configuration for the selected key's group, public service URL, and supported client. Prefer the generated configuration over hard-coded examples.
| Client | Requirement | Guide |
|---|---|---|
| Codex CLI, Codex Desktop, Codex IDE extension | A key whose group supports Responses API | Configure Codex |
| Claude Code and its IDE extension | A key whose Use Key dialog shows Claude Code | Configure Claude Code |
| CC Switch | A compatible key for the client you plan to configure | Configure CC Switch |
Choose an Interface
| Use case | Endpoint | Notes |
|---|---|---|
| Anthropic Messages | POST /v1/messages | Use a group that supports Messages. |
| Token counting | POST /v1/messages/count_tokens | Not available to OpenAI groups. |
| OpenAI Responses | POST /v1/responses | Recommended for Responses-compatible clients. |
| OpenAI Chat Completions | POST /v1/chat/completions | For general OpenAI-compatible clients. |
| List available models | GET /v1/models | Returns models available to the current key. |
| Query usage | GET /v1/usage | Returns quota mode and usage statistics. |
| OpenAI image generation | POST /v1/images/generations | Requires an OpenAI group with image generation enabled. |
| OpenAI image editing | POST /v1/images/edits | Supports multipart uploads and JSON image URLs. |
| Gemini native generation | POST /v1beta/models/{model}:generateContent | Requires a Gemini group. |
Verify the Key
First list the models visible to the key:
bash
curl https://api.llmapi.site/v1/models \
-H 'Authorization: Bearer YOUR_API_KEY'Then make a request with a model returned by that key. For example, an Anthropic-compatible group can call Messages:
bash
curl https://api.llmapi.site/v1/messages \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 64,
"messages": [{ "role": "user", "content": "Reply with OK." }]
}'Integration Notes
- API key group binding controls endpoint and model access.
- Use only models returned by
GET /v1/modelsfor the current key. - OpenAI image endpoints require an OpenAI group with image generation enabled.
- Gemini image and multimodal requests use Gemini Native.
- Keep API keys out of source control, screenshots, logs, and client-side code shipped to browsers.