Blend

Blend up to 5 images.

The Blend Model

Properties

  • Name
    urls
    Type
    string
    Description

    f An array of 5 URLs where the image is currently stored. These can be URLs to an image on the web, or URLs to images on your server.


POST/v1/button

Invoke a Button

After an image generation, you can use the ✉️ emoji to get a seed.

Optional attributes

  • Name
    ref (optional)
    Type
    string
    Description

    A unique identifier for the job.

  • Name
    webhookOverride (optional)
    Type
    string
    Description

    A webhook URL to override the default webhook for this job.

Request

POST
/v1/blend
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer {token}");

var raw = JSON.stringify({
  "urls": ["..."]
  "buttonMessageId": "button-message-id",
  "ref": "your-ref",
  "webhookOverride": "https://your-webhook.com"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.justimagineapi.org/v1/blend", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Response

{
  "messageId": "message-id",
}
GET/v1/message/:messageId

Get The Completion Response

The completion response will automatically be sent to your webhook when the image is ready. You can see more about getting messages here.