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:

TierRate LimitFeatures
FREE1000 requests/hourHigher limits, Custom Dashboard
BASIC2000 requests/hour individualHigher limits, Custom Dashboard
PRO5000 requests/hour individualHigher limits, advanced features
ENTERPRISE20000Custom limits, priority support

API Key Usage

To use your API key, include it in the X-API-Key header of your requests:

HTTP
1X-API-Key: your_api_key_here

API Key Security

Keep your API key secure:

  1. Never share your API key in public repositories or client-side code
  2. Use environment variables to store your API key
  3. Rotate your API key if you suspect it has been compromised
  4. Use the minimum tier required for your application