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

# HappyHorse 1.0 图生视频

> HappyHorse图生视频模型，以首帧图片为基础，支持通过文本描述进行引导，生成物理真实、运动流畅的视频。

## 查询任务状态

提交任务后，使用统一查询端点查看进度并获取结果：

<Card title="获取任务信息" icon="magnifying-glass" href="/zh/models/common/get-task-info">
  了解如何查询任务状态及获取生成结果
</Card>

<Tip>
  对于生产环境，我们建议在创建任务时使用 `callback_url` 参数，以便在生成完成时自动接收通知，而非持续轮询状态端点。
</Tip>

## 相关资源

<CardGroup cols={2}>
  <Card title="模型概览" icon="store" href="/zh/models/quickstart">
    探索所有可用模型
  </Card>

  <Card title="通用 API" icon="gear" href="/zh/common-api/get-account-credits">
    查询账户剩余积分
  </Card>
</CardGroup>


## OpenAPI

````yaml zh/models/happyhorse/image-to-video.json post /api/v1/client/job/CreateTask
openapi: 3.0.0
info:
  title: Crun HappyHorse 1.0 图生视频 API
  description: crun.ai HappyHorse 1.0 视频 API 文档
  version: 1.0.0
  contact:
    name: 技术支持
    email: support@crun.ai
servers:
  - url: https://api.crun.ai
    description: API 服务器
security:
  - ApiKeyAuth: []
paths:
  /api/v1/client/job/CreateTask:
    post:
      summary: 使用 HappyHorse 1.0 图生视频生成视频
      operationId: happyhorse-1-0-i2v
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  enum:
                    - happyhorse-1-0-i2v
                  description: |-
                    要使用的模型名称，必填。

                    - 该端点必须传 `happyhorse-1-0-i2v`
                callback_url:
                  type: string
                  format: uri
                  description: 可选。用于接收任务完成通知的回调 URL。
                  example: https://your-domain.com/api/callback
                input:
                  type: object
                  description: HappyHorse 1.0 图生视频任务的输入参数。
                  required:
                    - prompt
                    - img_urls
                  properties:
                    prompt:
                      type: string
                      description: 描述生成视频内容的文本提示词。
                      minLength: 1
                      maxLength: 5000
                      example: 让马自然奔跑起来，镜头平滑跟随。
                    img_urls:
                      type: array
                      description: |-
                        源图像 URL。请传入 1 张图片作为首帧。

                        **图像限制**：
                        - 格式：JPEG、JPG、PNG、WEBP。
                        - 分辨率：宽和高不小于 300 像素。
                        - 宽高比：1:2.5～2.5:1。
                        - 文件大小：不超过 20MB。
                      items:
                        type: string
                        format: uri
                      minItems: 1
                      maxItems: 1
                      example:
                        - https://example.com/first-frame.jpg
                    resolution:
                      type: string
                      description: 输出视频分辨率。
                      enum:
                        - 720P
                        - 1080P
                      default: 720P
                      example: 720P
                    region:
                      type: string
                      description: 服务区域。mainland：中国大陆，global：国际
                      enum:
                        - mainland
                        - global
                      nullable: true
                      default: null
                      example: global
                    duration:
                      type: integer
                      description: 输出视频时长，单位为秒。
                      minimum: 3
                      maximum: 15
                      default: 5
                      example: 5
                    input_compliance:
                      type: string
                      nullable: true
                      description: >-
                        可选输入审核开关。传入 `enable` 开启输入审核，传入 `disable` 关闭；不传或传 `null`
                        时使用默认配置。
                      enum:
                        - disable
                        - enable
                      default: null
                      example: enable
                    output_compliance:
                      type: string
                      nullable: true
                      description: >-
                        可选输出审核开关。传入 `enable` 开启输出审核，传入 `disable` 关闭；不传或传 `null`
                        时使用默认配置。
                      enum:
                        - disable
                        - enable
                      default: null
                      example: enable
            example:
              model: happyhorse-1-0-i2v
              callback_url: https://your-domain.com/api/callback
              input:
                prompt: 让马自然奔跑起来，镜头平滑跟随。
                img_urls:
                  - https://example.com/first-frame.jpg
                resolution: 720P
                region: global
                duration: 5
                input_compliance: enable
                output_compliance: enable
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          task_id:
                            type: string
                            description: 任务 ID，可用于查询任务状态
                            example: task_12345678
              example:
                code: 200
                message: success
                data:
                  task_id: task_12345678
        '422':
          description: 参数校验错误
        '500':
          $ref: '#/components/responses/Error'
components:
  schemas:
    ApiResponse:
      type: object
      properties:
        code:
          type: integer
          enum:
            - 200
            - 401
            - 402
            - 404
            - 422
            - 429
            - 455
            - 500
            - 501
            - 505
          description: 响应状态码
        message:
          type: string
          description: 响应消息，失败时为错误描述
          example: success
  responses:
    Error:
      description: 服务器错误
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: |-
        所有 API 都需要通过 API Key 认证。

        获取 API Key：
        1. 访问 [API Key 管理页面](https://crun.ai/user-api-key) 获取你的 API Key

        使用方式：
        在请求头中添加：

        x-api-key: YOUR_API_KEY

````