Blend
POST
https://api.imaginepro.ai/api/v1/midjourney/blend
You can use Midjourney to blend up to 5 images. Blend
is useful when you want
to mix multiple styles or content into one image.
POST /api/v1/midjourney/blend
Sample Request
{
"urls": [
"https://cdn.midjourney.com/ab739450-7a9a-4c91-857e-60892adf60e7/0_1.webp",
"https://cdn.midjourney.com/1ac7559b-335c-4c29-b617-2cf546ea0a15/0_2.png"
]
}
Request Body
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
urls | array | true | none | images URLs to blend together |
ref | string | false | none | none |
webhookOverride | string | false | none | none |
urls
An array of up to 5 URLs of where the image is currently stored. These can be URLs to an image on the web, or URLs to images on your server. For example:
{
"urls": [
"https://cdn.midjourney.com/ab739450-7a9a-4c91-857e-60892adf60e7/0_1.webp",
"https://cdn.midjourney.com/1ac7559b-335c-4c29-b617-2cf546ea0a15/0_2.png"
]
}
ref (optional)
You can optionally pass ref
in your command - which can be used useful when using webhooks You might want to do this to pass some simple metadata through to your webhook.
webhookOverride (optional)
You can optionally pass webhookOverride
that will route a response to a webhook of your choosing. Please note that using a webhook is completely optional. You are welcome to use the GET Message endpoint to retrieve responses.
Sample Response
{
"success": true,
"messageId": "your-message-id",
"createdAt": "2023-08-01T14:03:01.817Z"
}
Response Body
Name | Type | Description |
---|---|---|
success | boolean | a boolean value for the generation job creation status |
messageId | string | the messageId for querying the progress later |
createdAt | string | timestamp of the task creation |
error | string | error message if any |
Examples
const axios = require("axios")
const config = {
method: "post",
url: "https://api.imaginepro.ai/api/v1/midjourney/blend",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <your-token>",
},
data: {
urls: [
"https://cdn.midjourney.com/ab739450-7a9a-4c91-857e-60892adf60e7/0_1.webp",
"https://cdn.midjourney.com/1ac7559b-335c-4c29-b617-2cf546ea0a15/0_2.png",
],
},
}
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data))
})
.catch(function (error) {
console.log(error)
})