XRToken API Docs

Web Q&A session

API Configuration
After saving, the Try It panel below sends real requests with this key.
Base: api.xrtoken.ai

Proxies Volcengine联网问答 Agent ChatCompletion. bot_id and messages are required. Aliases: POST /v1/agent/chat/completion, POST /v1/agents/chat/completions. A Pro Bot is required for mixed media, follow-ups, cards, and similar console capabilities.

POST
/v1/agent/chat/completions

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication (OpenAI format). Pass in the Authorization header:

Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X post "https://api.xrtoken.ai/v1/agent/chat/completions" \  -H "Content-Type: application/json" \  -d '{    "bot_id": "string",    "messages": [      {}    ]  }'
Empty
{
  "error": "model field is required",
  "type": "invalid_request_error"
}
{
  "error": "invalid or missing API key",
  "type": "auth_error"
}
{
  "error": "insufficient balance -- please top up or upgrade your plan",
  "type": "billing_error"
}
{
  "error": "upstream provider error",
  "type": "server_error"
}