Skip to main content
POST
/
generate
/
k
/
mj-txt2img
Midjourney Text-to-Image
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/mj-txt2img \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "aspectRatio": "16:9",
  "enableTranslation": false,
  "prompt": "Help me generate a sci-fi themed fighter jet in a beautiful sky",
  "speed": "relaxed",
  "stylization": 1,
  "variety": 10,
  "version": "7",
  "waterMark": "my_watermark",
  "weirdness": 1
}'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Industry-leading artistic AI image generation model, renowned for its unique aesthetic style and powerful artistic expression.

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

prompt
string
required

Prompt (required, max 2000 characters) - Text description for generation

Maximum length: 2000
Example:

"Help me generate a sci-fi themed fighter jet in a beautiful sky"

aspectRatio
enum<string>

Aspect ratio (optional) - Output aspect ratio

Available options:
1:2,
9:16,
2:3,
3:4,
5:6,
6:5,
4:3,
3:2,
1:1,
16:9,
2:1
Example:

"16:9"

enableTranslation
boolean
default:false

Enable translation (optional, default false) - Enable automatic translation

Example:

false

speed
enum<string>

Speed (optional) - API generation speed

Available options:
relaxed,
fast,
turbo
Example:

"relaxed"

stylization
integer

Stylization (optional, range 0-1000) - Artistic style intensity

Required range: 0 <= x <= 1000
Example:

1

variety
integer

Variety (optional, range 0-100, step 5) - Content diversity

Required range: 0 <= x <= 100
Example:

10

version
enum<string>

Version (optional) - Midjourney model version

Available options:
7,
6.1,
6,
5.2,
5.1,
niji6
Example:

"7"

waterMark
string

Watermark (optional) - Watermark identifier

Example:

"my_watermark"

weirdness
integer

Weirdness (optional, range 0-3000) - Creative uniqueness

Required range: 0 <= x <= 3000
Example:

1

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"