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
| Field | Type | Description |
|---|---|---|
format | TranslationFormatone of text, audio, both | |
parallel_processing | boolean | Process translations in parallel |
source_language | string | Source language code |
target_languages* | string[] | Target language codes |
texts* | string[] | Texts to translate |
Response
200 application/json
| Field | Type | Description |
|---|---|---|
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
401 | Missing, wrong, revoked or expired key. |
403 | The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client. |
402 | Not enough credits, or the key reached its spending cap. |
422 | The request failed validation; `detail` lists the fields. |
429 | Over 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"
]
}'