Settings

You can set various settings for your account.


GET/v1/settings

Get Settings

You can get settings available on your account.

Request

GET
/v1/settings
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer {token}");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

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

Response

{
  "messageId": "message-id",
}

The Settings Response

Get the response from settings by using the GET v1/message endpoint. You can see more about getting messages here. You'll be subsequently able to set these settings in the POST /v1/settings endpoint.

Response

  {
      "buttons": [
         "Fast mode",
         ...
      ],
  }

POST/v1/settings

Set a Setting

After an image generation, you can use the response and the button model in order to perform various actions including reroll, upscaling and inpainting.

Attributes

  • Name
    settingsToggle
    Type
    string
    Description

    The setting from the buttons in the settings response

Request

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

var raw = JSON.stringify({
  "settingsToggle": "Fast mode",
});

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",
}

The Settings Response

Get the response from settings by using the GET v1/message endpoint.

Response

  {
      "buttons": [
         "Fast mode",
         ...
      ],
  }