
DEVELOPERS / QUICKSTART
Integrate TokensChain in 5 minutes
OpenAI-compatible — zero changes to your app code.
01
Create an account
Sign up with your email — get 1M free tokens.
02
Create an API key
Console → API Keys → create and copy your key.
03
Swap the base URL
Point the OpenAI SDK's base_url to https://api.tokenschain.io/v1.
04
Send a request
No app code changes — fire a chat/completions request and you're done.
EXAMPLE / PYTHON
from openai import OpenAI
client = OpenAI(
api_key="sk-smartoken-xxxx",
base_url="https://api.tokenschain.io/v1",
)
resp = client.chat.completions.create(
model="qwen2.5-72b-instruct",
messages=[{"role": "user", "content": "Hello, TokensChain"}],
)
print(resp.choices[0].message.content)