Create asset
curl --request POST \
--url https://gengen.farm/api/gengen/v1/assets \
--header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"GroupId": "group-20260424-abc",
"URL": "https://example.com/portrait-front.jpg",
"AssetType": "Image",
"Name": "portrait-front",
"Moderation": {
"Strategy": "Default"
}
}'import requests
url = "https://gengen.farm/api/gengen/v1/assets"
payload = {
"GroupId": "group-20260424-abc",
"URL": "https://example.com/portrait-front.jpg",
"AssetType": "Image"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
GroupId: 'group-20260424-abc',
URL: 'https://example.com/portrait-front.jpg',
AssetType: 'Image'
})
};
fetch('https://gengen.farm/api/gengen/v1/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ResponseMetadata": {
"RequestId": "20260427000000000000000000000000",
"Action": "CreateAsset",
"Version": "2024-01-01",
"Service": "ark",
"Region": "ap-southeast-1"
},
"Result": {
"Id": "asset-20260427-abc"
}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}Assets API
Create an asset
Upload an image, video, or audio asset; preprocessing is asynchronous, so use it only after its status becomes Active.
POST
/
assets
Create asset
curl --request POST \
--url https://gengen.farm/api/gengen/v1/assets \
--header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"GroupId": "group-20260424-abc",
"URL": "https://example.com/portrait-front.jpg",
"AssetType": "Image",
"Name": "portrait-front",
"Moderation": {
"Strategy": "Default"
}
}'import requests
url = "https://gengen.farm/api/gengen/v1/assets"
payload = {
"GroupId": "group-20260424-abc",
"URL": "https://example.com/portrait-front.jpg",
"AssetType": "Image"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
GroupId: 'group-20260424-abc',
URL: 'https://example.com/portrait-front.jpg',
AssetType: 'Image'
})
};
fetch('https://gengen.farm/api/gengen/v1/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ResponseMetadata": {
"RequestId": "20260427000000000000000000000000",
"Action": "CreateAsset",
"Version": "2024-01-01",
"Service": "ark",
"Region": "ap-southeast-1"
},
"Result": {
"Id": "asset-20260427-abc"
}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}For a complete portrait tutorial, see Generate videos with face assets.
It covers manual Group and Asset creation with JSON examples, as well as sending an HTTPS URL
directly to the Seedance video task API for automatic asset preparation.
Body
application/json
Publicly reachable asset URL. Base64 uploads are not supported.
File requirements:
- Images: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, or HEIF; aspect ratio between 0.4 and 2.5; each dimension over 300 px and under 6,000 px; under 30 MB
- Videos: MP4 or MOV; 480p, 720p, 1080p, or 4K; 2–30 seconds; aspect ratio from 0.4 through 2.5; each dimension from 300 px through 6,000 px; 407,696–8,295,044 total pixels; 24–60 FPS; up to 200 MB
- Audio: WAV or MP3; 2–30 seconds; up to 15 MB