What was verified
glm-5.2 appeared in TokenBison's public model catalog and returned text from a real, non-streaming chat request. This check does not establish tool calling, vision, streaming support, rate guarantees or provider endorsement.
Connect your application
Create a TokenBison account, add balance if needed, then create an API key. Store it in the OPENAI_API_KEY environment variable. Never embed a key in browser code or commit it to source control. The examples below send a small request; actual calls may incur charges.
Understand the estimate
Token-based estimates use standard uncached input and output tokens for the public default group. Cache, image, audio, tiered, per-request and account-specific pricing are excluded. Always confirm the current model pricing and your account group before running a workload.
Troubleshoot an unsuccessful request
For 401, check the key and Authorization header. For a model-access error, check the exact model ID and the key's allowed models/group. For insufficient balance, inspect the wallet. For 429 or temporary upstream errors, use bounded exponential backoff and avoid retrying indefinitely.
Secure application connection
Create a TokenBison account, add balance if needed, and create an API key to connect your application [1]. Store the key in the OPENAI_API_KEY environment variable [1]. Never embed the key in browser code or commit it to source control [1]. Be aware that actual calls may incur charges [1]. Evidence basis: Connect your application
Validate model capabilities and pricing
Testing confirmed that glm-5.2 is in the public model catalog and returned text from a real, non-streaming chat request [0]. This test does not establish tool calling, vision, streaming support, rate guarantees, or provider endorsement [0]. Token-based estimates use standard uncached input and output tokens for the public default group, excluding cache, image, audio, tiered, per-request, and account-specific pricing [2]. Always confirm current model pricing and your account group before running a workload [2]. Evidence basis: What was verified; Understand the estimate
Troubleshoot request errors
For a 401 error, check the API key and Authorization header [3]. For a model-access error, check the exact model ID and the key's allowed models or group [3]. For insufficient balance, inspect the wallet [3]. For 429 or temporary upstream errors, use bounded exponential backoff and avoid retrying indefinitely [3]. Evidence basis: Troubleshoot an unsuccessful request
A minimal text request
curl
curl https://tokenbison.com/v1/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
--data '{"max_tokens":256,"messages":[{"content":"Reply with the word OK.","role":"user"}],"model":"glm-5.2","stream":false}'Python
import json, os, urllib.request
payload = json.loads('{"max_tokens":256,"messages":[{"content":"Reply with the word OK.","role":"user"}],"model":"glm-5.2","stream":false}')
request = urllib.request.Request(
'https://tokenbison.com/v1/chat/completions',
data=json.dumps(payload).encode(),
headers={'Authorization': 'Bearer ' + os.environ['OPENAI_API_KEY'],
'Content-Type': 'application/json'},
)
with urllib.request.urlopen(request, timeout=60) as response:
print(json.load(response)['choices'][0]['message']['content'])