Authentication

Learn how to authenticate with the AskVerdict API using API keys, and how to pass BYOK provider keys.

2 min read
Share

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

  1. Go to the Developer Portal → API Keys
  2. Click Create Key
  3. Name your key (e.g., "production", "staging")
  4. Copy the key immediately — it's only shown once

Using Your Key

Pass the API key in the Authorization header:

bash
curl https://api.askverdict.ai/v1/me \
  -H "Authorization: Bearer vrd_your_api_key"

Alternatively, use the X-Api-Key header:

bash
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:

HeaderDescription
X-RateLimit-LimitRequests allowed per window
X-RateLimit-RemainingRequests remaining
X-RateLimit-ResetUnix 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:

bash
X-Provider-Keys: openai:sk-abc123,anthropic:sk-ant-xyz

Supported Providers

ProviderKey PrefixExample
OpenAIsk-openai:sk-abc123...
Anthropicsk-ant-anthropic:sk-ant-xyz789...
GoogleAIgoogle:AIzaSy...

Example Request

bash
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

Was this page helpful?