所有图像编辑(异步)
接口:POST /v1/images/edits 归属:绘图模型/OpenAI Dall-e 格式 调用地址:Base URL https://api.allyang.cn(OpenAI 兼容前缀 https://api.allyang.cn/v1)+ 上述路径 鉴权:请求头 Authorization: Bearer <你的令牌>;令牌在控制台「令牌管理」创建 说明:下方为本接口契约。路径、字段名与枚举取值与线上接口一致;叙述文字已按本平台口径重写。价格、并发与限流等数值以控制台及实际返回为准,未确认处标注「待补」。
OpenAPI Specification
yaml
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/images/edits:
post:
summary: '所有图像编辑(异步) '
description: "画图类模型均支持异步:在请求上追加 query 参数 async=true,请求体不变。置为 true 即异步提交,响应返回 task_id 供后续查询。查询:GET /v1/images/tasks/{task_id} 获取任务状态,任务完成后响应内含生成图片 URL。"
tags:
- 绘图模型/OpenAI Dall-e 格式
parameters:
- name: async
in: query
description: "启用异步模式。"
required: true
example: 'true'
schema:
type: string
- name: webhook
in: query
description: ''
required: false
example: https://api.allyang.cn/<外部地址已按合规要求移除>
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: Bearer {{YOUR_API_KEY}}
schema:
type: string
default: Bearer {{YOUR_API_KEY}}
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
image:
description: "支持多图。"
example: E:\\Desktop\\gpt\\icon_samll2.png
type: string
format: binary
prompt:
example: 带上眼镜
type: string
model:
description: "支持 gpt-image-1、flux-kontext-pro、flux-kontext-max。"
example: gpt-image-1
type: string
required:
- image
- prompt
- model
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
security: []
components:
schemas: {}
securitySchemes: {}
servers: []
security: []