curl --request POST \
--url https://api.ephone.ai/midjourney/describe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image": "https://example.com/cat.png"
}
'import requests
url = "https://api.ephone.ai/midjourney/describe"
payload = { "image": "https://example.com/cat.png" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({image: 'https://example.com/cat.png'})
};
fetch('https://api.ephone.ai/midjourney/describe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ephone.ai/midjourney/describe"
payload := strings.NewReader("{\n \"image\": \"https://example.com/cat.png\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"task_id": "mj-6f1c2b0e9a7d4e2fb1c3d5e7f9a1b2c3",
"action": "describe",
"status": "success",
"descriptions": [
"一只橘猫趴在窗台上晒太阳……"
],
"created_at": 1792000000,
"finished_at": 1792000000
}{
"error": {
"code": "invalid_request",
"message": "index must be between 1 and 4"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient balance"
}
}{
"error": {
"code": "queue_full",
"message": "Queue is full, please try again later"
}
}{
"error": {
"code": "upstream_error",
"message": "The service is temporarily unavailable, please retry"
}
}Describe
Upload an image and get prompt-ready descriptions of it.
curl --request POST \
--url https://api.ephone.ai/midjourney/describe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image": "https://example.com/cat.png"
}
'import requests
url = "https://api.ephone.ai/midjourney/describe"
payload = { "image": "https://example.com/cat.png" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({image: 'https://example.com/cat.png'})
};
fetch('https://api.ephone.ai/midjourney/describe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ephone.ai/midjourney/describe"
payload := strings.NewReader("{\n \"image\": \"https://example.com/cat.png\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"task_id": "mj-6f1c2b0e9a7d4e2fb1c3d5e7f9a1b2c3",
"action": "describe",
"status": "success",
"descriptions": [
"一只橘猫趴在窗台上晒太阳……"
],
"created_at": 1792000000,
"finished_at": 1792000000
}{
"error": {
"code": "invalid_request",
"message": "index must be between 1 and 4"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient balance"
}
}{
"error": {
"code": "queue_full",
"message": "Queue is full, please try again later"
}
}{
"error": {
"code": "upstream_error",
"message": "The service is temporarily unavailable, please retry"
}
}POST /v1/task/submit with model set to midjourney-describe and the parameters inside input. Both behave and bill the same.status is success, descriptions are in descriptions), so there is nothing to fetch.Authorizations
Send your API key in the Authorization: Bearer YOUR_API_KEY header.
Body
Response
OK
Task ID.
Action name, e.g. imagine, upscale.
Task status, see the table above.
submitted, in_progress, success, failure Created at (Unix seconds).
The speed tier chosen on submit: relax, fast or turbo, which is also the tier you are billed for. Describe has no speed, so it is omitted.
The prompt that was submitted.
Image URLs in index order (the first one is index: 1). An image that failed content review is an empty string.
Video URLs (video endpoints) in index order.
Image descriptions (describe).
Seed.
Operations you can run next on this task, e.g. ["upscale", "variation", "reroll"]. Pass one as action to POST /midjourney/action together with task_id; per-image operations also take index, reroll doesn't.
Failure reason.
Finished at (Unix seconds).
Usage, returned only on success, e.g. {"type": "call", "multiplier": 2}. multiplier is the spec multiplier on the unit price of the selected speed tier in the price table: 2 for HD, 0.5 for a V7 draft; videos depend on resolution and count. Account discounts are not included; see the X-Billing-Amount response header (query with X-Billing-Detail: true) for what the task actually cost.
Was this page helpful?