XRToken API 文档

热点开场问题

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

透传火山 GetOpeningQuestion,返回根据全网热点生成的开场问题。count 取值 1–10,非法时按 3 处理。无 token 用量,不冻结余额。

POST
/v1/agent/opening-questions

Authorization

BearerAuth
AuthorizationBearer <token>

API 密钥认证(OpenAI 格式)。在 Authorization 请求头中传入:

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

curl -X post "https://api.xrtoken.net/v1/agent/opening-questions" \  -H "Content-Type: application/json" \  -d '{    "bot_id": "string"  }'
Empty
{
  "error": "model field is required",
  "type": "invalid_request_error"
}
{
  "error": "invalid or missing API key",
  "type": "auth_error"
}
{
  "error": "upstream provider error",
  "type": "server_error"
}