cURL / HTTP
Talk to LLMRPM directly over HTTPS from any language or shell.
Configuration
| Setting | Value |
|---|---|
| API shape | Either |
| Base URL | https://llmrpm.com/api/v1 |
| Auth | Authorization: Bearer llmrpm_... |
- Export
LLMRPM_API_KEYin your shell before sending requests. - Send
Authorization: Bearer $LLMRPM_API_KEYon every request — both wire formats use bearer auth. - Use
/api/v1/chat/completionsfor the OpenAI format and/api/v1/messagesfor the Anthropic format. - Add
Content-Type: application/jsonon every POST request.
Example
Shell — env
export LLMRPM_API_KEY="llmrpm_YOUR_KEY"
export LLMRPM_BASE_URL="https://llmrpm.com/api/v1"cURL — chat completions
curl https://llmrpm.com/api/v1/chat/completions \
-H "Authorization: Bearer $LLMRPM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{ "role": "system", "content": "You are a concise release assistant." },
{ "role": "user", "content": "Write three product taglines." }
],
"stream": false,
"max_tokens": 400
}'cURL — messages
curl https://llmrpm.com/api/v1/messages \
-H "Authorization: Bearer $LLMRPM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 400,
"messages": [
{ "role": "user", "content": "Draft a deployment checklist." }
]
}'Recommended models
Any public ID from the model list works. Common picks:
claude-sonnet-5— strong model for reasoning, refactors, and coding agents.claude-haiku-4.5— fast option for autocomplete, small questions, and lightweight tasks.deepseek-v4-pro— alternative based on your active catalog and plan.
Troubleshooting
| Symptom | Cause & fix |
|---|---|
| Authentication error | Check that the API key has no extra spaces and has not been revoked in the dashboard. |
| 401 on /api/v1/messages | LLMRPM uses bearer auth for both formats. Send Authorization: Bearer, not x-api-key. |
| Model rejected | Use a public model ID returned by GET /api/v1/models; do not use display names or aliases. |
| Connection issue | Confirm the configured base URL is exactly the one shown above and that your network allows HTTPS to llmrpm.com. |
Notes
- Both endpoints live under the same /api/v1 path and share one key.
- For streaming, set "stream": true and read the server-sent event lines.