OpenAI-compatible API for Claude, Gemini, GPT and more
Keep the OpenAI SDK and call Claude, Gemini, GPT, Kimi, GLM and other supported models. Change the base URL, key and model ID.
A practical migration checklist: model IDs, base URL, authentication, supported parameters, cost estimates and streaming behavior.
For supported OpenAI-compatible requests, keep the SDK and change the base URL, API key and model ID. Check vendor-specific parameters and model limits before moving traffic. OpenRouter credits and keys do not transfer to Tokely.
Find the exact model in Tokely's catalog. Confirm Chat Completions or Responses support, tools, streaming requirements and output limits. Text endpoints use the documented text contract. OpenRouter provider-routing objects, BYOK and unsupported endpoints cannot be assumed to work. Free OpenRouter models have no Tokely equivalent.
Take input/output/cache counts from a representative response and enter them in the cost calculator. Keep the model version fixed. Remember that OpenRouter adds a 5.5% (Standard) or 8% (Business) fee on credit purchases, while Tokely has no platform fee. Include payment fees and any special units separately; a discounted input price alone does not determine the total bill.
Create an account, fund its balance and create an API key in the dashboard. Set credentials through environment variables rather than putting them in source code. This example uses a supported Chat Completions model:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.tokely.me/v1",
api_key=os.environ["TOKELY_API_KEY"],
)
response = client.chat.completions.create(
model="kimi-k3",
messages=[{"role": "user", "content": "Summarize this in one sentence."}],
max_tokens=128,
)
print(response.choices[0].message.content)For a Responses-only model, follow the Responses contract instead: it is stateless, requires supplied history and uses store=false.
Your application's requests can spend its funded balance. This checklist is a migration procedure, not a claim that a new paid benchmark was run.
Keep the original configuration available and switch one supported request path first. Set an account spending limit and model restrictions where useful. Observe your own application's errors and costs before expanding traffic.
No unchanged pass-through is promised. Choose Balanced, Lowest cost, Fastest, Most reliable or Fixed in account settings or with the X-Tokely-Routing header, and use the supported request parameters.
Yes. Tokely reserves against the requested output bound, then settles recorded usage. Set a realistic bound and leave sufficient available balance.
No. Compatibility covers the published endpoint subset. Batch API is not currently offered; embeddings use /v1/embeddings and Claude also supports native /v1/messages.
Check the model, compare the rate, and connect with a Tokely key.