Variation
GET
https://api.genartapi.com/info
Parameters
NAME | TYPE | REQUIRED | DESCRIPTION |
---|
Response Code
RESPONSE CODE | DESCRIPTION |
---|---|
200: OK | Successful Response |
400: Bad Request | The request data format is incorrect |
401: Unauthorized | The API key is incorrect or expired |
500: Internal Server Error | Service is experiencing an error |
Request Example:
Make sure you also passed servier_id, channel_id, discord_token and (our) apiKey.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const axios = require("axios")
const config = {
method: "post",
url: "https://api.genartapi.com/info",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <your-midjourney-api-key>",
"server_id": "<servier_id>",
"channel_id": "<channel_id>",
"discord_token": "<discord_token>",
},
}
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data))
})
.catch(function (error) {
console.log(error)
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import requests
url = "https://api.genartapi.com/info"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <your-midjourney-api-key>",
"server_id": "<servier_id>",
"channel_id": "<channel_id>",
"discord_token": "<discord_token>",
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
print(response.json())
else:
print(response.text)
three!
Response Example:
you can get generated images by using uri or proxy_url
1
2
3
4
5
6
7
8
9
10
11
12
{
"subscription": "Standard (Active monthly, renews next on <t:1717212880>)",
"jobMode": "",
"visibilityMode": "Public",
"fastTimeRemaining": "13.47/15.0 hours (89.78%)",
"lifetimeUsage": "83 images",
"relaxedUsage": "1 images",
"queuedJobsFast": "0",
"queuedJobsRelax": "0",
"runningJobs": "None"
}
three!