API Keys
API keys are used to authenticate requests to the SplitRoute API. This document describes the endpoints for managing API keys.
Endpoints
Register for a Free API Key
Register for a free API key.
Endpoint: POST /api/v1/api-keys/register
Authentication: None
Request Body:
JSON
1 { 2 "email": "[email protected]", 3 "name": "your.key.name" 4 }
Response:
JSON
1 { 2 "key": "SR_SECRET_d069a1d9a53ff1a77296d0223eb000ac", 3 "name": "your.key.name", 4 "tier": "FREE", 5 "status": "ACTIVE", 6 "rate_limit_per_hour": 1000, 7 "remaining_invoices": -1, 8 "created_at": "2025-03-25T19:06:33.107954Z", 9 "expires_at": "2124-03-01T19:06:33.107943Z", 10 "is_active": true 11 }
Purchase a Paid API Key
Purchase a paid API key tier.
Endpoint: POST /api/v1/api-keys/purchase
Authentication: API Key
Request Body:
JSON
1 { 2 "tier": "BASIC", 3 "billing_period": "monthly" 4 }
Allowed Values:
-
tier
: {"BASIC"
|"PRO"
|"ENTERPRISE"
} -
billing_period
: {"monthly"
|"annual"
}
Response: An invoice object will be returned that you can pay to upgrade your API key.
API Key Tiers
SplitRoute offers different API key tiers with varying rate limits and features. For detailed information about API key tiers, see the Authentication documentation.
API Key Usage
To use your API key, include it in the X-API-Key
header of your requests:
HTTP
1 X-API-Key: your_api_key_here
API Key Security
Keep your API key secure:
- Never share your API key in public repositories or client-side code
- Use environment variables to store your API key
- Rotate your API key if you suspect it has been compromised
- Use the minimum tier required for your application