Quickstart
JoyToken is an OpenAI-compatible model gateway. Your application connects to one unified endpoint, while JoyToken handles model routing, API key policy, wallet credits, usage records, and billing attribution.
Choose an integration path
The stable public OpenAI-compatible handler is POST /openai/v1/chat/completions. The model catalog is currently exposed to the Console through GET /api/v1/models.
1. Create an API key
Create an API key in the Console. The plaintext key is shown only once, so store it in server-side environment variables:
For production, split keys by application, environment, and task type, such as prod-chat-api, rag-indexer, and cursor-dev.
2. Send your first request
Send a standard HTTP request to the OpenAI-compatible endpoint:
You can also let the router pick a model automatically:
3. Use the OpenAI SDK
Use the official OpenAI SDK and point it at JoyToken:
4. Verify the request
A successful response keeps the OpenAI-compatible choices and usage structure. JoyToken also adds governance signals through response headers and metadata:
Next reads:
Authentication: keys, headers, server-side proxying, and rotation.Routing:model: "auto", tiers, fixed models, and fallback behavior.Client SDKs: TypeScript SDK, Go SDK, and usage for agents.