Create task
curl --request POST \
--url https://gengen.farm/api/gengen/v1/qwen-image-edits/generations \
--header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen-image-edit-spicy",
"prompt": "Change the background to a sunny beach scene",
"assets": {
"referenceImages": [
"https://example.com/photo.png"
]
},
"controls": {
"seed": 42
}
}'import requests
url = "https://gengen.farm/api/gengen/v1/qwen-image-edits/generations"
payload = {
"model": "qwen-image-edit-spicy",
"prompt": "Change the background to a sunny beach scene",
"assets": { "referenceImages": ["https://example.com/photo.png"] }
}
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: 'qwen-image-edit-spicy',
prompt: 'Change the background to a sunny beach scene',
assets: {referenceImages: ['https://example.com/photo.png']}
})
};
fetch('https://gengen.farm/api/gengen/v1/qwen-image-edits/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "qwenedit:550e8400-e29b-41d4-a716-446655440000",
"model": "qwen-image-edit-spicy",
"status": "pending",
"outputs": {
"images": []
},
"createdAt": "2026-06-18T08:00:00.000Z",
"updatedAt": "2026-06-18T08:00:00.000Z",
"statusUpdateTime": "2026-06-18T08:00:00.000Z"
}{
"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 Qwen image edit task
Create an asynchronous Qwen image edit task.
POST
/
qwen-image-edits
/
generations
Create task
curl --request POST \
--url https://gengen.farm/api/gengen/v1/qwen-image-edits/generations \
--header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen-image-edit-spicy",
"prompt": "Change the background to a sunny beach scene",
"assets": {
"referenceImages": [
"https://example.com/photo.png"
]
},
"controls": {
"seed": 42
}
}'import requests
url = "https://gengen.farm/api/gengen/v1/qwen-image-edits/generations"
payload = {
"model": "qwen-image-edit-spicy",
"prompt": "Change the background to a sunny beach scene",
"assets": { "referenceImages": ["https://example.com/photo.png"] }
}
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: 'qwen-image-edit-spicy',
prompt: 'Change the background to a sunny beach scene',
assets: {referenceImages: ['https://example.com/photo.png']}
})
};
fetch('https://gengen.farm/api/gengen/v1/qwen-image-edits/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "qwenedit:550e8400-e29b-41d4-a716-446655440000",
"model": "qwen-image-edit-spicy",
"status": "pending",
"outputs": {
"images": []
},
"createdAt": "2026-06-18T08:00:00.000Z",
"updatedAt": "2026-06-18T08:00:00.000Z",
"statusUpdateTime": "2026-06-18T08:00:00.000Z"
}{
"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