ClickCease

GET Account Settings

GET
https://api.thenextleg.io/v2/settings

Retrieve settings available for your account

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 var axios = require('axios'); var config = { method: 'get', url: 'https://api.thenextleg.io/v2/settings', headers: { 'Authorization': 'Bearer <your-token>', 'Content-Type': 'application/json' }, data : data }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); });

HTTP Response

200Success

Your response will return a messageId. Store this somewhere so you can match it with what's received in your webhook.

0 1 2 3 4 { "success": true, "messageId": "your-message-id", "createdAt": "2023-04-04T13:07:01.927Z" }

New! Get your progress and retrieve a Message using GET

After receiving your messageId you can use the GET /v2/message/<messageId> in order to retrieve your progress and image.

See the GET /v2/message/<messageId> docs for more information.

Webhook URL Response

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 { "createdAt": "2023-04-04T13:07:01.927Z", "buttons": [ "MJ version 1", "MJ version 2", "MJ version 3", "MJ version 4", "MJ version 5", "Niji version 4", "Niji version 5", "MJ Test", "MJ Test Photo", "Half quality", "Base quality", "Base quality", "High quality (2x cost)", "Style low", "Style med", "Style high", "Style very high", "Reset Settings", "Public mode", "Stealth mode", "Remix mode", "Fast mode", "Relax mode" ], "content": "Adjust your settings here.", "ref": "", "responseAt": "2023-04-04T13:06:01.927Z" }

SET Account Settings

POST
https://api.thenextleg.io/v2/settings

Set Settings for your Account

Request Body

settingsToggle

Use one of the buttons in the previous GET request

ref (optional)

You can optionally pass ref in your command, that will be returned in the webhook response.

webhookOverride (optional)

You can optionally pass webhookOverride that will route your request to a different webhook.

Please note that if this is not configured correctly, you will not receive any response. If an image creation cannot be mapped back to it's original request, the webhook body will be routed to the default webhook.

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 var axios = require('axios'); var data = JSON.stringify({ "settingsToggle": "MJ version 5", "ref": "", "webhookOverride": "" }); var config = { method: 'post', url: 'https://api.thenextleg.io/v2/settings', headers: { 'Authorization': 'Bearer <your-token>', 'Content-Type': 'application/json' }, data : data }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); });

HTTP Response

200Success

Your response will return a messageId. Store this somewhere so you can match it with what's received in your webhook.

0 1 2 3 4 { "success": true, "messageId": "your-message-id", "createdAt": "2023-04-04T13:07:01.927Z" }

New! Get your progress and retrieve a Message using GET

After receiving your messageId you can use the GET /v2/message/<messageId> in order to retrieve your progress and image.

See the GET /v2/message/<messageId> docs for more information.

Webhook URL Response

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 { "createdAt": "2023-04-04T13:07:01.927Z", "buttons": [ "MJ version 1", "MJ version 2", "MJ version 3", "MJ version 4", "MJ version 5", "Niji version 4", "Niji version 5", "MJ Test", "MJ Test Photo", "Half quality", "Base quality", "Base quality", "High quality (x cost)", "Style low", "Style med", "Style high", "Style very high", "Reset Settings", "Public mode", "Stealth mode", "Remix mode", "Fast mode", "Relax mode" ], "content": "Adjust your settings here. Current suffix: ` --v 5` ", "ref": "", "responseAt": "2023-04-04T13:06:01.927Z" }
Surreal Full color, Up close, extreme macro, beautiful eyes Pin up girl by artgerm, Milo manara, Norman Rockwell and mcbess
Surreal Full color, Up close, extreme macro, beautiful eyes Pin up girl by artgerm, Milo manara, Norman Rockwell and mcbess