通过速创科技的WuyinKeji GPT-Image-2 API生成图像,支持文字生成图像、参考图像、多种宽高比以及异步结果轮询。
This skill wraps the WuyinKeji (速创科技) GPT-Image-2 async image generation API.
ActionMethodURLSubmit taskPOSThttps://api.wuyinkeji.com/api/async/image_gptQuery resultGEThttps://api.wuyinkeji.com/api/async/detail?id=<task_id>&key=<key>
Authorization: <api_key>"key": "<api_key>" in JSON payloadbash
curl -s -X POST "https://api.wuyinkeji.com/api/async/image_gpt" \
-H "Content-Type: application/json" \
-H "Authorization: <API_KEY>" \
-d '{
"key": "<API_KEY>",
"prompt": "Your image generation prompt here",
"size": "16:9",
"urls": ["http://example.com/ref.jpg"]
}'
FieldRequiredTypeDescriptionkeyYesstringAPI keypromptYesstringGeneration promptsizeNostringAspect ratio: auto, 16:9, 9:16, 1:1, 3:2, 2:3 (default: auto)urlsNoarrayReference image URLs (up to 14 images supported by the model)
json
{
"code": 200,
"msg": "成功",
"data": {
"id": "image_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"count": "1"
}
}
Save the data.id — this is the async task ID.
bash
curl -s "https://api.wuyinkeji.com/api/async/detail?id=<TASK_ID>&key=<API_KEY>"
FieldMeaningstatus: 0Task submitted, waiting to startstatus: 1Generating in progressstatus: 2Done — check data.result[0] for image URL
json
{
"code": 200,
"data": {
"status": 2,
"result": ["https://openpt1.wuyinkeji.com/xxxx.png"],
"created_at": "2026-04-22 13:42:01",
"updated_at": "2026-04-22 13:43:17"
}
}
bash
curl -sL "<RESULT_URL>" -o output.png
Typical resolution: 1672×941 (the API output is fixed at this resolution regardless of the size parameter; use the size parameter mainly for aspect ratio hints).
urlsA Bash helper script is available at scripts/generate.sh:
bash
./scripts/generate.sh \
-k "<API_KEY>" \
-p "A beautiful sunset over mountains" \
-s "16:9" \
-r "http://example.com/ref.jpg" \
-o "output.png"
The script handles submit → poll → download in one command.