Zum Hauptinhalt springen
POST
/
midjourney
/
shorten
Midjourney Shorten
curl --request POST \
  --url https://api.acedata.cloud/midjourney/shorten \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A cute cat playing piano"
}
'
import requests

url = "https://api.acedata.cloud/midjourney/shorten"

payload = { "prompt": "A cute cat playing piano" }
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({prompt: 'A cute cat playing piano'})
};

fetch('https://api.acedata.cloud/midjourney/shorten', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "prompts": [
    "a serene mountain lake at sunrise, mist rising from the water, golden hour lighting --ar 16:9",
    "mountain lake sunrise with mist, golden light --ar 16:9 --v 6",
    "tranquil alpine lake, dawn mist, warm golden tones, cinematic --ar 16:9",
    "sunrise over a misty mountain lake, rich golden hour photography --ar 16:9 --style raw",
    "misty lake at dawn, mountains in background, golden sunrise --ar 16:9"
  ]
}
{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}
{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}
{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}
{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}

Autorisierungen

Authorization
string
header
erforderlich

Header

accept
enum<string>

Midjourney Shorten Param Accept

Verfügbare Optionen:
application/json

Body

application/json
prompt
string
erforderlich

Midjourney Shorten Prompt

Antwort

Midjourney Shorten Response 200

prompts
string[]

Midjourney Shorten Response 200 Prompts