Overview
The Token360 API is OpenAI-compatible and follows RESTful conventions.
Base URL
https://api.token360.ai/v1Authentication
All requests require an API key in the Authorization header:
Authorization: Bearer sk-your-api-keyRequest Format
- Content-Type:
application/jsonfor most endpoints.multipart/form-datafor file uploads. - Method:
POSTfor inference and creation,GETfor retrieval,DELETEfor deletion.
Example Request
1curl -X POST https://api.token360.ai/v1/chat/completions \
2 -H "Authorization: Bearer sk-your-api-key" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "glm-5.1",
6 "messages": [{"role": "user", "content": "Hello"}]
7 }'Response Format
Successful responses return JSON with endpoint-specific data:
1{
2 "id": "your-chat-completion-id",
3 "object": "chat.completion",
4 "created": 1677652288,
5 "model": "glm-5.1",
6 "choices": [...],
7 "usage": {
8 "prompt_tokens": 10,
9 "completion_tokens": 20,
10 "total_tokens": 30
11 }
12}Error responses follow a consistent format:
1{
2 "error": {
3 "message": "Description of the error",
4 "type": "error_type",
5 "param": null,
6 "code": "error_code"
7 }
8}SDK Support
Token360 is compatible with the official OpenAI SDKs:
1# Python
2from openai import OpenAI
3client = OpenAI(api_key="sk-...", base_url="https://api.token360.ai/v1")Any library or tool that supports custom OpenAI base URLs will work with Token360.
Vendor-native passthrough (Token360-Native-Params)
For POST /v1/videos, POST /v1/images/generations, and POST /v1/audio/speech, you may send supplier-native JSON instead of the normalized OpenAI-style body by setting:
Token360-Native-Params: true
The gateway still applies API-key auth, model → provider model id rewriting, and asset:// validation/replacement. See Docs → Native Params Passthrough for the full contract, endpoint matrix, and troubleshooting.
Previous
Authentication
Next
Streaming