Skip to content

Audio, video and voices

A media job runs as soon as it is created and is charged at credit prices for the usage the server measures. Read the catalog first; only products marked as open can run.

Prices are given directly in credits:

ProductproductPrice
Speech recognitionasr20 credits/minute; the fun-asr real-time model 30 credits/minute (billed by the millisecond)
Subtitle translationsubtitle_translation60 credits/minute
Basic video processing (translated subtitles, original audio)basic_video80 credits/minute
Full video processing (translated subtitles and dubbing)full_video300 credits/minute
Speech synthesistts1,500 credits per 10,000 billed characters
First successful use of a voice—300 credits per voice, charged once
  • Speech recognition is priced by the recognition model used; both models’ prices are listed separately in prices of credit-catalog (the model field).
  • Duration is counted in milliseconds: speech recognition and subtitle translation by the source duration, video by the duration of the delivered video.
  • Billed characters for speech synthesis: each Chinese character counts as 2, every other character (including spaces and punctuation) as 1.
  • Recognition, translation, dubbing and other steps a product needs are included in its price. If the request allows a lower-tier result (allowed_fallback_products) and one is delivered, the delivered product’s price applies.
  • Cost = unit price × usage, rounded to 0.001 credit (1 millicredit).
GET /api/v1/billing/media/credit-catalog
POST /api/v1/billing/media/credit-estimates

credit-catalog returns each product’s prices (prices, in millicredits) and whether it is open; credit-estimates computes the credits needed (rounded_millicredits) for a given duration, text or number of voices. It is for display only: it creates no job and charges nothing.

POST /api/v1/media-jobs
Idempotency-Key: unique-request-id

Products:

productPurpose
asrSpeech recognition
ttsSpeech synthesis
subtitle_translationSubtitle translation for audio and video
basic_videoBasic video processing
full_videoFull video processing

Speech recognition example:

{
"product": "asr",
"document_id": "4q8mx2q9z1k7p6ra",
"source_language": "auto",
"max_duration_ms": 600000
}

Every product except speech synthesis (tts) requires max_duration_ms (milliseconds, at most 21600000, which is 6 hours).

After the create request returns 202, the server checks the file and starts processing:

  1. Only the balance is checked before it starts: the balance (after debt) must be above the cost computed from the duration the server measured (for speech synthesis, from the billed characters, including any first-use voice fee not yet charged); with an API key that has a budget, the key’s remaining budget must also be above that cost. Starting does not change the balance.
  2. Actual usage is charged when it finishes: priced and charged by the delivered product and usage. Whatever the balance does not cover is recorded as debt and the balance shows as negative; credits that arrive later pay off the debt first. New jobs cannot start while the balance is negative.
  3. Failed or cancelled jobs are not charged.

When the balance is too low or the duration does not fit, nothing starts and nothing is charged: speech synthesis is checked at creation and returns 402 when the balance is too low; other products are checked once the server has measured the duration, and the job ends as failed with error_code insufficient_credits (balance too low) or media_duration_exceeds_confirmed_cap (the real duration exceeds max_duration_ms).

GET /api/v1/media-jobs/{operation_id}
GET /api/v1/media-jobs?limit=25
POST /api/v1/media-jobs/{operation_id}/cancel

The query response includes the job status, the delivered files and the settlement reference.

GET /api/v1/media-voices
POST /api/v1/media-voices
GET /api/v1/media-voices/{asset_id}
POST /api/v1/media-voices/{asset_id}/confirm
POST /api/v1/media-voices/{asset_id}/reconcile
POST /api/v1/media-voices/{asset_id}/revoke

reconcile recovers an uncertain remote result; it only checks the original operation and never creates a second voice.

Creating a voice requires confirming your rights to the recording:

{
"document_id": "authorized_recording_document_id",
"consent": true,
"consent_version": "voice-source-rights-v1"
}

The caller is responsible for making sure the recording is their own or used with valid permission.