Heygen Video Translate

Transforms videos into multiple languages with natural voice and lip-sync, enhancing global engagement.

~164.22s
~$0.577
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/heygen-video-translate"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "video": "https://segmind-resources.s3.amazonaws.com/input/89ec281a-dfc1-45c3-8302-2e2e379d1978-dd981c0c2d9bc79fc70d54213f22fa0d.mp4",
12    "output_language": "Italian"
13}
14
15response = requests.post(url, headers=headers, json=data)
16
17if response.status_code == 200:
18    result = response.json()
19    print(json.dumps(result, indent=2))
20else:
21    print(f"Error: {response.status_code}")
22    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/heygen-video-translate

Parameters

output_languagerequired
string

Select the language for output translation. Consider Hindi for India or Spanish for Latin America.

Allowed values (178 total):
"English""Spanish""French""Hindi""Italian""German""Polish""Portuguese""Chinese""Japanese"+168 more
videooptional
string (uri)

Provide the video URL for translation. E.g., Use a cloud storage link for large files.

Default: "https://segmind-resources.s3.amazonaws.com/input/89ec281a-dfc1-45c3-8302-2e2e379d1978-dd981c0c2d9bc79fc70d54213f22fa0d.mp4"

Response Type

Returns: Video

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out