OpenAI-compatible API
OpenAI-compatible LLM API
Most existing apps, SDKs and tools need no code change. Point base_url at the Tokenjoy gateway, use an API key issued by the gateway, and call any model in the catalog.
Three steps
- Create an API key under “My keys” in the console and set its quota and allowed models
- Set the SDK base_url to https://app.tokenjoy.me/v1
- Put a catalog model name in the model parameter; switching models changes only that one value
Examples
curl https://app.tokenjoy.me/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer tj-..." \
-d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"Hello!"}]}'
from openai import OpenAI
client = OpenAI(api_key="tj-...", base_url="https://app.tokenjoy.me/v1")
resp = client.chat.completions.create(model="deepseek-v4-pro",
messages=[{"role": "user", "content": "Hello!"}])
print(resp)
Capabilities depend on model and channel
Streaming, function calling and vision depend on the model and channel you pick. Besides chat, image, audio, video (async, two steps), embedding and rerank models are supported, and the example changes with the model type.
Keys and quota
- An API key is shown once after creation, so copy it right away
- Each key can have its own quota, expiry and model allowlist
- After a forced rotation, the old key stops working after 24 hours
FAQ
Which SDKs work with Tokenjoy?
Any SDK or tool that lets you set the base_url of an OpenAI- or Anthropic-compatible API, such as the official OpenAI Python and Node SDKs.
