GATEWAY & INTEGRATION

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.

THE SHORT ANSWER

Tokely exposes an OpenAI-compatible API at https://api.tokely.me/v1. Use the official OpenAI Python or JavaScript SDK, or any tool with a custom OpenAI base URL, to call supported models from several developers with one Tokely key. Chat Completions and a stateless Responses subset are supported.

Connect in one request

from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.tokely.me/v1",
    api_key=os.environ["TOKELY_API_KEY"],
)

for model in ["kimi-k3", "claude-sonnet-5", "gemini-3.5-flash"]:
    r = client.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": "One-line summary of HTTP/3"}],
        max_tokens=128,
    )
    print(model, r.choices[0].message.content)

Base URL https://api.tokely.me/v1. Create a key in the dashboard and keep it in an environment variable. Quickstart · Model IDs and endpoints

Three values change. Your code does not.

Set base_url to https://api.tokely.me/v1, use a Tokely API key and pick a Tokely model ID. Messages, streaming, tool definitions and usage fields follow the OpenAI Chat Completions shape for models that support them. Responses-only models use the stateless Responses subset with store=false.

Works with tools that accept a custom OpenAI endpoint

Frameworks and apps that let you set an OpenAI-compatible base URL, such as the OpenAI SDKs, LangChain, LlamaIndex, n8n and coding assistants with an "OpenAI Compatible" provider, can call Tokely the same way. Check each model page for streaming, tool and image-input support.

Know the boundaries of compatibility

Compatibility covers the published endpoint subset, including /v1/embeddings for OpenAI embedding models. Batch API, uploaded file IDs, remote file URLs, audio input, provider-hosted tools and the native Anthropic and Google SDK contracts are not implied. Text request bodies are limited to 16 MB and output to the model limit.

Questions before you switch

Can I call Claude with the OpenAI SDK?

Yes. Supported Claude models are available through Chat Completions with the OpenAI SDK and a Tokely key. Claude models also support the native Anthropic Messages API at /v1/messages, used by Claude Code and the Anthropic SDK.

Do I need accounts with each model developer?

No. One Tokely account, key and balance covers all supported models. You are billed at each model's published Tokely rate.

Does streaming work?

Yes for models that support it, using the standard stream=true server-sent events. Interrupted streams can still have billable recorded usage.

START WITH YOUR OWN WORKLOAD

Know the price.
Then make the call.

Check the model, compare the rate, and connect with a Tokely key.