> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tkhub.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 即梦视频生成

> 即梦官方 API 格式的视频生成接口。

支持通过 Action 参数指定操作类型：
- `CVSync2AsyncSubmitTask`: 提交视频生成任务
- `CVSync2AsyncGetResult`: 获取任务结果

需要在查询参数中指定 Action 和 Version。




## OpenAPI

````yaml /api.json post /jimeng/
openapi: 3.0.1
info:
  title: TKHub API
  description: TKHub 平台 API 接口文档
  version: 1.0.0
servers:
  - url: https://api.tkhub.ai
    description: 生产环境
  - url: https://api-test.tkhub.ai
    description: 测试环境
security:
  - bearerAuth: []
paths:
  /jimeng/:
    post:
      tags:
        - 视频生成/即梦格式
      summary: 即梦视频生成
      description: |
        即梦官方 API 格式的视频生成接口。

        支持通过 Action 参数指定操作类型：
        - `CVSync2AsyncSubmitTask`: 提交视频生成任务
        - `CVSync2AsyncGetResult`: 获取任务结果

        需要在查询参数中指定 Action 和 Version。
      operationId: createJimengVideo
      parameters:
        - name: Action
          in: query
          description: API 操作类型
          required: true
          schema:
            type: string
            enum:
              - CVSync2AsyncSubmitTask
              - CVSync2AsyncGetResult
        - name: Version
          in: query
          description: API 版本
          required: true
          example: '2022-08-31'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: 即梦官方 API 请求格式
              properties:
                req_key:
                  type: string
                  description: 请求类型标识
                prompt:
                  type: string
                  description: 文本描述
                binary_data_base64:
                  type: array
                  items:
                    type: string
                  description: Base64 编码的图片数据
            example:
              req_key: jimeng_video_generation
              prompt: 一只猫在弹钢琴
      responses:
        '200':
          description: 成功处理请求
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: 响应码
                  message:
                    type: string
                    description: 响应消息
                  data:
                    type: object
                    description: 响应数据
                    properties: {}
          headers: {}
        '400':
          description: 请求参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: 错误信息
            type:
              type: string
              description: 错误类型
            param:
              type: string
              description: 相关参数
              nullable: true
            code:
              type: string
              description: 错误代码
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````