cURL / HTTP

Talk to LLMRPM directly over HTTPS from any language or shell.

Configuration

SettingValue
API shapeEither
Base URLhttps://llmrpm.com/api/v1
AuthAuthorization: Bearer llmrpm_...
  • Export LLMRPM_API_KEY in your shell before sending requests.
  • Send Authorization: Bearer $LLMRPM_API_KEY on every request — both wire formats use bearer auth.
  • Use /api/v1/chat/completions for the OpenAI format and /api/v1/messages for the Anthropic format.
  • Add Content-Type: application/json on 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." }
    ]
  }'

Troubleshooting

SymptomCause & fix
Authentication errorCheck that the API key has no extra spaces and has not been revoked in the dashboard.
401 on /api/v1/messagesLLMRPM uses bearer auth for both formats. Send Authorization: Bearer, not x-api-key.
Model rejectedUse a public model ID returned by GET /api/v1/models; do not use display names or aliases.
Connection issueConfirm 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.