Speech to Text

Upload an audio file once, get a task id immediately, then read the transcript from the common task result when processing finishes.

Endpoint

http
POST https://api.cheapaiapi.com/v1/task/speech-to-text

Send this request as multipart/form-data.

Request Fields

filefilerequiredAudio file such as mp3, aac, aiff, ogg, opus, wav, webm, flac, or m4a.
receive_urlstringOptional webhook URL for transcript delivery.

Example Request

bash
curl -X POST "https://api.cheapaiapi.com/v1/task/speech-to-text" \
  -H "Authorization: Bearer sk_your_api_key" \
  -F 'file=@recording.mp3' \
  -F 'receive_url=https://your-app.com/webhooks/transcripts'

Task Pattern

json
{
  "success": true,
  "task_id": "uuid_task_id",
  "ec_remain_credits": 123456
}

Use the common task endpoint for polling:

http
GET https://api.cheapaiapi.com/v1/task/{task_id}

Completed Task Example

json
{
  "id": "uuid_task_id",
  "status": "done",
  "credit_cost": 1,
  "metadata": {
    "json_url": "https://example.com/transcript.json",
    "srt_url": "https://example.com/transcript.srt"
  },
  "type": "speech_to_text"
}

What To Show Users

  • Original file name and upload size before submit
  • Immediate task state after upload instead of waiting synchronously
  • Separate download actions for JSON and SRT once done
  • Webhook status if your backend receives transcripts automatically