LENOX AI ROUTER · API REFERENCE · v4.1.0-agy2

API Documentation

OpenAI-compatible API gateway with lenox/auto smart intent routing, backup key failover, 15 built-in providers, and custom OpenAI-compatible providers.

Ana sayfaya dön

Base URL

https://api.lenoxbest.eu.cc/v1

Works with official OpenAI SDKs. /api/v1/* is also supported.

Authentication

Send your Lenox API key via Authorization: Bearer YOUR_KEY, X-Api-Key, or Api-Key.

Smart Auto-Router: lenox/auto

Send "model": "lenox/auto" to automatically dispatch each request to the best pipeline:

GET /v1/models & GET /v1/usage

/v1/models lists all available models and aliases (including lenox/auto). /v1/usage returns your API key's rate limit, daily quota, token budget, and today's usage.

POST /v1/chat/completions

OpenAI-compatible chat completions with streaming, retries, circuit breaker, backup key failover, smart alias routing, and optional response caching (X-Lenox-Cache: true|false).

curl https://api.lenoxbest.eu.cc/v1/chat/completions \
  -H "Authorization: Bearer YOUR_LENOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"lenox/auto","messages":[{"role":"user","content":"Write a TypeScript debounce function"}]}'

POST /v1/embeddings

Generates vector embeddings via upstream providers or Cloudflare Workers AI (lenox/embed, lenox/auto, or cloudflare/@cf/baai/bge-base-en-v1.5).

curl https://api.lenoxbest.eu.cc/v1/embeddings \
  -H "Authorization: Bearer YOUR_LENOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"lenox/embed","input":"Hello world"}'

POST /v1/images/generations

Generates images via upstream providers or Cloudflare Workers AI (lenox/image, lenox/auto, or cloudflare/@cf/black-forest-labs/flux-1-schnell). Cloudflare returns base64 b64_json.

curl https://api.lenoxbest.eu.cc/v1/images/generations \
  -H "Authorization: Bearer YOUR_LENOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"lenox/image","prompt":"A futuristic neon city at night"}'

POST /v1/audio/transcriptions

Multipart form-data audio transcription via Groq Whisper, OpenAI-compatible endpoints, lenox/auto, or cloudflare/@cf/openai/whisper.

Response Headers

Lenox AI Router v4.1.0-agy2 · Private single-owner service