Hallo

Hallo lets you create portrait videos from single images.

~303.27s
~$0.421
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/hallo"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "input_image": "https://segmind-sd-models.s3.amazonaws.com/display_images/hallo/hallo-input.png",
12    "input_audio": "https://segmind-sd-models.s3.amazonaws.com/display_images/hallo/hallo-audio-2.mp3",
13    "pose_weight": 1.4,
14    "face_weight": 1,
15    "lip_weight": 1.2,
16    "face_expand_ratio": 1.2,
17    "base64": false
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23    result = response.json()
24    print(json.dumps(result, indent=2))
25else:
26    print(f"Error: {response.status_code}")
27    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/hallo

Parameters

input_audiorequired
string (uri)

Input audio file. Avoid special symbol in the filename as it may cause ffmpeg erros.

Default: "https://segmind-sd-models.s3.amazonaws.com/display_images/hallo/hallo-audio-2.mp3"
input_imagerequired
string (uri)

Input image of a talking-head.

Default: "https://segmind-sd-models.s3.amazonaws.com/display_images/hallo/hallo-input.png"
base64optional
boolean

Base64 encoding of the output image.

Default: false
face_expand_ratiooptional
number

Face Expand Ratio

Default: 1.2Range: 0 - 10
face_weightoptional
number

Weight of the Face in output

Default: 1Range: 0 - 10
lip_weightoptional
number

Weight of the Lip to apply

Default: 1.2Range: 0 - 10
pose_weightoptional
number

Weight of the Pose in output

Default: 1.4Range: 0 - 10

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