Skip to main content
All requests authenticate with an API key sent as a bearer token in the Authorization header.

Get an API key

1

Create an account

Sign up at redpill.ai.
2

Generate a key

In the dashboard, create an API key.
3

Add credits

Add credits to start making requests.

Use the key

Store the key in an environment variable, then send it as a bearer token:
export API_KEY="your-api-key"

curl https://api.redpill.ai/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen/qwen3-30b-a3b-instruct-2507", "messages": [{"role": "user", "content": "Hello"}]}'

Keep keys safe

  • Read the key from an environment variable or a secret manager. Never hardcode it in source.
  • Add .env files to .gitignore.
  • Use separate keys for development and production, and revoke a key in the dashboard if it is exposed.
  • Call the API from your backend, not from browser or mobile client code.

Errors

A missing or invalid key returns an authentication error:
{
  "error": {
    "message": "Invalid API key provided",
    "type": "invalid_request_error",
    "code": "invalid_api_key"
  }
}
See Error handling for the full list.

FAQ

No, you need a key from this platform. The API works with OpenAI client libraries, so you keep the same SDKs and code: just change the API key and base URL.
Check your balance, usage, and current rate limits in the dashboard.