Base URL: https://api.gatekey.dev
All endpoints require authentication via Bearer token.
/v1/queryExecute a query against any data provider.
{
"provider": "string", // Required. Provider slug (e.g., "sec-edgar")
"endpoint": "string", // Required. Provider endpoint path
"params": { // Optional. Query parameters
"key": "value"
}
}{
"data": { ... }, // Provider-specific response
"meta": {
"request_id": "string",
"provider": "string",
"endpoint": "string",
"tokens_used": 1234,
"latency_ms": 250
}
}curl -X POST https://api.gatekey.dev/v1/query \
-H "Authorization: Bearer gk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"provider": "sec-edgar",
"endpoint": "/search-index",
"params": { "q": "tesla 10-K" }
}'/v1/providersList all available data providers.
{
"data": [
{
"slug": "sec-edgar",
"name": "SEC EDGAR",
"description": "...",
"category": "financial",
"endpoints": [
{
"path": "/search-index",
"method": "GET",
"description": "Search SEC filings",
"params_schema": { ... }
}
]
}
]
}curl https://api.gatekey.dev/v1/providers \ -H "Authorization: Bearer gk_live_xxx"
/v1/usageGet usage statistics for your account.
| Parameter | Type | Description |
|---|---|---|
| start_date | string | Start date (YYYY-MM-DD) |
| end_date | string | End date (YYYY-MM-DD) |
| group_by | string | day, week, month, or provider |
{
"data": {
"period": {
"start_date": "2024-01-01",
"end_date": "2024-01-31"
},
"totals": {
"tokens": 125000,
"requests": 450,
"cost_cents": 0
},
"current_month": {
"tokens_used": 45000,
"tokens_remaining": 55000,
"monthly_limit": 100000
},
"breakdown": [
{ "date": "2024-01-15", "tokens": 5000, "requests": 20 }
]
}
}/v1/usage/currentGet current billing period usage summary.
{
"data": {
"period": "2024-01",
"total_tokens": 45000,
"monthly_token_limit": 100000,
"tokens_remaining": 55000,
"current_rpm": 12,
"rpm_limit": 60
}
}/v1/healthCheck API health status. No authentication required.
{
"status": "healthy",
"version": "0.1.0",
"timestamp": "2024-01-15T12:00:00Z"
}| Status | Description |
|---|---|
| 200 | Success |
| 400 | Bad request (invalid parameters) |
| 401 | Unauthorized (invalid or missing API key) |
| 404 | Not found (provider or endpoint doesn't exist) |
| 422 | Validation failed (invalid params for endpoint) |
| 429 | Rate limit exceeded |
| 502 | Bad gateway (provider error) |
| 503 | Service unavailable (circuit breaker open) |
| 504 | Gateway timeout (provider took too long) |