curl --request POST \
--url https://api.acedata.cloud/midjourney/imagine \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mask": "<string>",
"mode": "fast",
"action": "generate",
"prompt": "A cat sitting on a table",
"timeout": 480,
"image_id": "<string>",
"translation": false,
"callback_url": "<string>",
"async": true,
"split_images": false,
"version": "<string>",
"hd": false,
"quality": "1",
"style_reference": false,
"moodboard": false
}
'import requests
url = "https://api.acedata.cloud/midjourney/imagine"
payload = {
"mask": "<string>",
"mode": "fast",
"action": "generate",
"prompt": "A cat sitting on a table",
"timeout": 480,
"image_id": "<string>",
"translation": False,
"callback_url": "<string>",
"async": True,
"split_images": False,
"version": "<string>",
"hd": False,
"quality": "1",
"style_reference": False,
"moodboard": False
}
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({
mask: '<string>',
mode: 'fast',
action: 'generate',
prompt: 'A cat sitting on a table',
timeout: 480,
image_id: '<string>',
translation: false,
callback_url: '<string>',
async: true,
split_images: false,
version: '<string>',
hd: false,
quality: '1',
style_reference: false,
moodboard: false
})
};
fetch('https://api.acedata.cloud/midjourney/imagine', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"actions": [
"upscale1",
"upscale2",
"upscale3",
"upscale4",
"reroll",
"variation1",
"variation2",
"variation3",
"variation4"
],
"success": true,
"task_id": "27a1128f-14b5-440e-a82d-510c81e6fcd4",
"image_id": "1211290228438868029",
"progress": 100,
"image_url": "https://midjourney.cdn.acedata.cloud/attachments/1219474225119887443/1211290228438868029/lwilson_A_cat_sitting_on_a_table_id2079872_dbe8e8a2-cec8-4e54-bd9d-4c2f8bfb919f.png?ex=65eda8ef&is=65db33ef&hm=2cec373068f121f3d2ecf43280810fe17b641527b87716e100401d299c8e0845&width=1024&height=1024",
"image_width": 1024,
"image_height": 1024,
"raw_image_url": "https://midjourney.cdn.acedata.cloud/attachments/1219474225119887443/1211290228438868029/lwilson_A_cat_sitting_on_a_table_id2079872_dbe8e8a2-cec8-4e54-bd9d-4c2f8bfb919f.png?ex=65eda8ef&is=65db33ef&hm=2cec373068f121f3d2ecf43280810fe17b641527b87716e100401d299c8e0845&",
"raw_image_width": 2048,
"raw_image_height": 2048
}{
"error": {
"code": "bad_request",
"message": "The json payload is not valid to request the API"
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "forbidden",
"message": "Sorry! Our Al moderators feel your prompt might be against our community standards."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "timeout",
"message": "Timeout to generate the image."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}Midjourney Imagine
curl --request POST \
--url https://api.acedata.cloud/midjourney/imagine \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mask": "<string>",
"mode": "fast",
"action": "generate",
"prompt": "A cat sitting on a table",
"timeout": 480,
"image_id": "<string>",
"translation": false,
"callback_url": "<string>",
"async": true,
"split_images": false,
"version": "<string>",
"hd": false,
"quality": "1",
"style_reference": false,
"moodboard": false
}
'import requests
url = "https://api.acedata.cloud/midjourney/imagine"
payload = {
"mask": "<string>",
"mode": "fast",
"action": "generate",
"prompt": "A cat sitting on a table",
"timeout": 480,
"image_id": "<string>",
"translation": False,
"callback_url": "<string>",
"async": True,
"split_images": False,
"version": "<string>",
"hd": False,
"quality": "1",
"style_reference": False,
"moodboard": False
}
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({
mask: '<string>',
mode: 'fast',
action: 'generate',
prompt: 'A cat sitting on a table',
timeout: 480,
image_id: '<string>',
translation: false,
callback_url: '<string>',
async: true,
split_images: false,
version: '<string>',
hd: false,
quality: '1',
style_reference: false,
moodboard: false
})
};
fetch('https://api.acedata.cloud/midjourney/imagine', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"actions": [
"upscale1",
"upscale2",
"upscale3",
"upscale4",
"reroll",
"variation1",
"variation2",
"variation3",
"variation4"
],
"success": true,
"task_id": "27a1128f-14b5-440e-a82d-510c81e6fcd4",
"image_id": "1211290228438868029",
"progress": 100,
"image_url": "https://midjourney.cdn.acedata.cloud/attachments/1219474225119887443/1211290228438868029/lwilson_A_cat_sitting_on_a_table_id2079872_dbe8e8a2-cec8-4e54-bd9d-4c2f8bfb919f.png?ex=65eda8ef&is=65db33ef&hm=2cec373068f121f3d2ecf43280810fe17b641527b87716e100401d299c8e0845&width=1024&height=1024",
"image_width": 1024,
"image_height": 1024,
"raw_image_url": "https://midjourney.cdn.acedata.cloud/attachments/1219474225119887443/1211290228438868029/lwilson_A_cat_sitting_on_a_table_id2079872_dbe8e8a2-cec8-4e54-bd9d-4c2f8bfb919f.png?ex=65eda8ef&is=65db33ef&hm=2cec373068f121f3d2ecf43280810fe17b641527b87716e100401d299c8e0845&",
"raw_image_width": 2048,
"raw_image_height": 2048
}{
"error": {
"code": "bad_request",
"message": "The json payload is not valid to request the API"
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "forbidden",
"message": "Sorry! Our Al moderators feel your prompt might be against our community standards."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "timeout",
"message": "Timeout to generate the image."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}Autorizações
API token from https://platform.acedata.cloud
Cabeçalhos
Midjourney Imagine Param Accept
application/json, application/x-ndjson Corpo
Midjourney Imagine Mask
Midjourney Imagine Mode
fast, relax, turbo Midjourney Imagine Action
Midjourney Imagine Prompt
"A cat sitting on a table"
Midjourney Imagine Timeout
Midjourney Imagine Image Id
Midjourney Imagine Translation
Midjourney Imagine Callback Url
Midjourney Imagine Async
Midjourney Imagine Split Images
Midjourney Imagine Version
Midjourney Imagine Hd
Midjourney Imagine Quality
Midjourney Imagine Style Reference
Midjourney Imagine Moodboard
Resposta
Midjourney Imagine Response 200
Midjourney Imagine Response 200 Actions
Midjourney Imagine Response 200 Success
Midjourney Imagine Response 200 Task Id
Midjourney Imagine Response 200 Image Id
Midjourney Imagine Response 200 Progress
Midjourney Imagine Response 200 Image Url
Midjourney Imagine Response 200 Image Width
Midjourney Imagine Response 200 Image Height
Midjourney Imagine Response 200 Raw Image Url
Midjourney Imagine Response 200 Raw Image Width
Midjourney Imagine Response 200 Raw Image Height
Esta página foi útil?

