Seed

Get a seed from a message ID.

The Send Model

You can get a seed from the message using the ✉️ emoji.

Properties

  • Name
    buttonMessageId
    Type
    string
    Description

    ✉️

  • Name
    button
    Type
    string
    Description

    A button ID from the image. You need this to invoke the follow up action.


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/button
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer {token}");

var raw = JSON.stringify({
  "button": "✉️", // Use the real emoji
  "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/button", 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.