API reference
Overview & authentication
Relumen routes requests through the format supported by your key's group. Choose a matching key, copy the model's exact call name from Model Plaza, and set the base URL below.
At a glance
| Key format | Base URL | Authentication | Request format |
|---|---|---|---|
| Anthropic · yellow | https://relumen.ai | x-api-key: YOUR_API_KEY | Messages |
| OpenAI-compatible · green | https://relumen.ai/v1 | Authorization: Bearer YOUR_API_KEY | Chat Completions, Responses, Images |
| Gemini · blue | https://relumen.ai | x-goog-api-key: YOUR_API_KEY | Use the Gemini route shown for your key in the console. |
The color matches the key's protocol on the API Keys page. Confirm the model is available to the selected group, the request uses its API protocol, and the account has sufficient balance before making a request.
Base URL or full endpoint?
Use the base URL when an SDK or client appends its own endpoint. Use the full endpoint only when the client explicitly asks for one. Avoid duplicated paths such as /v1/v1.
Authenticate a request
Create a key in Console → API Keys. Store it securely and replace YOUR_API_KEY in the examples. The examples also use YOUR_MODEL_ID; replace it with an exact, currently available model name for your group.
Anthropic
x-api-key: YOUR_API_KEY
anthropic-version: 2023-06-01
content-type: application/jsonOpenAI-compatible
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonGemini
x-goog-api-key: YOUR_API_KEY
Content-Type: application/jsonKeep keys out of client-side code, screenshots, logs, and public repositories. Use separate keys for separate applications so you can revoke them independently.
Choose an endpoint
| Endpoint | Use it for |
|---|---|
POST /v1/messages | Anthropic-format conversations with supported Claude models. |
POST /v1/chat/completions | OpenAI-compatible chat, including supported GPT and Grok models. |
POST /v1/responses | Responses-format requests, including compatible Codex integrations. |
POST /v1/images/generations | Supported image-generation models. |
For Gemini, use the route and model specified by the console. The exact path depends on the model and API operation.
Check a failed request
Verify the key format, model name, selected group, and remaining account balance. Review Usage Records for the request time, model, tokens, and charge. See Errors & troubleshooting for the next steps.
Need client instructions? Go to Connect a tool or email [email protected].