1. grok
梧柏API使用文档
WHBAI · Grok Imagine
  • WHBAI · Google Gemini 原生 (v1alpha)
  • WHBAI · Google Gemini 原生
  • WHBAI · Ideogram
  • WHBAI · Ideogram V3
  • WHBAI · Midjourney
  • WHBAI · Jimeng
  • WHBAI · Kling
  • WHBAI · Luma
  • WHBAI · Luma V1
  • WHBAI · Omni 视频
  • WHBAI · Pixverse
  • WHBAI · Runway
  • WHBAI · Sora2
  • WHBAI · 统一视频 VEO
  • WHBAI · Vidu
  • WHBAI · 豆包 Volc
  • WHBAI · Suno
  • WHBAI · Playground
  • WHBAI · 账号与令牌
  • WHBAI · 阿里 Pix
  • WHBAI · 阿里百炼
  • WHBAI · 私域人像
  • WHBAI · Fal.ai
  • WHBAI · Replicate
  • WHBAI · 腾讯云 VOD
  • WHBAI · MiniMax
  • WHBAI · 支持模型列表
  • WHBAI · Grok Imagine
  • WHBAI · Seedance 2.0
  • WHBAI · TypeSafe
  • WHBAI · OpenAI 兼容
  • Grok
    • openai 查询任务
      GET
    • 创建视频
      POST
    • 编辑视频
      POST
  • grok
    • openai 创建视频,图生
      POST
  • 数据模型
    • GetV1VideosIdResponse
    • PostV1VideosGenerationsRequest
    • PostV1VideosEditsRequest
    • NewApiError
  1. grok

openai 创建视频,图生

POST
/v1/videos

网站中的模型与调用示例#

openai 创建视频,带图片#

请求参数#

{
  "contentType": "multipart/form-data",
  "properties": {
    "input_reference": {
      "description": "支持:首帧、文本\n\t\tveo2、veo2-fast、veo2-pro\n\t支持:首尾帧、首帧、文本\n\t\tveo2-fast-frames\n\t\tveo3、veo3-fast、veo3-pro、veo3-frames、veo3-fast-frames、veo3-pro-frames\n\t\tveo_3_1、veo_3_1-fast、veo_3_1-4K、veo_3_1-fast-4K\n\t\tveo3.1、veo3.1-fast、veo3.1-pro、veo3.1-4k、veo3.1-pro-4k\n\t支持:参考图(1-3)、文本\n\t\tveo3.1-components、veo3.1-fast-components、veo3.1-components-4k\n\t\tveo_3_1-components、veo_3_1-components-4K、veo_3_1-fast-components-4K",
      "example": "file://C:\\Users\\Administrator\\Desktop\\场景1.png",
      "format": "binary",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Support: first frame, text\n\t\tveo2, veo2-fast, veo2-pro\n\tSupport: first and last frames, first frame, text\n\t\tveo2-fast-frames\n\t\tveo3, veo3-fast, veo3-pro, veo3-frames, veo3-fast-frames, veo3-pro-frames\n\t\tveo_3_1, veo_3_1-fast, veo_3_1-4K, veo_3_1-fast-4K\n\t\tveo3.1, veo3.1-fast, veo3.1-pro, veo3.1-4k, veo3.1-pro-4k\n\tSupport: reference pictures (1-3), text\n\t\tveo3.1-components, veo3.1-fast-components, veo3.1-components-4k\n\t\tveo_3_1-components, veo_3_1-components-4K, veo_3_1-fast-components-4K"
        }
      }
    },
    "model": {
      "example": "veo_3_1",
      "type": "string"
    },
    "prompt": {
      "description": "提示词",
      "example": "让牛快乐的跳科目三",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Prompt"
        }
      }
    },
    "seconds": {
      "description": "时长",
      "example": "8",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Duration"
        }
      }
    },
    "size": {
      "description": "720x1280 竖屏 1280x720 横屏",
      "example": "16x9",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "720x1280 vertical screen 1280x720 horizontal screen"
        }
      }
    },
    "watermark": {
      "example": "false",
      "type": "string"
    }
  },
  "required": [
    "model",
    "prompt",
    "seconds",
    "input_reference",
    "size"
  ]
}

请求示例 · 请求示例#

{
  "input_reference": "file://C:\\Users\\Administrator\\Desktop\\场景1.png",
  "model": "veo_3_1",
  "prompt": "让牛快乐的跳科目三",
  "seconds": "8",
  "size": "16x9",
  "watermark": "false"
}

响应示例 · 成功示例#

{
  "created_at": 1762336916,
  "id": "video_55cb73b3-60af-40c8-95fd-eae8fd758ade",
  "model": "veo_3_1",
  "object": "video",
  "progress": 0,
  "seconds": "8",
  "size": "16x9",
  "status": "queued"
}

openai 创建视频,图生,视频生视频#

请求参数#

{
  "contentType": "multipart/form-data",
  "properties": {
    "input_reference": {
      "description": "图片 url",
      "example": "",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Image URL"
        }
      }
    },
    "model": {
      "description": "模型名称",
      "example": "grok-imagine-video,grok-1.5-video",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Model name"
        }
      }
    },
    "prompt": {
      "description": "提示词",
      "example": "让牛快乐的跳科目三",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Prompt"
        }
      }
    },
    "seconds": {
      "description": "时长",
      "example": "10",
      "type": "number",
      "x-i18n": {
        "en-US": {
          "description": "Duration"
        }
      }
    },
    "size": {
      "example": "16:9",
      "type": "string"
    },
    "video": {
      "description": "视频 url",
      "example": "",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Video URL"
        }
      }
    }
  },
  "required": [
    "model",
    "prompt"
  ]
}

请求示例 · openai 创建视频,图生,视频生视频#

{
  "model": "grok-imagine-video",
  "prompt": "让牛快乐的跳科目三",
  "seconds": "10",
  "size": "16:9"
}

请求示例 · openai 创建视频,图生#

{
  "model": "grok-videos",
  "prompt": "让牛快乐的跳科目三",
  "seconds": "6",
  "size": "16:9"
}

tags#

[
  "grok"
]

openai 创建视频,图生,视频生视频#

请求参数#

{
  "contentType": "multipart/form-data",
  "properties": {
    "input_reference": {
      "description": "图片 url",
      "example": "",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Image URL"
        }
      }
    },
    "model": {
      "description": "模型名称",
      "example": "grok-imagine-video,grok-1.5-video",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Model name"
        }
      }
    },
    "prompt": {
      "description": "提示词",
      "example": "让牛快乐的跳科目三",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Prompt"
        }
      }
    },
    "seconds": {
      "description": "时长",
      "example": "10",
      "type": "number",
      "x-i18n": {
        "en-US": {
          "description": "Duration"
        }
      }
    },
    "size": {
      "example": "16:9",
      "type": "string"
    },
    "video": {
      "description": "视频 url",
      "example": "",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Video URL"
        }
      }
    }
  },
  "required": [
    "model",
    "prompt"
  ]
}

请求示例 · openai 创建视频,图生,视频生视频#

{
  "model": "grok-imagine-video",
  "prompt": "让牛快乐的跳科目三",
  "seconds": "10",
  "size": "16:9"
}

请求示例 · openai 创建视频,图生#

{
  "model": "grok-videos",
  "prompt": "让牛快乐的跳科目三",
  "seconds": "6",
  "size": "16:9"
}

openai 创建视频,图生,视频生视频#

请求参数#

{
  "contentType": "multipart/form-data",
  "properties": {
    "input_reference": {
      "description": "图片 url",
      "example": "",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Image URL"
        }
      }
    },
    "model": {
      "description": "模型名称",
      "example": "grok-imagine-video,grok-1.5-video",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Model name"
        }
      }
    },
    "prompt": {
      "description": "提示词",
      "example": "让牛快乐的跳科目三",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Prompt"
        }
      }
    },
    "seconds": {
      "description": "时长",
      "example": "10",
      "type": "number",
      "x-i18n": {
        "en-US": {
          "description": "Duration"
        }
      }
    },
    "size": {
      "example": "16:9",
      "type": "string"
    },
    "video": {
      "description": "视频 url",
      "example": "",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Video URL"
        }
      }
    }
  },
  "required": [
    "model",
    "prompt"
  ]
}

请求示例 · openai 创建视频,图生,视频生视频#

{
  "model": "grok-imagine-video",
  "prompt": "让牛快乐的跳科目三",
  "seconds": "10",
  "size": "16:9"
}

请求示例 · openai 创建视频,图生#

{
  "model": "grok-videos",
  "prompt": "让牛快乐的跳科目三",
  "seconds": "6",
  "size": "16:9"
}

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Body 参数multipart/form-data必填

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/v1/videos' \
--header 'Authorization: Bearer <token>' \
--form 'model="veo_3_1"' \
--form 'prompt="让牛快乐的跳科目三"' \
--form 'seconds="8"' \
--form 'input_reference="file://C:\\Users\\Administrator\\Desktop\\场景1.png"' \
--form 'size="16x9"'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "code": 0,
    "message": "success",
    "data": {
        "task_id": "task_example_001"
    }
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:06
上一页
编辑视频
下一页
GetV1VideosIdResponse
Built with