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

# Kling テキストから動画を生成

> このシリーズはOpenAIの動画生成形式をサポートしています（詳細はリンク [動画生成Sora互換形式](/api-reference/ja/video-generation-sora-compatible-format/create-video) を参照してください）。

Kling モデルを使用して、テキスト説明から動画を生成します。

対応モデル：kling-v1, kling-v1-5 など



## OpenAPI

````yaml api-reference/ja/openapi.json POST /kling/v1/videos/text2video
openapi: 3.0.0
info:
  title: 出海营 API 参考ドキュメント
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI形式(Chat)
  - name: OpenAI形式（Responses）
  - name: 画像生成Gemini形式
  - name: 画像生成OpenAI DALL-E形式
  - name: モデル一覧の取得
  - name: 動画生成HappyHorseとWan
  - name: 動画生成Kling形式
  - name: 動画生成OmniとVeo形式
  - name: Video generation Seedance
  - name: 動画生成Sora対応形式
  - name: Video generation Vidu
  - name: 音楽生成タスクの形式
paths:
  /kling/v1/videos/text2video:
    post:
      tags:
        - 動画生成Kling形式
      summary: Kling テキストから動画を生成
      description: >-
        このシリーズはOpenAIの動画生成形式をサポートしています（詳細はリンク
        [動画生成Sora互換形式](/api-reference/ja/video-generation-sora-compatible-format/create-video)
        を参照してください）。


        Kling モデルを使用して、テキスト説明から動画を生成します。


        対応モデル：kling-v1, kling-v1-5 など
      operationId: createKlingText2Video
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoRequest'
            example:
              model: kling-v1
              prompt: 宇航员站起身走了
              duration: 5
              width: 1280
              height: 720
              fps: 30
      responses:
        '200':
          description: 動画生成タスクの作成に成功しました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoResponse'
          headers: {}
        '400':
          description: リクエストパラメータのエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    VideoRequest:
      type: object
      description: 動画生成リクエスト
      properties:
        model:
          type: string
          description: モデル/スタイルID
          example: kling-v1
        prompt:
          type: string
          description: テキスト記述プロンプト
          example: 宇航员站起身走了
        image:
          type: string
          description: 画像入力 (URL または Base64)
          example: https://example.com/image.jpg
        duration:
          type: number
          description: 動画の長さ（秒）
          example: 5
        width:
          type: integer
          description: ビデオの幅
          example: 1280
        height:
          type: integer
          description: 動画の高さ
          example: 720
        fps:
          type: integer
          description: ビデオフレームレート
          example: 30
        seed:
          type: integer
          description: ランダムシード
          example: 20231234
        'n':
          type: integer
          description: 生成ビデオ数
          example: 1
        response_format:
          type: string
          description: レスポンス形式
          example: url
        user:
          type: string
          description: ユーザー識別子
          example: user-1234
        metadata:
          type: object
          description: 拡張パラメータ (negative_prompt, style, quality_level など)
          additionalProperties: true
          properties: {}
    VideoResponse:
      type: object
      description: 動画生成タスク送信レスポンス
      properties:
        task_id:
          type: string
          description: タスクID
          example: abcd1234efgh
        status:
          type: string
          description: タスクステータス
          example: queued
    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`

````