Authentication
ShareAuthenticate every API request with your KiteRouter key in the Authorization header. API keys start with kr- and can be created in your dashboard.
1Authorization: Bearer kr-your-api-key
Warning: Keep your API key secret. Never expose it in browser code, mobile apps, public repositories, logs, or screenshots.
SDK Configuration
1import OpenAI from 'openai'
2
3const client = new OpenAI({
4 baseURL: 'https://kiterouter.com/api/v1',
5 apiKey: process.env.KITEROUTER_API_KEY,
6})Invalid or missing keys
KiteRouter returns a standard JSON error response when authentication fails.
1{ 2 "error": { 3 "message": "Invalid or missing API key", 4 "type": "authentication_error", 5 "code": "invalid_api_key" 6 } 7}