Account Settings
Retrieve settings available for your account
https://api.thenextleg.io/v2/settings
https://api.thenextleg.io/v2/settings?authToken=<token>&settingsToggle=<settingsToggle>
Request Body
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
. Use the messageId
at the GET Message endpoint to poll for results, or to you can wait for the result to arrive via webhook.
0
1
2
3
4
{
"success": true,
"messageId": "your-message-id",
"createdAt": "2023-04-04T13:07:01.927Z"
}
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.
Completed Response
The message you receive by using the GET Message endpoint or received via your webhook, will have the following: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": [
"(Redacted Name) version 1",
"(Redacted Name) version 2",
"(Redacted Name) version 3",
"(Redacted Name) version 4",
"(Redacted Name) version 5",
"Niji version 4",
"Niji version 5",
"(Redacted Name) Test",
"(Redacted Name) 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
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 passref
in your command - which can be used useful when using webhookswebhookOverride (optional)
You can optionally pass webhookOverride
that will route a response to a webhook of your choosing.
Please note that using a webhook is completely optional. You are welcome to use the GET Message endpoint to retrieve responses.
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": "(Redacted Name) 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
. Use the messageId
at the GET Message endpoint to poll for results, or to you can wait for the result to arrive via webhook.
0
1
2
3
4
{
"success": true,
"messageId": "your-message-id",
"createdAt": "2023-04-04T13:07:01.927Z"
}
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.
Completed 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
31
{
"createdAt": "2023-04-04T13:07:01.927Z",
"buttons": [
"(Redacted Name) version 1",
"(Redacted Name) version 2",
"(Redacted Name) version 3",
"(Redacted Name) version 4",
"(Redacted Name) version 5",
"Niji version 4",
"Niji version 5",
"(Redacted Name) Test",
"(Redacted Name) 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"
],
"type": "settings",
"content": "Adjust your settings here. Current suffix: ` --v 5` ",
"ref": "",
"responseAt": "2023-04-04T13:06:01.927Z"
}