TokenRaTokenRa
ChineseGet API Key

Developer documentation

Quickstart and API Authentication

Use one TokenRa API key to access enabled models through an OpenAI-compatible gateway. Confirm current model IDs, limits, and pricing in the live console.

01

BASE URL

Start with the TokenRa endpoint

Send compatible chat requests to:

https://tokenra.io/v1/chat/completions

Keep your API key on the server. Model availability and billing depend on the channels enabled for your account.

02

AUTHENTICATION

Authenticate every request

Use a Bearer token in the Authorization header.

curl https://tokenra.io/v1/chat/completions   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"
i

Protect your key

Never expose API keys in browser code, public repositories, or client applications.

03

CHAT COMPLETIONS

Send an OpenAI-compatible request

POST /v1/chat/completions
Request pathhttps://tokenra.io/v1/chat/completions
AuthorizationBearer YOUR_API_KEY
Modelglm-5.3-flash
curl -X POST https://tokenra.io/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5-3-flash",
    "messages": [
      {"role": "user", "content": "Hello"}
    ],
    "temperature": 1,
    "top_p": 0.95,
    "max_tokens": 1024
  }'

Use the exact model identifier shown in the model directory. Preserve tool calls, reasoning content, and message history when continuing a multi-step workflow.

04

VIDEO GENERATION

Run asynchronous video tasks

Video models may use asynchronous task endpoints. Confirm the enabled route and request schema in the relevant model guide before sending production traffic.

curl https://tokenra.io/v1/video/generations   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"model":"YOUR_ENABLED_VIDEO_MODEL","prompt":"A cinematic scene"}'
05

MODEL GUIDES

Choose a documented model

GLM-5.3-Flash

Native multimodal input, long context, tools, and structured output.

Read the GLM guide
06

PRODUCTION

Production checklist

  • Use separate keys and budgets for each environment.
  • Set timeouts, bounded retries, request tracing, and application limits.
  • Validate model output and tool arguments before executing side effects.
  • Monitor token usage, latency, error rates, and account quota.
  • Review provider terms and data handling before sending sensitive information.