API Keys & Usage
Manage your API keys, monitor usage, and handle billing.
API Key Management
List all API keys for the authenticated user. Requires authentication.
[
{
"id": "key_abc123",
"name": "Production",
"key_prefix": "sk-prod...x7f2",
"created_at": "2026-03-15T10:00:00Z",
"last_used_at": "2026-04-04T08:30:00Z",
"revoked": false
}
]
Create a new API key. Requires authentication. Maximum 10 active keys per account.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
string | "Default" |
A descriptive name for the key |
Save your key immediately. The full key value is returned only once at creation time. After this, only the key_prefix is available.
{
"id": "key_def456",
"name": "My Key",
"key": "sk-live-a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"key_prefix": "sk-live...o5p6",
"created_at": "2026-04-04T12:00:00Z"
}
Revoke an API key. The key will immediately stop working. Requires authentication.
| Parameter | In | Description |
|---|---|---|
key_id | path | The key ID to revoke |
{
"status": "ok",
"id": "key_def456"
}
Usage Tracking
Get your current usage and limits. Requires authentication. Only counts requests to /search, /documents, and /resolve.
{
"plan": "free",
"requests_today": 12,
"requests_this_month": 156,
"daily_limit": 20,
"monthly_limit": 600,
"minute_limit": 10,
"daily_history": [
{"date": "2026-04-04", "count": 12},
{"date": "2026-04-03", "count": 18}
]
}
Billing
Manage your subscription through the web interface at /pricing or programmatically via the billing endpoints below.
List available plans with limits and features.
Create a Stripe checkout session to subscribe or upgrade.
| Parameter | Type | Description |
|---|---|---|
plan |
string | "dev" or "pro" |
interval |
string | "monthly" or "yearly" |
{
"checkout_url": "https://checkout.stripe.com/c/pay/cs_live_..."
}
Get a Stripe customer portal URL for managing your subscription, updating payment methods, and viewing invoices.
Get your current plan and subscription details.