curl --request POST \
--url https://gengen.farm/api/gengen/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-5-0-260128",
"prompt": "An orange tabby cat napping on a sunlit windowsill, watercolor style."
}
'import requests
url = "https://gengen.farm/api/gengen/v1/images/generations"
payload = {
"model": "seedream-5-0-260128",
"prompt": "An orange tabby cat napping on a sunlit windowsill, watercolor style."
}
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({
model: 'seedream-5-0-260128',
prompt: 'An orange tabby cat napping on a sunlit windowsill, watercolor style.'
})
};
fetch('https://gengen.farm/api/gengen/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "image:550e8400-e29b-41d4-a716-446655440000",
"model": "seedream-5-0-260128",
"status": "succeeded",
"outputs": {
"images": [
"https://example.com/generated-image.jpeg"
]
}
}{
"error_code": "gengen.model_required",
"error_params": {
"field": "model"
},
"error": "A model is required"
}{
"error_code": "gengen.auth_required",
"error": "Missing Authorization bearer token"
}{
"error_code": "seedance.insufficient_balance",
"error": "Insufficient available balance"
}{
"error_code": "gengen.api_key_revoked",
"error": "GENGEN API key has been revoked"
}{
"error_code": "<string>",
"error_params": {},
"error": "<string>"
}Generate images
Generate one or more images synchronously. New integrations should use
normalized assets, controls, and providerOptions fields and read
generated media from outputs.images. The returned id identifies this
completed request for logs; it is not a task ID to poll.
curl --request POST \
--url https://gengen.farm/api/gengen/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-5-0-260128",
"prompt": "An orange tabby cat napping on a sunlit windowsill, watercolor style."
}
'import requests
url = "https://gengen.farm/api/gengen/v1/images/generations"
payload = {
"model": "seedream-5-0-260128",
"prompt": "An orange tabby cat napping on a sunlit windowsill, watercolor style."
}
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({
model: 'seedream-5-0-260128',
prompt: 'An orange tabby cat napping on a sunlit windowsill, watercolor style.'
})
};
fetch('https://gengen.farm/api/gengen/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "image:550e8400-e29b-41d4-a716-446655440000",
"model": "seedream-5-0-260128",
"status": "succeeded",
"outputs": {
"images": [
"https://example.com/generated-image.jpeg"
]
}
}{
"error_code": "gengen.model_required",
"error_params": {
"field": "model"
},
"error": "A model is required"
}{
"error_code": "gengen.auth_required",
"error": "Missing Authorization bearer token"
}{
"error_code": "seedance.insufficient_balance",
"error": "Insufficient available balance"
}{
"error_code": "gengen.api_key_revoked",
"error": "GENGEN API key has been revoked"
}{
"error_code": "<string>",
"error_params": {},
"error": "<string>"
}Authorizations
A workspace API key beginning with gengen_live_.
Body
Normalized synchronous image generation request. Legacy Seedream request aliases remain accepted for existing clients, but new integrations should use the fields documented here.
BytePlus image model ID. Supported Seedream models are
seedream-5-0-260128 and dola-seedream-5-0-pro-260628.
1"seedream-5-0-260128"
Text instruction describing the desired image.
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Advanced provider-specific overrides.
Show child attributes
Show child attributes
Response
The synchronous generation completed successfully.
Standard response fields are listed first. Compatibility aliases can follow them for existing clients.
Synchronous request ID, normally beginning with image:.
Normally succeeded for a successful synchronous response.
Show child attributes
Show child attributes
Compatibility alias for id; it is not a pollable task ID.
Compatibility alias for the first image output.
Compatibility alias for outputs.images.
Compatibility Unix timestamp in seconds.