AILabTools API - Hitchcock Special Effects - API
Request
- URL:
https://www.ailabapi.com/api/portrait/effects/hitchcock-effects - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEGJPGPNGBMP - Image size: No more than 5 MB.
- Image resolution: Larger than 64x64px, smaller than 2048x2048px.
Headers
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Body
| Field | Required | Type | Scope | Default | Description |
|---|---|---|---|---|---|
version | YES | string | v2 | Version. | |
image_target | YES | file | |||
mode | NO | integer | 01234 | 0 | Camera movement mode. 0: Push forward shot, default with flowing effect.1: Wide-angle camera movement.2: Hitchcock camera movement.3: Swing camera movement.4: Bounce camera movement. |
long_side | NO | integer | [0, 1920] | 960 | The length of the video's longer side for rendering. The larger the value, the longer it takes, growing exponentially in powers of two. |
frame_num | NO | integer | 90 | Video frame rate (without speed change). The larger the value, the longer it takes, increasing linearly. | |
fps | NO | integer | 30 | Video frame rate. frame_num/fps determines the video duration. | |
use_flow | NO | integer | -101 | -1 | Whether to apply the flow effect. Enabling the flow effect typically increases processing time by approximately 20% to 30%. -1: The algorithm determines whether to enable the flow effect based on the mode value.0: Forcefully disable the flow effect.1: Forcefully enable the flow effect. |
speed_shift | NO | string | Constant Speed | Video Curve Speed Variation. More Details |
speed_shift
For example, 0,1,0.5,4,0.5,4,1,1 represents the curve in the following diagram.

Response
Response Field Handling Flow
-
Handle
Public Response FieldsParse and validate the
Public Response Fields, checking the status code or response message to ensure the request is successful and error-free. -
Handle
Business Response FieldsIf the
Public Response Fieldsare valid and error-free, proceed with processing the business logic in theBusiness Response Fields.
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
| Field | Type | Description |
|---|---|---|
data | object | The content of the result data returned. |
+video | string | Returns the base64 encoded string of the generated video. |
Response Example
{
"request_id": "",
"log_id": "",
"error_code": 0,
"error_msg": "",
"error_detail": {
"status_code": 200,
"code": "",
"code_message": "",
"message": ""
},
"data": {
"video": ""
}
}