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

# Create video

> OpenAI-compatible video generation endpoint.

Reference: https://platform.openai.com/docs/api-reference/videos/create




## OpenAPI

````yaml /fr/api-reference/openapi.json post /v1/videos
openapi: 3.0.1
info:
  title: Rock API API de modèles IA
  version: 1.0.0
  description: Référence de l’API de modèles IA compatible OpenAI pour Rock API.
servers:
  - url: https://rockapi.ai
security:
  - BearerAuth: []
tags:
  - name: List models
  - name: OpenAI format (Chat)
  - name: OpenAI format (Responses)
  - name: Image generation
  - name: Image generation/OpenAI-compatible format
  - name: Image generation/Qwen
  - name: Video generation
  - name: Video generation/Sora-compatible format
  - name: Video generation/Kling format
  - name: Video generation/Jimeng format
  - name: Claude format (Messages)
  - name: Gemini format
  - name: OpenAI format (Embeddings)
  - name: Text completions
  - name: OpenAI audio
  - name: Rerank
  - name: Moderations
  - name: Realtime
  - name: Not implemented
  - name: Not implemented/Fine-tunes
  - name: Not implemented/Files
paths:
  /v1/videos:
    post:
      tags:
        - Video generation/Sora-compatible format
      summary: Create video
      description: |
        OpenAI-compatible video generation endpoint.

        Reference: https://platform.openai.com/docs/api-reference/videos/create
      operationId: createVideo
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                model:
                  description: Model name
                  example: sora-2
                  type: string
                prompt:
                  description: Prompt
                  example: cute cat dance
                  type: string
                seconds:
                  description: Generated duration in seconds
                  example: '8'
                  type: string
                input_reference:
                  format: binary
                  type: string
                  description: Reference image file
                  example: ''
            examples: {}
      responses:
        '200':
          description: Video task created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Video ID
                  object:
                    type: string
                    description: Object type
                  model:
                    type: string
                    description: Model used
                  status:
                    type: string
                    description: Task status
                  progress:
                    type: integer
                    description: Progress percentage
                  created_at:
                    type: integer
                    description: Creation timestamp
                  seconds:
                    type: string
                    description: Video duration
                  completed_at:
                    type: integer
                    description: Completion timestamp
                  expires_at:
                    type: integer
                    description: Expiration timestamp
                  size:
                    type: string
                    description: Video size
                  error:
                    $ref: '#/components/schemas/OpenAIVideoError'
                  metadata:
                    type: object
                    description: Additional metadata
                    additionalProperties: true
                    properties: {}
                required:
                  - id
                  - object
                  - model
                  - status
                  - progress
                  - created_at
                  - seconds
              example:
                id: sora-2-123456
                object: video
                model: sora-2
                status: queued
                progress: 0
                created_at: 1764347090922
                seconds: '8'
          headers: {}
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    OpenAIVideoError:
      type: object
      description: OpenAI video error information
      properties:
        message:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message
            type:
              type: string
              description: Error type
            param:
              type: string
              description: Related parameter
              nullable: true
            code:
              type: string
              description: Error code
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Authenticate with a Bearer Token.
        Format: `Authorization: Bearer sk-xxxxxx`

````