Authentication
Learn how to authenticate with the AskVerdict API using API keys, and how to pass BYOK provider keys.
All API requests require authentication via API key. BYOK users also pass provider keys per-request.
API Keys
API keys authenticate your requests to the AskVerdict API. Each key starts with the prefix vrd_.
Creating a Key
- Go to the Developer Portal → API Keys
- Click Create Key
- Name your key (e.g., "production", "staging")
- Copy the key immediately — it's only shown once
Using Your Key
Pass the API key in the Authorization header:
curl https://api.askverdict.ai/v1/me \
-H "Authorization: Bearer vrd_your_api_key"Alternatively, use the X-Api-Key header:
curl https://api.askverdict.ai/v1/me \
-H "X-Api-Key: vrd_your_api_key"Key Security
Never expose API keys in client-side code, public repositories, or browser requests. Use environment variables and server-side proxies.
- Rotate keys regularly via the Developer Portal
- Use separate keys for development and production
- Revoke compromised keys immediately
Rate Limits
Each API key has a rate limit (default: 60 requests/minute). Rate limit info is included in response headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Requests allowed per window |
X-RateLimit-Remaining | Requests remaining |
X-RateLimit-Reset | Unix timestamp when the window resets |
When rate limited, the API returns a 429 Too Many Requests response. Implement exponential backoff in your client.
BYOK Provider Keys
BYOK subscribers pass their AI provider keys via the X-Provider-Keys header. Keys are never stored — they're used in-memory only.
Header Format
Pass one or more provider keys, comma-separated:
X-Provider-Keys: openai:sk-abc123,anthropic:sk-ant-xyzSupported Providers
| Provider | Key Prefix | Example |
|---|---|---|
| OpenAI | sk- | openai:sk-abc123... |
| Anthropic | sk-ant- | anthropic:sk-ant-xyz789... |
AI | google:AIzaSy... |
Example Request
curl -X POST https://api.askverdict.ai/v1/verdicts \
-H "Authorization: Bearer vrd_your_api_key" \
-H "X-Provider-Keys: openai:sk-your_openai_key" \
-H "Content-Type: application/json" \
-d '{"question": "Should we adopt Kubernetes?", "mode": "thorough"}'BYOK keys are required for BYOK and BYOK Pro plans. Free and credit-based plans use AskVerdict's shared provider keys.
Next Steps
- API Reference — Full endpoint documentation
- BYOK Setup Guide — Detailed provider key configuration
- Error Handling — Error codes and retry strategies
Was this page helpful?