Describe

Describe an image.

The Describe Model

A job completion from imagine will return a button object. You can subsequently invoke follow up actions on the same image by using the buttonMessageId and button from the previous response.

Required Properties

  • Name
    url
    Type
    string
    Description

    The URL of the image to describe.


POST/v1/describe

Use Describe

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

var raw = JSON.stringify({
  "url": "https://....png",
  "ref": "your-ref",
  "webhookOverride": "https://your-webhook.com"
});

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

fetch("https://api.justimagineapi.org/v1/describe", 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.