Skip to main content

Creating an API Key

Go to routerbase.com/api-key to create and manage your keys. Each key is displayed only once at creation time. Store it immediately in a secrets manager or environment variable. API keys follow the format:
sk-t0-<public_id>-<secret>

Using Your API Key

Include it as a Bearer token in every request:
Authorization: Bearer sk-t0-xxxxxxxxxxxx
Content-Type: application/json
curl -X POST https://routerbase.kuaibaike.com/api/v1/run/video_generate.kling_2_6 \
  -H "Authorization: Bearer sk-t0-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A cat walking in the rain"}'

Key Settings

Each API key supports optional restrictions:
SettingDescription
Rate limit (RPM)Max requests per minute
Rate limit (TPH)Max requests per hour
Rate limit (TPD)Max requests per day
IP whitelistUp to 10 allowed IP addresses (IPv4, 4-segment format)
Configure these settings from the API key management page or via the API Keys endpoint.

Security Best Practices

Never embed your API key in frontend code, browser JavaScript, or mobile apps. Anyone who sees your key can use your credits.
  • Store keys in environment variables or a secrets manager (e.g. AWS Secrets Manager, Vault)
  • Use IP whitelisting to restrict keys to your server IPs
  • Set daily credit limits to cap accidental overspend
  • Rotate keys regularly and delete unused ones