跳转到主要内容
POST
/
ms
/
v1
/
run
/
openai
/
gpt-image-2
/
edit
GPT Image 2 - Edit
curl --request POST \
  --url https://api.mountsea.ai/ms/v1/run/openai/gpt-image-2/edit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": {
    "prompt": "Add a rainbow.",
    "image_size": "auto",
    "image_urls": [
      "https://example.com/a.jpg"
    ]
  }
}
'
{
  "task_id": "ms-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "endpoint": "google/veo-3.1/text-to-video",
  "model": "veo-3.1",
  "mode": "text-to-video",
  "created_at": "2023-11-07T05:31:56Z",
  "error": {
    "code": 500,
    "message": "task failed"
  },
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "elapsed_ms": 123,
  "output": {
    "images": [
      {
        "url": "<string>",
        "b64": "<string>",
        "mime": "<string>"
      }
    ]
  }
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
input
object

Parameters for this endpoint (input_schema.params). Input media URLs use schema field names, e.g. image_url, image_urls, mask_url.

webhook_url
string<uri>

Optional webhook URL for terminal status (HMAC header x-ms-signature)

响应

Image task (usually queued right after submit)

Async image task

task_id
string
必填
示例:

"ms-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

endpoint
string
必填
示例:

"google/veo-3.1/text-to-video"

model
string
必填
示例:

"veo-3.1"

capability
enum<string>
必填
可用选项:
image,
video,
audio
mode
string
必填
示例:

"text-to-video"

status
enum<string>
必填
可用选项:
queued,
processing,
succeeded,
failed,
timeout,
canceled
created_at
string<date-time>
必填
error
object
started_at
string<date-time> | null
completed_at
string<date-time> | null
elapsed_ms
integer | null
output
object

Normalized task output. Null while queued/processing; populated when status=succeeded.