Text to Speech

Voice Cloning

Lip Sync Video

Other

Speech to Text

Submit an audio URL to transcribe speech to text; consumes API credits per minute

Speech to Text API

Endpoint

POST /api/open/speech-to-text

Request Headers

Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN  // Optional, can also be passed in request body

Request Parameters

{
  "audio_url": string,           // Required, publicly accessible audio file URL
  "language": string,            // Optional, default "auto". Available: auto, zh, en, ja, ko, fr, de, es, ar
  "ignore_timestamps": boolean,  // Optional, default false. If true, segment timestamps are omitted
  "file_name": string,           // Optional, format hint such as "audio.mp3". If omitted, inferred from URL or default "audio.mp3"
  "token": string                // Optional, required if Authorization header is not provided
}

Response Data

// Success response - 200
{
  "text": string,              // Full recognized text
  "duration": number,          // Audio duration (seconds)
  "segments": array,           // Segment details (may be empty when ignore_timestamps is true)
  "credits_used": number,      // API credits consumed (about 10 credits/minute)
  "quota_remaining": number    // Remaining API credits
}

// Error response
{
  "error": string,
  "remaining_quota"?: number,  // Returned on 402
  "required_quota"?: number
}

CURL Example

curl -X POST /api/open/speech-to-text \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "audio_url": "https://example.com/audio.mp3",
    "language": "auto",
    "ignore_timestamps": false
  }'

Online Debug

Must be a publicly accessible audio URL. Supports mp3, wav, m4a, ogg, webm, flac, aac, wma. Max 50MB per file.

Status Code Description

Status Code Description:
200 OK                  - Request successful
400 Bad Request         - Invalid request parameters
401 Unauthorized        - Invalid API Token
403 Forbidden          - Access forbidden
404 Not Found          - Resource not found
413 Payload Too Large  - Upload file too large
429 Too Many Requests  - Rate limit exceeded/Insufficient credits
500 Server Error       - Internal server error

Error Response Format:
{
  "error": string,      // Error message
  "details": string,    // Detailed error message (optional)
  "code": string       // Error code (optional)
}