创建视频

POST /v1/videos/generations

MethodPOST
Path/v1/videos/generations
Typehttp
Status1
Module2102810
Folder88331084

概览

MethodPOST
Path/v1/videos/generations
Typehttp
Status1
Module2102810
Folder88331084

参数

{
  "header": [
    {
      "required": false,
      "description": "",
      "type": "string",
      "id": "VyYem9P0Dd",
      "enable": true,
      "name": "Content-Type",
      "sampleValue": "application/json"
    },
    {
      "required": false,
      "description": "",
      "type": "string",
      "id": "2K18jBkaBq",
      "enable": true,
      "name": "Authorization",
      "sampleValue": ""
    }
  ]
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "model": {
        "type": "string",
        "description": "grok-imagine-video、grok-imagine-video-1.5-preview"
      },
      "prompt": {
        "type": "string",
        "description": "提示词"
      },
      "resolution": {
        "type": "string",
        "description": "(\"480p\" | \"720p\")"
      },
      "aspect_ratio": {
        "type": "string",
        "description": "(\"1:1\" | \"16:9\" | \"9:16\")"
      },
      "duration": {
        "type": "integer",
        "description": " [1, 15]"
      },
      "image": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "x-apifox-orders": [
          "url"
        ],
        "description": "不能和reference_images一起用"
      },
      "reference_images": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            }
          },
          "x-apifox-orders": [
            "url"
          ]
        },
        "description": "不能和reference_images一起用"
      }
    },
    "required": [
      "model",
      "prompt",
      "resolution",
      "aspect_ratio",
      "duration"
    ],
    "x-apifox-orders": [
      "model",
      "prompt",
      "resolution",
      "aspect_ratio",
      "duration",
      "image",
      "reference_images"
    ]
  },
  "required": true,
  "mediaType": "",
  "examples": [],
  "oasExtensions": ""
}

响应

[
  {
    "id": 192308233,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {}
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": []
  }
]

响应示例

[
  {
    "name": "示例 1",
    "responseId": 192308233,
    "data": "{\r\n    \"model\": \"grok-imagine-video\",\r\n    \"prompt\": \"A serene lake at sunrise with mist rolling over the water\",\r\n    \"duration\": 4,\r\n    \"aspect_ratio\": \"16:9\",\r\n    \"resolution\": \"480p\",\r\n    // \"image\":{\r\n    //     \"url\":\"https://imageproxy.zhongzhuan.chat/api/proxy/image/bb9bd34363da4fa486c9e645a6b1349e.png\"\r\n    // }\r\n}",
    "id": "019ed9e8-f4ec-70ed-9b45-f57e33e281c4"
  }
]