Text to image
curl --request POST \
--url https://gengen.farm/api/gengen/v1/wonderclip-images/generations \
--header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "wonder-banana-pro",
"mode": "text_to_image",
"prompt": "A glass greenhouse floating above a misty forest at sunrise.",
"controls": {
"resolution": "2K",
"ratio": "16:9",
"outputCount": 1
}
}'import requests
url = "https://gengen.farm/api/gengen/v1/wonderclip-images/generations"
payload = {
"model": "wonder-banana-pro",
"prompt": "A glass greenhouse floating above a misty forest at sunrise."
}
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: 'wonder-banana-pro',
prompt: 'A glass greenhouse floating above a misty forest at sunrise.'
})
};
fetch('https://gengen.farm/api/gengen/v1/wonderclip-images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "wonderclip-image10:ag_123",
"model": "wonder-banana-pro",
"status": "queued",
"outputs": {
"images": []
}
}{
"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": {}
}Image API
Create a WonderClip image task
Create an asynchronous WonderClip text-to-image or image-to-image task.
POST
/
wonderclip-images
/
generations
Text to image
curl --request POST \
--url https://gengen.farm/api/gengen/v1/wonderclip-images/generations \
--header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "wonder-banana-pro",
"mode": "text_to_image",
"prompt": "A glass greenhouse floating above a misty forest at sunrise.",
"controls": {
"resolution": "2K",
"ratio": "16:9",
"outputCount": 1
}
}'import requests
url = "https://gengen.farm/api/gengen/v1/wonderclip-images/generations"
payload = {
"model": "wonder-banana-pro",
"prompt": "A glass greenhouse floating above a misty forest at sunrise."
}
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: 'wonder-banana-pro',
prompt: 'A glass greenhouse floating above a misty forest at sunrise.'
})
};
fetch('https://gengen.farm/api/gengen/v1/wonderclip-images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "wonderclip-image10:ag_123",
"model": "wonder-banana-pro",
"status": "queued",
"outputs": {
"images": []
}
}{
"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": {}
}Authorizations
A workspace API key beginning with gengen_live_.
Body
application/json
Supported WonderClip image model IDs:
wonder-banana-pro— WonderClip Banana Prowonder-image-2— WonderClip Image 2
Available options:
wonder-banana-pro, wonder-image-2 Minimum string length:
1When omitted, GENGEN selects the mode from the supplied assets.
Supported values:
text_to_image— generate from a text promptimage_to_image— transform one or more reference images
Available options:
text_to_image, image_to_image Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes