XRToken API Docs

Web search

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

Web search endpoint. Use body Type to select the product line:

  • web: web search, model doubao-web-search
  • global: global search, model doubao-global-search

Billing: per successful call; failures are not charged. See GET /v1/models or the model marketplace for price. Gateway fields Type and model are for routing only. SearchType=image is not supported in this release.

Models appear in GET /v1/models (model_type: search). Always call this single endpoint and select via Type.

POST
/v1/search

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

application/json

application/json

curl -X post "https://api.xrtoken.ai/v1/search" \  -H "Content-Type: application/json" \  -d '{    "Type": "web",    "Query": "recommended attractions near Beijing",    "Count": 10,    "SearchType": "web"  }'
{}
{
  "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": "rate limit exceeded",
  "type": "rate_limit_error"
}
{
  "error": "upstream provider error",
  "type": "server_error"
}