Developer Documentation
API Key Hub provides a unified, OpenAI-compatible API gateway that gives you access to models from OpenAI, Anthropic, Google, Mistral, and more through a single API key. No new SDKs needed -- just change your base URL.
Key Features
OpenAI-Compatible
Works with any OpenAI SDK. Python, Node.js, Go, or cURL -- just swap the base URL.
Multi-Provider Access
Access GPT-4o, Claude, Gemini, Mistral, and more models through one unified endpoint.
Pay-As-You-Go
No subscriptions. Recharge your balance and pay only for what you use.
Usage Tracking
Real-time spend tracking, budget limits, and rate limiting per API key.
Authentication
All API requests require an API key passed in the Authorization header using the Bearer token format:
Authorization: Bearer sk-your-api-keyYou can create and manage API keys from your Dashboard. Each key has its own budget, rate limits, and model access controls.
Base URL
https://xylove.net/v1All endpoints follow the OpenAI API format. If you are using an OpenAI SDK, set this as your base_url (Python) or baseURL (Node.js).
Rate Limits
Rate limits are applied per API key and depend on your plan. Each key has:
- RPM (Requests Per Minute) -- maximum number of requests per minute
- TPM (Tokens Per Minute) -- maximum number of tokens processed per minute
- Budget -- maximum total spend for the key
When you hit a rate limit, the API returns a 429 status code with a Retry-After header. See the Error Codes page for details.
Explore the Docs
Quick Start
Get up and running in 5 minutes. Create an API key and make your first request.
API Reference
Complete reference for the OpenAI-compatible API endpoints including chat completions, embeddings, and models.
Error Codes
Understand error responses, HTTP status codes, and how to handle them gracefully in your application.
Migration Guide
Migrate from OpenAI or Anthropic direct APIs to API Key Hub with minimal code changes.