GPT Image 2.6
curl --request POST \
--url https://apistable.ai/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6",
"input": {
"prompt": "Studio photograph of a cobalt blue ceramic teapot, soft daylight, neutral background.",
"resolution": "1K",
"aspect_ratio": "1:1",
"version": "flare",
"output_count": 1,
"fallback": false
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gpt-image-2.6',
input: {
prompt: 'Studio photograph of a cobalt blue ceramic teapot, soft daylight, neutral background.',
resolution: '1K',
aspect_ratio: '1:1',
version: 'flare',
output_count: 1,
fallback: false
}
})
};
fetch('https://apistable.ai/api/v1/tasks/create_task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.ai/api/v1/tasks/create_task"
payload = {
"model": "gpt-image-2.6",
"input": {
"prompt": "Studio photograph of a cobalt blue ceramic teapot, soft daylight, neutral background.",
"resolution": "1K",
"aspect_ratio": "1:1",
"version": "flare",
"output_count": 1,
"fallback": False
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"task_id": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}OpenAI
GPT Image 2.6
可选 Flare 或 Sunburst,支持文生图、多参考图编辑及 1K、2K、4K 输出档位。
POST
/
api
/
v1
/
tasks
/
create_task
GPT Image 2.6
curl --request POST \
--url https://apistable.ai/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6",
"input": {
"prompt": "Studio photograph of a cobalt blue ceramic teapot, soft daylight, neutral background.",
"resolution": "1K",
"aspect_ratio": "1:1",
"version": "flare",
"output_count": 1,
"fallback": false
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gpt-image-2.6',
input: {
prompt: 'Studio photograph of a cobalt blue ceramic teapot, soft daylight, neutral background.',
resolution: '1K',
aspect_ratio: '1:1',
version: 'flare',
output_count: 1,
fallback: false
}
})
};
fetch('https://apistable.ai/api/v1/tasks/create_task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.ai/api/v1/tasks/create_task"
payload = {
"model": "gpt-image-2.6",
"input": {
"prompt": "Studio photograph of a cobalt blue ceramic teapot, soft daylight, neutral background.",
"resolution": "1K",
"aspect_ratio": "1:1",
"version": "flare",
"output_count": 1,
"fallback": False
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"task_id": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}参数与输入模式
model 和 input 始终必填。文生图传 prompt,参考图编辑同时传 image_urls。GIF 输出仅支持文生图。| 请求场景 | input 必填字段 |
|---|---|
| 文生图 | prompt |
| 参考图编辑 | prompt 与 image_urls |
| GIF 动图 | prompt、output_format=gif,且 aspect_ratio=auto(不传 image_urls) |
使用场景
将示例提交到创建任务接口,并将提示词和参考图地址替换为你的内容。{
"model": "gpt-image-2.6",
"input": {
"prompt": "Studio photograph of a cobalt blue ceramic teapot, soft daylight, neutral background.",
"resolution": "1K",
"aspect_ratio": "1:1",
"version": "flare"
}
}
{
"model": "gpt-image-2.6",
"input": {
"prompt": "Keep the product and label unchanged. Replace only the background with warm limestone in soft daylight.",
"image_urls": [
"https://cdn.example.com/product.png"
],
"resolution": "1K",
"aspect_ratio": "1:1"
}
}
{
"model": "gpt-image-2.6",
"input": {
"prompt": "Studio photograph of a cobalt blue ceramic teapot, soft daylight, neutral background.",
"resolution": "1K",
"aspect_ratio": "1:1",
"output_count": 4
}
}
{
"model": "gpt-image-2.6",
"input": {
"prompt": "A puppy raises one paw to wave, fixed camera, seamless loop.",
"output_format": "gif",
"aspect_ratio": "auto",
"resolution": "1K"
}
}
{
"model": "gpt-image-2.6",
"input": {
"prompt": "Minimal editorial poster with crisp serif typography reading \"AUTUMN ISSUE\", clean grid layout.",
"resolution": "2K",
"aspect_ratio": "3:4",
"version": "sunburst"
}
}
使用返回的 task_id 查询任务 或设置 callback_url,并在生成后 14 天内下载图片。
在线试用
设置参数并在线生成图片。
查看价格
查看各分辨率档位与计费规则。
授权
登录 APIstable 后,在 API Key 管理 创建并复制密钥。
每次调用都要在 HTTP 请求头传入:
Authorization: Bearer YOUR_API_KEY
将 YOUR_API_KEY 替换为你创建的 API Key。
请求体
application/json
回调
POST{$request.body#/callback_url}Webhook
请求体
application/json
任务成功或失败后,APIstable 向创建任务时传入的 callback_url 发送 JSON POST。验签后返回 HTTP 2xx 确认接收。
用 data.status 判断生成结果。部分成功也返回 succeeded,result.urls 仅包含成功图片,result.items 返回各生成项的状态与扣费。全部失败时为 failed,data.result 为 null,data.message 提供失败原因。
签名和去重使用 X-APIstable-Signature、X-APIstable-Timestamp 和 X-APIstable-Event-Id。详见 Webhook 安全与验签。
Webhook 请求体示例
{
"code": 200,
"msg": "success",
"data": {
"task_id": "c6adbc82-8b9a-4d6f-8b60-1114c8c4aafb",
"model": "gpt-image-2.6",
"status": "succeeded",
"created_at": "2026-11-23T08:30:00.000Z",
"completed_at": "2026-11-23T08:30:18.000Z",
"duration": 18000,
"charged_credits": 2.1,
"message": "",
"input": "{\"prompt\":\"Studio photograph of a cobalt blue ceramic teapot, soft daylight, neutral background.\",\"resolution\":\"1K\",\"aspect_ratio\":\"1:1\"}",
"result": {
"urls": [
"https://cdn.example.com/generated/image.png"
],
"items": [
{
"id": "e7aacd19-819a-4747-bbbf-46fb6f2995a5",
"status": "succeeded",
"charged_credits": 2.1,
"urls": [
"https://cdn.example.com/generated/image.png"
]
}
]
}
}
}
响应
2XX
已接收 Webhook。