curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/gpt-image-1.5/edit",
"input": {
"image_urls": [
"https://example.com/image.png"
],
"prompt": "Replace the sky with a starry night sky.",
"size": "1024x1024",
"n": 1
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}OpenAI
GPT Image 1.5 图像编辑
GPT Image 1.5 图像编辑 API 通过文字指令、参考图和可选蒙版,对图像中的选定区域进行有针对性的修改。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/gpt-image-1.5/edit",
"input": {
"image_urls": [
"https://example.com/image.png"
],
"prompt": "Replace the sky with a starry night sky.",
"size": "1024x1024",
"n": 1
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
- openai/gpt-image-1.5/edit - 使用提示词和参考图编辑图像。
功能
- 使用提示词和参考图编辑图像。
image_urls至少接受 1 张图像。- 每次编辑请求生成一张图像,并按一张计费。
输出选项
图像尺寸
size:可选。可选值:1024x1024、1024x1536、1536x1024。默认:1024x1024。
图像数量
n:可选的兼容参数。可选值:1、2、3、4。默认:1。每次编辑请求只生成一张图像并按一张计费;更大的值不会增加输出数量。
高级参数
model 和可选的 callback_url 放在请求根级。所有工作流参数(包括输出选项)都放在 input 内。
提示词
prompt:必填。描述要做的修改。长度:1-1,000 个字符。- 至少包含一个非空白字符。
图像 URL
image_urls:必填。提供公开可访问的图像 URL。至少 1 项。每项都必须是 HTTP(S) URL。
蒙版 URL
mask_url:可选。蒙版图的公开可访问 HTTP(S) URL,用于选定要编辑的区域。
授权
使用 VIDGO_API_KEY。
请求体
application/json