AI Studio
Create
ImageVideoCanvasExplore
Experts
Overview
DocsAPI KeysDiscord
Documentation
Documentation
IntroductionWhy Router9

Studio

Using Studio

For Developers

Quick StartInstall MCP Server

Integrations

Token Plan

API Reference

AuthenticationChat CompletionsModelsRate LimitingErrors

Tools

Audio ToolImage ToolTool Usage & Credits
API Reference

Authentication

How to authenticate with the Router9 API

API Keys

Every request to the Router9 API must include a valid API key. Keys are scoped to a specific Token Plan and carry all associated quotas and permissions.

Key Format

sk-r9k-<48-character-hex-string>

Passing Your Key

Authorization header (recommended):

Authorization: Bearer sk-r9k-your-key-here

x-api-key header (alternative):

x-api-key: sk-r9k-your-key-here

Both methods are fully supported. The x-api-key header is useful for tools that don't support the Authorization: Bearer format.

Managing API Keys

View Your Key

Go to Keys under Studio's API section (/connect/keys). For security, only the key hint (last 4 characters) is displayed after initial creation.

Regenerate a Key

Click Regenerate Key in the API Keys tab. This immediately invalidates the previous key and generates a new one.

The full key is displayed only once after regeneration. Copy it immediately.

Key Limits

A Token Plan can have multiple active API keys — create one per harness or environment. The cap scales with your tier: 5 on Free, 10 on Pro, unlimited on Max. Creating one past the cap returns 409. Each key can be revoked independently from Keys (/connect/keys).

Error Responses

Missing Key

// 401 Unauthorized
{
  "error": "Missing authorization header"
}

Invalid Key

// 401 Unauthorized
{
  "error": "Invalid API key"
}

Expired Key

// 401 Unauthorized
{
  "error": "API key expired"
}

Security Best Practices

  • Never commit API keys to version control
  • Use environment variables to store keys
  • Regenerate keys if you suspect they've been compromised
  • Each harness should use its own isolated Token Plan key — do not share keys across plans

Security

Account security, sessions, and best practices

Chat Completions

OpenAI-compatible chat completions API

On this page

API KeysKey FormatPassing Your KeyManaging API KeysView Your KeyRegenerate a KeyKey LimitsError ResponsesMissing KeyInvalid KeyExpired KeySecurity Best Practices