OpenAI Codex CLI & Developer SDK Setup Guide
Point OpenAI Codex CLI or any OpenAI Python/Node.js SDK application to https://api.tokendos.com/v1 for pay-per-token access. Check the marketplace for currently listed model IDs and live prices before connecting.
Step 1: Export environment variables
export OPENAI_BASE_URL="https://api.tokendos.com/v1"
export OPENAI_API_KEY="YOUR_TOKENDOS_API_KEY"
Step 2: Python SDK example
Use an exact model ID currently listed in the marketplace (e.g., gpt-6.1-sol, gemini-3.8-flash). For per-model reasoning effort ladders, see the API parameter reference:
from openai import OpenAI
client = OpenAI(
base_url="https://api.tokendos.com/v1",
api_key="YOUR_TOKENDOS_API_KEY"
)
resp = client.chat.completions.create(
model="gpt-6.1-sol",
messages=[{"role": "user", "content": "Hello from TokenDos!"}]
)
print(resp.choices[0].message.content)
Step 3: Verify with cURL and check call logs
curl https://api.tokendos.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKENDOS_API_KEY" \
-d '{"model":"gpt-6.1-sol","messages":[{"role":"user","content":"ping"}],"max_tokens":32}'
This is a real billable call. Check the model, token usage, and charge in your dashboard, and review recent call success-rate windows in the public evidence snapshot.