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

# Create Video

> Create a new video generation task using Sora models. Route 1 (route1): model sora2-12s, duration must be 12. Route 3: sora2-gz-stable / sora2-gz-sp. Route 6: see model config.

## Routes and models

Assign a `route` in the OpenAPI model config, then call this endpoint. Common Sora examples:

| Route   | Config `route` | Model examples                   | Duration     |
| ------- | -------------- | -------------------------------- | ------------ |
| Route 1 | `route1`       | `sora2-12s`                      | **12s only** |
| Route 3 | `route3`       | `sora2-gz-stable`, `sora2-gz-sp` | Per model    |
| Route 6 | `route6`       | `openai-sora-2`, etc.            | Per model    |

### Route 1 (`sora2-12s`)

* `duration` must be `12`
* `orientation`: `landscape` → 16:9, `portrait` → 9:16
* Optional `images`: one reference image URL for image-to-video
* Query tasks via [Query video task](/en/api-reference/common/query)

<Note>
  Result URLs are kept for about **3 days**; download promptly.
</Note>


## OpenAPI

````yaml POST /api/open-api/v1/videos
openapi: 3.1.0
info:
  title: Jimmy AI OpenAPI
  description: API for Jimmy AI video generation services
  version: 1.0.0
servers:
  - url: https://www.jimmyai.cn
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/open-api/v1/videos:
    post:
      summary: Create Video Task
      description: >-
        Create a new video generation task using Sora models. Route 1 (route1):
        model sora2-12s, duration must be 12. Route 3: sora2-gz-stable /
        sora2-gz-sp. Route 6: see model config.
      operationId: createVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationRequest'
      responses:
        '200':
          description: Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
components:
  schemas:
    VideoGenerationRequest:
      type: object
      required:
        - model
        - prompt
        - duration
      properties:
        model:
          type: string
          description: >-
            Model name. Route 1: sora2-12s (duration must be 12). Route 3:
            sora2-gz-stable, sora2-gz-sp, etc.
        prompt:
          type: string
          description: Text prompt for video generation
        duration:
          type: integer
          description: Duration in seconds. Route 1 sora2-12s must be 12
        orientation:
          type: string
          enum:
            - landscape
            - portrait
          description: Video orientation
        images:
          type: array
          items:
            type: string
          description: Reference image URLs
    VideoGenerationResponse:
      type: object
      properties:
        code:
          type: string
          example: '20000'
        msg:
          type: string
          example: ok
        data:
          type: object
          properties:
            task_id:
              type: string
            status:
              type: string
            model:
              type: string
            created_at:
              type: integer
              format: int64
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````