Skip to content

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.site

Use the public service URL shown by your deployment when it differs.

Create an API Key ​

  1. Sign in to the website and open the API Key page.
  2. Select Create Key.
  3. Choose the group for the platform and models you want to call.
  4. Configure quota, rate limits, and expiration when needed.
  5. 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.

ClientRequirementGuide
Codex CLI, Codex Desktop, Codex IDE extensionA key whose group supports Responses APIConfigure Codex
Claude Code and its IDE extensionA key whose Use Key dialog shows Claude CodeConfigure Claude Code
CC SwitchA compatible key for the client you plan to configureConfigure CC Switch

Choose an Interface ​

Use caseEndpointNotes
Anthropic MessagesPOST /v1/messagesUse a group that supports Messages.
Token countingPOST /v1/messages/count_tokensNot available to OpenAI groups.
OpenAI ResponsesPOST /v1/responsesRecommended for Responses-compatible clients.
OpenAI Chat CompletionsPOST /v1/chat/completionsFor general OpenAI-compatible clients.
List available modelsGET /v1/modelsReturns models available to the current key.
Query usageGET /v1/usageReturns quota mode and usage statistics.
OpenAI image generationPOST /v1/images/generationsRequires an OpenAI group with image generation enabled.
OpenAI image editingPOST /v1/images/editsSupports multipart uploads and JSON image URLs.
Gemini native generationPOST /v1beta/models/{model}:generateContentRequires 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/models for 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.