gpt-image-2.6-sunburst-4K
High quality model
| 详情 |
|---|
prompt | string | 可选 | - | |
aspect_ratio | 可选值之一 | 可选 | "1:1" |
|
size | 可选值之一 | 可选 | "4K" |
|
quality | 可选值之一 | 可选 | "medium" |
|
curl -X POST "https://jenvid.com/v1/media/generate" \
-H "Authorization: Bearer $JENVID_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "gpt-image-2.6-sunburst-4k",
"mode": "t2i",
"params": {}
}'curl -X POST "https://jenvid.com/v1/media/generate" \
-H "Authorization: Bearer $JENVID_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "gpt-image-2.6-sunburst-4k",
"mode": "t2i",
"params": {
"size": "4K",
"prompt": "A lighthouse on a rocky cliff at golden hour, soft clouds, cinematic light",
"quality": "medium",
"aspect_ratio": "1:1"
}
}'i2i| 参数 | 类型 | 是否必填 | 默认值 | 详情 |
|---|---|---|---|---|
prompt | string | 可选 | - | |
images_list | image 资源 ID 列表 | 必填 | - | |
aspect_ratio | 可选值之一 | 可选 | "1:1" |
|
size | 可选值之一 | 可选 | "4K" |
|
quality | 可选值之一 | 可选 | "medium" |
|
# Media IDs below are placeholders: replace them with your own uploaded assets before running this.
curl -X POST "https://jenvid.com/v1/media/generate" \
-H "Authorization: Bearer $JENVID_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "gpt-image-2.6-sunburst-4k",
"mode": "i2i",
"params": {
"images_list": [
"asset:00000000-0000-4000-8000-000000000001"
]
}
}'# Media IDs below are placeholders: replace them with your own uploaded assets before running this.
curl -X POST "https://jenvid.com/v1/media/generate" \
-H "Authorization: Bearer $JENVID_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "gpt-image-2.6-sunburst-4k",
"mode": "i2i",
"params": {
"size": "4K",
"prompt": "A lighthouse on a rocky cliff at golden hour, soft clouds, cinematic light",
"quality": "medium",
"images_list": [
"asset:00000000-0000-4000-8000-000000000001",
"asset:00000000-0000-4000-8000-000000000002"
],
"aspect_ratio": "1:1"
}
}'将请求提交到 POST /v1/media/generate,返回 202 和 task_id。每 5 秒轮询一次 GET /v1/media/tasks/{task_id},直到 is_final 为 true:此时状态为 succeeded、failed 或 cancelled,同一个任务中包含结果(outputs)或错误(error_code 和 error_message)。使用相同的 Idempotency-Key 重复提交会返回原任务。响应中的 ID 和 URL 仅为示例。
# Needs curl and jq.
# 1. Submit. The response is 202 with task_id, state and credits_held.
ID=$(curl -s -X POST "https://jenvid.com/v1/media/generate" \
-H "Authorization: Bearer $JENVID_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "gpt-image-2.6-sunburst-4k",
"mode": "t2i",
"params": {}
}' | jq -r .task_id)
echo "task: $ID"
# 2. Poll every 5 seconds until is_final is true (state is then succeeded, failed or cancelled).
while true; do
TASK=$(curl -s "https://jenvid.com/v1/media/tasks/$ID" -H "Authorization: Bearer $JENVID_API_KEY")
echo "state: $(echo "$TASK" | jq -r .state)"
[ "$(echo "$TASK" | jq -r .is_final)" = "true" ] && break
sleep 5
done
# 3. The final task carries the result: outputs[].url when succeeded, error_code and error_message when failed.
echo "$TASK" | jq '{state, outputs, error_code, error_message, credits}'{
"task_id": "5b0c9e1e-0000-4000-8000-000000000001",
"state": "queued",
"credits_held": "0.250000"
}错误使用小写代码,并包含 retryable 和 request_id。待处理的取消并不等于已取消:如果模型仍然完成,该任务仍可能被扣费。取消方式见 API 参考。
POST /v1/generations 在 inputs(以及可选的 quote_id)中接受相同的值,并返回 generation 资源:按 id 轮询 GET /v1/generations/{id},直到 status 为 succeeded、failed 或 cancelled,然后获取 GET /v1/generations/{id}/result。其错误代码为大写。新集成应优先使用上面的 media API;两者使用相同的流程和价格。
# Needs curl and jq.
# 1. Submit. The response is 202 with the generation id.
ID=$(curl -s -X POST "https://jenvid.com/v1/generations" \
-H "Authorization: Bearer $JENVID_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"mode": "t2i",
"model": "gpt-image-2.6-sunburst-4k",
"inputs": {}
}' | jq -r .id)
echo "generation: $ID"
# 2. Poll until the status is succeeded, failed or cancelled.
while true; do
STATUS=$(curl -s "https://jenvid.com/v1/generations/$ID" -H "Authorization: Bearer $JENVID_API_KEY" | jq -r .status)
echo "status: $STATUS"
case "$STATUS" in succeeded|failed|cancelled) break ;; esac
sleep 2
done
# 3. Fetch the result (only available once the status is succeeded).
curl -s "https://jenvid.com/v1/generations/$ID/result" -H "Authorization: Bearer $JENVID_API_KEY"{
"id": "5b0c9e1e-0000-4000-8000-000000000001",
"object": "generation",
"status": "queued"
}from 0.18 cr (积分). 每次请求为固定价格。
文档版本 1,发布于 2026-12-03。