SRTGen.com LogoSRTGen.com

Translation API

Expand your reach by translating your subtitles into over 100 languages using state-of-the-art AI.

POST/api/v1/translate
Quick Implementation
curl -X POST https://api.srtgen.com/api/v1/translate \
  -H "x-api-key: <YOUR_API_KEY>" \
  -F "projectId=proj_8k2n9m1b" \
  -F "targetLanguageCode=es" \
  -F "modelId=pro"
POSThttps://api.srtgen.com/api/v1/translate

Request Parameters

ParameterTypeRequiredDescription
projectIdStringYesThe unique identifier of the project to translate.
targetLanguageCodeStringYes

ISO 639-1 code (e.g., 'es', 'fr', 'zh-CN').

modelIdStringNo'pro' (High Quality, 1 credit/min) or 'basic' (Fast, 1 credit/2 mins). Default is 'basic'.
Advanced: Basic Model (Cost-Optimized)
curl -X POST https://api.srtgen.com/api/v1/translate \
  -H "x-api-key: <YOUR_API_KEY>" \
  -F "projectId=proj_8k2n9m1b" \
  -F "targetLanguageCode=zh-CN" \
  -F "modelId=basic"
POSThttps://api.srtgen.com/api/v1/translate

Success Response

A successful request returns a 200 OK status. The translated subtitles are immediately synchronized and available for export or further modification in the workspace.

{
  "success": true,
  "projectId": "proj_8k2n9m1b",
  "targetLanguageCode": "es",
  "modelId": "pro"
}

Error Codes

StatusError CodeDescription
400missing_parameterProject ID or Target Language is missing.
401unauthorizedAPI Key is missing or invalid.
404not_foundProject ID does not exist.
403insufficient_balanceInsufficient credits for the operation.
500translation_failedAI engine failed to process the request.
500server_errorUnexpected internal server error occurred.
Error Response Structure
{
  "success": false,
  "error": "not_found",
  "message": "The project with ID 'proj_unknown' could not be found."
}
Was this page helpful?