联网问答会话
API 配置
保存后下方「Try It」面板会自动携带此 API Key 发送真实请求。
Base: api.xrtoken.net
透传火山联网问答 Agent ChatCompletion。bot_id 与 messages 必填。
兼容别名:POST /v1/agent/chat/completion、POST /v1/agents/chat/completions。
Bot 需为 Pro 才能使用混排、追问、出卡等控制台能力。
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
application/json
curl -X post "https://api.xrtoken.net/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"
}