Quickstart
TokenPortal is OpenAI-compatible — change the base URL to access 150+ models instantly. Claude Code / Anthropic-native, Gemini, and the OpenAI Responses API are also supported, see below.
1
Sign up & log in
Create an account by email and get free credits.
2
Create an API key
Generate an sk- key on the API Keys page in your workspace.
3
Swap the base URL
Point your SDK's baseURL to https://staging-dp.taotoken.io/v1 and call with your key.
API Base URL (OpenAI-compatible)
https://staging-dp.taotoken.io/v1API Base URL (Claude Code / Anthropic-native)
https://staging-dp.taotoken.ioNo /v1 — Claude Code / the Anthropic SDK append /v1/messages themselves.
Make your first call
OpenAI-compatible
Python (openai SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://staging-dp.taotoken.io/v1",
api_key="sk-your-tokenportal-key",
)
resp = client.chat.completions.create(
model="openai/gpt-4o",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)Node.js (openai SDK)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://staging-dp.taotoken.io/v1",
apiKey: process.env.TOKENPORTAL_API_KEY,
});
const res = await client.chat.completions.create({
model: "openai/gpt-4o",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(res.choices[0].message.content);cURL
curl https://staging-dp.taotoken.io/v1/chat/completions \
-H "Authorization: Bearer sk-your-tokenportal-key" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}'Claude Code / Anthropic-native
Environment variables
ANTHROPIC_BASE_URL=https://staging-dp.taotoken.io
ANTHROPIC_API_KEY=sk-your-tokenportal-key
ANTHROPIC_MODEL=anthropic/claude-opus-4.8cURL
curl https://staging-dp.taotoken.io/v1/messages \
-H "x-api-key: sk-your-tokenportal-key" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-opus-4.8",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello!"}]
}'Gemini-compatible
Native Gemini request/response shape at /v1/models/{model}:generateContent — model id keeps the provider prefix.
cURL
curl https://staging-dp.taotoken.io/v1/models/google/gemini-3.1-pro-preview:generateContent \
-H "Authorization: Bearer sk-your-tokenportal-key" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"role": "user", "parts": [{"text": "Hello!"}]}]
}'OpenAI Responses API
Python (openai SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://staging-dp.taotoken.io/v1",
api_key="sk-your-tokenportal-key",
)
resp = client.responses.create(
model="openai/gpt-4o",
input="Hello!",
)
print(resp.output_text)cURL
curl https://staging-dp.taotoken.io/v1/responses \
-H "Authorization: Bearer sk-your-tokenportal-key" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o",
"input": "Hello!"
}'