Describe
POST
https://api.genartapi.com/describe
Parameters
NAME | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
imageUrl | string | true | url of the image that you want to describe |
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/describe?imageUrl=https://pics.craiyon.com/2023-06-05/6fd5a100ecff4046959a67f00584f99f.webp",
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/describe?imageUrl=https://pics.craiyon.com/2023-06-05/6fd5a100ecff4046959a67f00584f99f.webp"
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
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
"id": "1239426500210724934",
"flags": 0,
"descriptions": [
"1️⃣ An old man with white hair and a beard, wearing a brown shirt, in the style of digital art with a simple background, a high resolution portrait. ",
"2️⃣ A portrait of an old man with white hair and a beard, wearing simple . He has deep wrinkles on his face, which adds to the character's wise appearance. The background is a neutral color, focusing attention only on him. In the style of [Atey Ghailan](https://goo.gl/search?artist%20Atey%20Ghailan). ",
"3️⃣ A portrait of an old man with white hair and beard, wearing simple . He has wrinkles on his face that reflect wisdom and experience. The background is a dark brown, giving the impression he is sitting in front of it. In the style of digital art, using vector graphics to create a flat design effect. Use bright colors for contrast against the darker tones of his skin color. Emphasize details like textures, facial expressions, or any distinctive features. Focus on depth of field. ",
"4️⃣ old man with white beard, vector art style, brown and orange colour scheme, portrait, digital painting, 2d game art in the style of various artists."
],
"uri": "https://cdn.discordapp.com/ephemeral-attachments/1092492867185950852/1239426494229516350/6fd5a100ecff4046959a67f00584f99f.webp?ex=6642e15f&is=66418fdf&hm=3ea59ec4b5bf6b4751aa41dcda12db586b998c49a1b1474b167437d579bce04f&",
"proxy_url": "https://media.discordapp.net/ephemeral-attachments/1092492867185950852/1239426494229516350/6fd5a100ecff4046959a67f00584f99f.webp?ex=6642e15f&is=66418fdf&hm=3ea59ec4b5bf6b4751aa41dcda12db586b998c49a1b1474b167437d579bce04f&",
"options": [
{
"type": 2,
"style": 2,
"label": "1️⃣",
"custom": "MJ::Job::PicReader::1"
},
{
"type": 2,
"style": 2,
"label": "2️⃣",
"custom": "MJ::Job::PicReader::2"
},
{
"type": 2,
"style": 2,
"label": "3️⃣",
"custom": "MJ::Job::PicReader::3"
},
{
"type": 2,
"style": 2,
"label": "4️⃣",
"custom": "MJ::Job::PicReader::4"
},
{
"type": 2,
"style": 2,
"label": "🔄",
"custom": "MJ::Picread::Retry"
},
{
"type": 2,
"style": 2,
"label": "Imagine all",
"custom": "MJ::Job::PicReader::all"
}
]
}
three!