API Keys
All API requests require a Bearer token in the Authorization header.
Authorization: Bearer rapi_live_YOUR_API_KEY
API keys are prefixed with rapi_live_ and are generated when you create your account or from the dashboard.
Getting your API key
- Sign up or log in
- Navigate to your dashboard
- Your API key is displayed in the API settings section
Keep your API key secret. Don’t commit it to version control or expose it in client-side code. Use environment variables instead.
Example request
curl https://api.rapportapi.com/research/TASK_ID \
-H "Authorization: Bearer rapi_live_a1b2c3d4e5f6..."
Error responses
| Status | Error | Cause |
|---|
401 | Missing Authorization header | No Authorization header in request |
401 | Invalid API key format | Key doesn’t start with rapi_live_ |
401 | Invalid or inactive API key | Key not found or has been revoked |
402 | Insufficient credits | Account has no remaining credits |
Example error response:
{
"detail": "Insufficient credits. Please purchase more at rapportapi.com.",
"status_code": 402
}
Security best practices
- Store API keys in environment variables, never in code
- Rotate keys periodically from the dashboard
- Use separate keys for development and production if needed
- Monitor your usage in the dashboard to detect unexpected activity