curl --request POST \ --url https://api.yuannengai.com/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-4o-image", "prompt": "一只可爱的机器人在花园里浇花", "size": "1:1", "n": 1, "resolution": "1K" }'
{ "code": 200, "data": [ { "status": "submitted", "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K" } ] }
使用 GPT-4o-image 模型生成高质量图像
Authorization: Bearer YOUR_API_KEY
"gpt-4o-image"
1:1
2:3
3:2
3:4
4:3
4:5
5:4
9:16
16:9
21:9
1
1K
2K
data:image/{格式};base64,
显示 属性
submitted