Skip to main content
GET
/
v1beta
/
projects
/
{project_id}
/
locations
/
{location}
/
publishers
/
{publisher}
/
models
/
{model}
/
operations
/
{operation_id}
获取视频生成操作状态
curl --request GET \
  --url https://model-api.skyengine.com.cn/v1beta/projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}/operations/{operation_id} \
  --header 'Authorization: Bearer <token>'
{
  "name": "projects/my-project/locations/us-central1/operations/operation-123456789",
  "metadata": {},
  "done": false,
  "error": {
    "code": 123,
    "message": "<string>",
    "details": [
      {}
    ]
  },
  "response": {
    "generatedVideos": [
      {
        "uri": "https://my-bucket/generated-videos/video-123.mp4",
        "videoBytes": "aSDinaTvuI8gbWludGxpZnk=",
        "mimeType": "video/mp4",
        "createTime": "2023-11-07T05:31:56Z"
      }
    ]
  }
}
查询长时间运行的视频生成任务的状态和结果。

Authorizations

Authorization
string
header
required

ModelHub API密钥认证。在 Authorization HTTP Header 中包含您的 API-Key,格式为 Bearer {API_KEY}

Path Parameters

project_id
string
required

项目ID

Example:

"my-project"

location
string
required

地理位置

Example:

"us-central1"

publisher
string
required

发布者

Example:

"google"

model
string
required

模型名称

Example:

"veo-3.1-generate-preview"

operation_id
string
required

操作ID,从predictLongRunning接口返回的操作名称中提取

Example:

"projects/my-project/locations/us-central1/operations/operation-123456789"

Response

成功获取操作状态

name
string

操作名称

Example:

"projects/my-project/locations/us-central1/operations/operation-123456789"

metadata
object

操作元数据

done
boolean

操作是否完成

Example:

false

error
object

错误信息(如果操作失败)

response
object

视频生成响应(如果操作成功完成)