Jimeng Official Format Image Generation
Generate images using the official Jimeng format interface via `POST /jm`.
https://zx1.deepwl.net/jmcurl -X POST "https://zx1.deepwl.net/jm?Action=CVSync2AsyncSubmitTask&Version=2022-08-31" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '
{
"req_key": "jimeng_t2i_v40",
"model": "jimeng-4.0",
"prompt": "The sunset glow illuminates the lake, with delicate oil painting texture",
"force_single": true,
"image_urls": [],
"width": 1024,
"height": 1024
}'{
"code": 10000,
"data": {
"task_id": "67fb9e82-126e-4c71-bb16-a3bb3789e3b7",
"status": "submitted"
},
"message": "Success",
"request_id": "67fb9e82-126e-4c71-bb16-a3bb3789e3b7",
"status": 10000,
"time_elapsed": "35.381µs"
}An image generation API in Jimeng's official format, submitted as application/json via POST /jm with the Action and Version query parameters required in the URL. Supports text-to-image, image-to-image, and other scenarios. After successful submission, a task task_id is returned; use Query Task to fetch the result later.
Supported Models
jimeng-4.0: Jimeng 4.0 model
Request Headers
Authorizationstring必填Authentication header. Uses a Bearer token, e.g. Bearer YOUR_API_KEY.
Content-Typestring必填Request content type, must be application/json.
Query Parameters
ActionstringOperation type. Fixed value: CVSync2AsyncSubmitTask (submit task).
VersionstringAPI version. Fixed value: 2022-08-31.
Request Body
req_keystring必填Service identifier. Fixed value: jimeng_t2i_v40.
modelstring必填Model name. For example, jimeng-4.0.
promptstring必填The prompt used to generate the image. Both Chinese and English are supported. It is recommended to keep it within 800 characters at most; overly long prompts may cause generation anomalies or fail to take effect. You can directly specify the image generation ratio in the prompt.
resolutionstringResolution. Optional values: 1k, 2k, 4k.
sizeintegerThe image area to generate (deprecated). Default: 4194304, which is 20482048, generating a 2K resolution image. Range: [10241024, 4096*4096], capable of generating 1K to 4K resolution images.
force_singlebooleanWhether to force generation of a single image. Default: false.
image_urlsarrayImage file URLs. Supports 0 to 10 images for image-to-image scenarios.
widthintegerImage width. Recommended values: 1024 (1K), 2048 (2K), 4096 (4K), etc.
heightintegerImage height. Recommended values: 1024 (1K), 2048 (2K), 4096 (4K), etc.
Recommended Sizes
1K Resolution
| Width x Height | Ratio |
|---|---|
| 1024x1024 | 1:1 |
2K Resolution
| Width x Height | Ratio |
|---|---|
| 2048x2048 | 1:1 |
| 2304x1728 | 4:3 |
| 2496x1664 | 3:2 |
| 2560x1440 | 16:9 |
| 3024x1296 | 21:9 |
4K Resolution
| Width x Height | Ratio |
|---|---|
| 4096x4096 | 1:1 |
| 4694x3520 | 4:3 |
| 4992x3328 | 3:2 |
| 5404x3040 | 16:9 |
| 6198x2656 | 21:9 |
Request Examples
Response Examples
Response Fields
codeintegerStatus code. 10000 indicates success.
dataobjectResponse data container.
task_idstringTask ID. Used to query task status and results later.
statusstringTask status.
messagestringStatus message.
request_idstringRequest ID.
statusintegerStatus code.
time_elapsedstringRequest duration.