This guide walks you through obtaining your credentials, funding your prepaid balance, and issuing your first request to the Toknix gateway.
1. Create Account & Copy Key
Toknix does not require email addresses, passwords, or phone numbers.
- Navigate to toknix.in and click Create Account.
- Your unique 10-digit numerical PIN (e.g.,
8391047215) will be generated. Store this numerical PIN securely; it is your sole credential to log in on any device. - Copy your primary API key, which begins with
tk_live_.
Protect Your 10-Digit Numerical PIN
2. Deposit Prepaid Funds
Toknix operates strictly on prepaid usage. Click Top Up in your dashboard to generate a cryptocurrency deposit address.
- Supported networks: BTC, ETH, USDT, USDC, LTC, SOL.
- Minimum top-up: $5.00.
- On-chain confirmations typically settle within 1–5 minutes, automatically crediting your USD balance.
3. Make Your First Request
Set your API key in your terminal environment:
export TOKNIX_API_KEY="tk_live_your_actual_key_here"Execute a cURL test call to the OpenAI-compatible Chat Completions endpoint:
curl https://api.toknix.in/v1/chat/completions -H "Authorization: Bearer $TOKNIX_API_KEY" -H "Content-Type: application/json" -d '{
"model": "glm-5.3-flash",
"messages": [
{"role": "user", "content": "Explain unified AI API gateways in one sentence."}
]
}'Python SDK Usage
You can use the official openai or anthropic Python packages without installing proprietary wrappers:
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ.get("TOKNIX_API_KEY"),
base_url="https://api.toknix.in/v1"
)
response = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[
{"role": "system", "content": "You are a concise infrastructure assistant."},
{"role": "user", "content": "What are the latency advantages of edge routing?"}
]
)
print(response.choices[0].message.content)Node.js / TypeScript Usage
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.TOKNIX_API_KEY,
baseURL: "https://api.toknix.in/v1",
});
async function main() {
const completion = await client.chat.completions.create({
model: "kimi-k3",
messages: [{ role: "user", content: "Summarize prompt caching economics." }],
});
console.log(completion.choices[0].message.content);
}
main();4. Connect Developer Tools
Toknix works directly with major AI coding assistants. Change the base URL and API key in your tool's settings:
- Claude Code CLI:
export ANTHROPIC_BASE_URL="https://api.toknix.in" - Cursor AI: Set OpenAI Base URL to
https://api.toknix.in/v1and model togpt-6-astraorclaude-opus-5-5. - VS Code (Cline / Continue): Choose OpenAI-compatible provider and point to
https://api.toknix.in/v1.
5. Check Balance & Usage
Query your balance anytime without accessing the dashboard:
curl https://api.toknix.in/v1/balance -H "Authorization: Bearer $TOKNIX_API_KEY"