XRToken API 文档

查询播客生成任务状态

API 配置
保存后下方「Try It」面板会自动携带此 API Key 发送真实请求。
Base: api.xrtoken.net

轮询播客生成任务的当前状态。

  • processing:任务进行中,请继续轮询(建议间隔 10-15 秒,播客生成通常需要数分钟)。
  • succeeded:生成成功,audio_url 字段包含可下载的音频链接(有效期 1 小时)。
  • failed:生成失败,error 字段包含错误信息,已冻结金额会自动退还。
GET
/v1/audio/podcasts/{taskId}

Authorization

BearerAuth
AuthorizationBearer <token>

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

Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Path Parameters

taskId*string

任务 ID(由 POST /v1/audio/podcasts 返回的 id 字段)

Response Body

application/json

application/json

application/json

application/json

curl -X get "https://api.xrtoken.net/v1/audio/podcasts/string"
{
  "id": "string",
  "model": "string",
  "status": "processing",
  "audio_url": "http://example.com",
  "audio_duration": 0.1,
  "usage": {
    "input_text_tokens": 0,
    "output_audio_tokens": 0
  },
  "error": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": "invalid or missing API key",
  "type": "auth_error"
}
{
  "error": "string",
  "type": "invalid_request_error"
}
{
  "error": "rate limit exceeded",
  "type": "rate_limit_error"
}