Translate a v2 Presentation
Translates an existing presentation into another language and exports it to PowerPoint.
Translation is asynchronous. The endpoint returns a task_id; poll /task_status/{task_id} until
SUCCESS, then use the returned request_id with /presentation/download/{request_id}.
Headers
Section titled “Headers”application/json
The API key to use for the request.
Body Parameters
Section titled “Body Parameters”The ID of a presentation created with your API key. It must not be empty, and the presentation
must belong to the same user as the API key. To translate your own PowerPoint file, first import
it with /presentation/import to get a presentation_id.
The target language to translate the presentation into. Pass either a language code
(SPANISH, PORTUGUESE_BRAZIL) or its English name (Spanish, Portuguese (Brazil)) —
matching is case-insensitive. See Supported Languages for the full list.
Code Examples
Section titled “Code Examples”curl -X POST "https://api.slidespeak.co/api/v2/presentation/translate" -H "Content-Type: application/json" -H "X-API-Key: YOUR_API_KEY" -d '{ "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "language": "SPANISH" }'const response = await fetch('https://api.slidespeak.co/api/v2/presentation/translate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'YOUR_API_KEY' }, body: JSON.stringify({ presentation_id: 'cmgt32cut0000h3ovex8dbzmn', language: 'SPANISH' }),});
const data = await response.json();console.log(data.task_id);import requests
url = "https://api.slidespeak.co/api/v2/presentation/translate"headers = { "Content-Type": "application/json", "X-API-Key": "YOUR_API_KEY",}payload = { "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "language": "SPANISH",}
response = requests.post(url, headers=headers, json=payload)print(response.json()["task_id"])<?phprequire 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post('https://api.slidespeak.co/api/v2/presentation/translate', [ 'headers' => [ 'Content-Type' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY' ], 'json' => [ 'presentation_id' => 'cmgt32cut0000h3ovex8dbzmn', 'language' => 'SPANISH' ]]);
$data = json_decode($response->getBody(), true);echo $data['task_id'];Example Body
Section titled “Example Body”{ "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "language": "SPANISH"}Response
Section titled “Response”{ "task_id": "7f9801d8-c8bf-45c3-9fe7-d024b5a76f69"}{ "detail": "You don't have enough API credits to translate the presentation (required: 10, available: 4). Please upgrade your plan at https://app.slidespeak.co/settings/developer", "error": { "code": "INSUFFICIENT_API_CREDITS", "status_code": 403, "retryable": false, "message": "You don't have enough API credits to translate the presentation (required: 10, available: 4). Please upgrade your plan at https://app.slidespeak.co/settings/developer", "details": { "required_credits": 10, "available_credits": 4 }, "request_id": "cmqf2lohi00017wlp3du979zt" }}{ "detail": "Presentation not found", "error": { "code": "NOT_FOUND", "status_code": 404, "retryable": false, "message": "Presentation not found", "details": {}, "request_id": "cmqf2lohi00017wlp3du979zt" }}{ "detail": [ { "loc": ["body", "presentation_id"], "msg": "String should have at least 1 character", "type": "string_too_short" } ], "error": { "code": "VALIDATION_FAILED", "status_code": 422, "retryable": false, "message": "Request validation failed.", "details": { "errors": [ { "loc": ["body", "presentation_id"], "msg": "String should have at least 1 character", "type": "string_too_short" } ] }, "request_id": null }}Example Task Result
Section titled “Example Task Result”Poll /task_status/{task_id} until task_status is SUCCESS. The
task_result contains the request_id to use with /presentation/download/{request_id}.
{ "task_id": "7f9801d8-c8bf-45c3-9fe7-d024b5a76f69", "task_status": "SUCCESS", "task_result": { "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "request_id": "7f9801d8-c8bf-45c3-9fe7-d024b5a76f69" }}Credits
Section titled “Credits”Translation costs 1 API credit per slide. Credits are checked before the task starts and charged once translation succeeds. See API Credits for details.
Validation
Section titled “Validation”presentation_idis required, must be non-empty, and must belong to your API key.languageis required and must match one of the supported languages (by code or English name, case-insensitive). Unsupported values are rejected with a 422.- You must have enough credits for the presentation’s slide count.
- Unknown request fields are rejected.
Supported Languages
Section titled “Supported Languages”Pass the code or the English name, in any casing. The value is normalized to the code.
| Code | Language |
|---|---|
CHINESE_SIMPLIFIED | Chinese (Simplified) |
CHINESE_TRADITIONAL_TAIWAN | Chinese (Traditional, Taiwan) |
CHINESE_TRADITIONAL_HONG_KONG | Chinese (Traditional, Hong Kong) |
SPANISH | Spanish |
SPANISH_MEXICO | Spanish (Mexico) |
ENGLISH | English (U.S.) |
ENGLISH_UK | English (U.K.) |
ENGLISH_IRELAND | English (Ireland) |
ENGLISH_AUSTRALIA | English (Australia) |
ENGLISH_CANADA | English (Canada) |
BENGALI | Bengali |
HINDI | Hindi |
PORTUGUESE | Portuguese |
PORTUGUESE_BRAZIL | Portuguese (Brazil) |
RUSSIAN | Russian |
JAPANESE | Japanese |
GERMAN, STANDARD | German |
GERMAN_SWITZERLAND | German (Switzerland) |
GERMAN_AUSTRIA | German (Austria) |
JAVANESE | Javanese |
KOREAN | Korean |
FRENCH | French |
FRENCH (Canada) | French (Canada) |
FRENCH (Switzerland) | French (Switzerland) |
VIETNAMESE | Vietnamese |
TELUGU | Telugu |
MARATHI | Marathi |
TAMIL | Tamil |
TURKISH | Turkish |
URDU | Urdu |
GUJARATI | Gujarati |
POLISH | Polish |
ARABIC | Arabic |
ARABIC_SAUDI_ARABIA | Arabic (Saudi Arabia) |
UKRAINIAN | Ukrainian |
ITALIAN | Italian |
MALAYALAM | Malayalam |
KANNADA | Kannada |
ORIYA | Oriya |
PUNJABI_PAKISTAN | Punjabi (Pakistan) |
SUNDA | Sundanese |
PUNJABI_INDIA | Punjabi (India) |
ROMANIAN | Romanian |
BHOJPURI | Bhojpuri |
AZERBAIJANI_IRAN | Azerbaijani (Iran) |
MAITHILI | Maithili |
HAUSA | Hausa |
BURMESE | Burmese |
KAREN | Karen |
CROATIAN | Croatian |
SERBIAN | Serbian |
AWADHI | Awadhi |
THAI | Thai |
DUTCH | Dutch |
YORUBA | Yoruba |
SINDHI | Sindhi |
UZBEK, NORTHERN | Uzbek, Northern |
MALAY | Malay |
AMHARIC | Amharic |
INDONESIAN | Indonesian |
IGBO | Igbo |
TAGALOG | Tagalog |
NEPALI | Nepali |
SARAIKI | Saraiki |
CEBUANO | Cebuano |
ASSAMESE | Assamese |
HUNGARIAN | Hungarian |
CHITTAGONIAN | Chittagonian |
MADURA | Madura |
SINHALA | Sinhala |
HARYANVI | Haryanvi |
MARWARI | Marwari |
CZECH | Czech |
GREEK | Greek |
MAGAHI | Magahi |
CHHATTISGARHI | Chhattisgarhi |
DECCAN | Deccan |
BELARUSIAN | Belarusian |
ZHUANG, NORTHERN | Zhuang, Northern |
PASHTO_PAKISTAN | Pashto (Pakistan) |
SOMALI | Somali |
MALAGASY | Malagasy |
RWANDA | Rwanda |
ZULU | Zulu |
BULGARIAN | Bulgarian |
SWEDISH | Swedish |
LOMBARD | Lombard |
OROMO, WEST-CENTRAL | Oromo, West-Central |
PASHTO_AFGHANISTAN | Pashto (Afghanistan) |
KAZAKH | Kazakh |
ILOCANO | Ilocano |
TATAR | Tatar |
FULFULDE, NIGERIAN | Fulfulde, Nigerian |
UYGHUR | Uyghur |
HAITIAN CREOLE FRENCH | Haitian Creole French |
AZERBAIJANI | Azerbaijani |
AFRIKAANS | Afrikaans |
ALBANIAN | Albanian |
ARMENIAN | Armenian |
BASQUE | Basque |
BOSNIAN | Bosnian |
CATALAN | Catalan |
DANISH | Danish |
ESPERANTO | Esperanto |
ESTONIAN | Estonian |
FINNISH | Finnish |
GANDA | Ganda |
GEORGIAN | Georgian |
HEBREW | Hebrew |
ICELANDIC | Icelandic |
IRISH | Irish |
LATIN | Latin |
LATVIAN | Latvian |
LITHUANIAN | Lithuanian |
MACEDONIAN | Macedonian |
MAORI | Maori |
MONGOLIAN | Mongolian |
NORWEGIAN_BOKMAL | Norwegian Bokmål |
NORWEGIAN_NYNORSK | Norwegian Nynorsk |
PERSIAN | Persian |
SHONA | Shona |
SLOVAK | Slovak |
SLOVENE | Slovenian |
SOTHO | Sotho |
SWAHILI | Swahili |
TSONGA | Tonga |
TSWANA | Tswana |
WELSH | Welsh |
XHOSA | Xhosa |