Getting started
Get your first
Roten response.
Choose your workload. Get your API key. Replace the key and run.
A simple first test
Three steps to
your first request.
Start with what you are building and choose a model for that workload. Then get your API key and use it in the model’s test.
Choose your workload.
Compare models for the task you want to build.
Get your API key.
Get API access to receive your own Roten key.
Replace the API key and run.
Use your own API key in the model test. Everything else is already configured.
Implementation
Copy a model test.
Choose a model, then copy its Python or cURL test. Only replace the API-key placeholder.
Copy the Python or cURL test for GLM-5.3 Flash. Replace the API-key placeholder with your own key and run.
Basic text test · Sends a basic text request. Vision input is not confirmed for this upstream model.
import json
from urllib.error import HTTPError
from urllib.request import Request, urlopen
API_KEY = "YOUR_ROTEN_API_KEY"
def send(url, payload=None):
data = json.dumps(payload).encode("utf-8") if payload is not None else None
request = Request(url, data=data, headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"})
try:
with urlopen(request, timeout=180) as response:
return json.load(response)
except HTTPError as error:
raise SystemExit(f"HTTP {error.code}: {error.read().decode('utf-8')}")
payload = json.loads(r'''{
"messages": [
{
"role": "user",
"content": "Explain what an API key is in one short sentence."
}
],
"max_tokens": 128,
"stream": false,
"model": "glm-5.3-flash"
}''')
result = send("https://api.roten.ai/v1/chat/completions", payload)
print(json.dumps(result, indent=2, ensure_ascii=False))API_KEY='YOUR_ROTEN_API_KEY'
curl --fail-with-body --silent --show-error 'https://api.roten.ai/v1/chat/completions' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"content": "Explain what an API key is in one short sentence."
}
],
"max_tokens": 128,
"stream": false,
"model": "glm-5.3-flash"
}'Python tests use the standard library. Video cURL tests also use Python 3 to read task responses.
Find the right model
Start with your workload.
Explore the models and their prices, or compare the performance and value choices for your task.
Build with Roten
Ready to get your API key?
Choose your workload, then request API access to get started.