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

# Sora 2 Official

> Text-to-video and optional image-guided video generation

<Tip>
  1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
  2. Regardless of whether `callback_url` is provided, you can retrieve the result through the unified [Query Task Status](/api-manual/task-management/status) endpoint.
</Tip>

# Sora 2 Official

`sora-2-official` supports text-to-video generation and optional single-image guided generation with fixed 4s, 8s, 12s, 16s, and 20s durations.

## Available Model

* **sora-2-official** - Text-to-video with optional reference image

## Required Parameters

* **prompt**: Text prompt for video generation

## Optional Parameters

* **duration**: `4`, `8`, `12`, `16`, or `20`. Default is `4`
* **aspect\_ratio**: `16:9` or `9:16`. Default is `16:9`
* **image\_urls**: Optional reference image array. Maximum `1` image

## Notes

* `image_urls` is optional. If provided, only one image is supported.
* This page only describes the unified submit request. Query status through the standard task status API.


## OpenAPI

````yaml /api-manual/video-series/sora-2-official.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Sora 2 Official API
  description: Text-to-video and optional image-guided video generation
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Sora 2 Official
      summary: Submit Sora 2 Official Task
      description: Generate videos with Sora 2 Official
      operationId: submitSora2OfficialTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              sora-2-official:
                summary: Sora 2 Official
                value:
                  model: sora-2-official
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      An astronaut riding a horse across the surface of Mars,
                      red dust blowing in the wind, dramatic sunset on the
                      horizon, cinematic wide shot, slow motion, ultra realistic
                      textures, detailed space suit reflections, epic
                      atmosphere, 8k cinematic film, volumetric lighting, smooth
                      camera tracking.
                    duration: 20
                    aspect_ratio: '16:9'
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: Sora 2 Official model identifier
          enum:
            - sora-2-official
        callback_url:
          type: string
          format: uri
          description: Webhook callback URL for result notifications
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: Generation prompt describing the desired video
              example: >-
                An astronaut riding a horse across the surface of Mars, red dust
                blowing in the wind, dramatic sunset on the horizon, cinematic
                wide shot, slow motion, ultra realistic textures, detailed space
                suit reflections, epic atmosphere, 8k cinematic film, volumetric
                lighting, smooth camera tracking.
            duration:
              type: integer
              description: Output duration in seconds
              enum:
                - 4
                - 8
                - 12
                - 16
                - 20
              default: 4
              example: 20
            aspect_ratio:
              type: string
              description: Video aspect ratio
              enum:
                - '16:9'
                - '9:16'
              default: '16:9'
              example: '16:9'
            image_urls:
              type: array
              items:
                type: string
                format: uri
              minItems: 1
              maxItems: 1
              description: Optional reference image URLs. Only one image is supported
              example:
                - https://example.com/reference-image.png
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
            status:
              type: string
              enum:
                - not_started
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2025-11-12T10:30:00'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API endpoints require Bearer Token authentication


        Get your API Key:


        Visit the [API Key Management
        Page](https://vidgo.ai/apis/dashboard/api-key) to get your API Key


        Add it to the request header:


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````