XRToken API Docs

Create podcast generation task

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

Submit a podcast generation task; returns a task ID immediately. Podcast generation is an async operation -- poll task status via GET /v1/audio/podcasts/{taskId}.

The system analyzes and summarizes input text to generate a two-person dialogue podcast. Four modes are supported:

  • Long text summary: Pass input_text to analyze and summarize long text into a podcast
  • URL parsing: Pass input_url to generate a podcast from webpage content
  • Web search: Pass prompt_text to search the web for a topic and generate a podcast
  • Dialogue text: Pass nlp_texts to directly synthesize podcast audio from pre-written dialogue

Billing: per token (input text tokens + output audio tokens). Estimated amount is frozen at submission; settled by actual usage on completion.

POST
/v1/audio/podcasts

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/audio/podcasts" \  -H "Content-Type: application/json" \  -d '{    "model": "volcengine/podcast-tts"  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "model": "string",
  "status": "processing",
  "created_at": "2019-08-24T14:15:22Z"
}
{
  "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"
}