Skip to content
VoiceMint Developers

Batch Translate

POST/translation/batch

Translate multiple texts to multiple languages.

Authentication

Authorization: Bearer vm_sk_… with the media.write permission (or all.write). See Authentication.

Request body

application/json

FieldTypeDescription
formatTranslationFormat
one of text, audio, both
parallel_processingbooleanProcess translations in parallel
source_languagestringSource language code
target_languages*string[]Target language codes
texts*string[]Texts to translate

Response

200 application/json

FieldTypeDescription
failed_items*integer
items*BatchTranslationItem[]
parallel_processed*boolean
processing_time_ms*integer
successful_items*integer
total_items*integer
{
  "failed_items": 0,
  "items": [
    {
      "metadata": {
        "alternative_translations": null,
        "character_count": 0,
        "confidence_score": 0,
        "detected_language": null,
        "provider_used": "string",
        "word_count": 0
      },
      "source_text": "string",
      "translations": {}
    }
  ],
  "parallel_processed": false,
  "processing_time_ms": 0,
  "successful_items": 0,
  "total_items": 0
}

Errors

401Missing, wrong, revoked or expired key.
403The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client.
402Not enough credits, or the key reached its spending cap.
422The request failed validation; `detail` lists the fields.
429Over a rate limit; retry after `Retry-After` seconds.

All statuses: Errors.

Example

curl -X POST "https://api.voicemint.io/api/v1/translation/batch" \
  -H "Authorization: Bearer $VOICEMINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "format": "text",
  "parallel_processing": true,
  "source_language": "auto",
  "target_languages": [
    "string"
  ],
  "texts": [
    "string"
  ]
}'