# Video Extend

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /openapi/v2/video/extend/generate:
    post:
      summary: Video Extend
      deprecated: false
      description: >-
        Continue a source video. Provide exactly one source. V6 supports a 1-15
        second extension. Source video up to 30 seconds / 50 MB; cumulative
        duration after extension up to 40 seconds. The result may include the
        source plus the extension, so task duration is not necessarily final
        file duration.
      operationId: video_extend_generate
      tags:
        - API /Core Capabilities
        - Solutions
      parameters:
        - name: API-KEY
          in: header
          description: Your PixVerse API key.
          required: true
          example: your-api-key
          schema:
            type: string
        - name: Ai-trace-id
          in: header
          description: A unique UUID for this request.
          required: true
          example: 550e8400-e29b-41d4-a716-446655440000
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              anyOf:
                - title: Video Extend Request
                  type: object
                  properties:
                    source_video_id:
                      type: integer
                      format: int64
                      minimum: 1
                      examples:
                        - 123456789
                    video_media_id:
                      type: integer
                      format: int64
                      minimum: 1
                      examples:
                        - 123456789
                    model:
                      type: string
                      enum:
                        - v6
                      examples:
                        - v6
                    prompt:
                      type: string
                      maxLength: 5000
                      examples:
                        - A cinematic scene with natural motion.
                    duration:
                      type: integer
                      minimum: 1
                      maximum: 15
                      examples:
                        - 5
                    quality:
                      type: string
                      enum:
                        - 360p
                        - 540p
                        - 720p
                        - 1080p
                      examples:
                        - 720p
                    seed:
                      type: integer
                      minimum: 0
                      maximum: 2147483647
                      examples:
                        - 12345
                    webhook_id:
                      type: string
                      examples:
                        - replace-with-your-webhook-id
                  required:
                    - model
                    - prompt
                    - duration
                    - quality
                  if:
                    required:
                      - source_video_id
                  then:
                    not:
                      required:
                        - video_media_id
                  else:
                    required:
                      - video_media_id
                  x-apidog-orders:
                    - source_video_id
                    - video_media_id
                    - model
                    - prompt
                    - duration
                    - quality
                    - seed
                    - webhook_id
              x-apidog-orders: []
              properties: {}
            examples:
              extend_minimum:
                value:
                  source_video_id: 123456794
                  prompt: The camera continues moving forward into the city
                  model: v6
                  duration: 5
                  quality: 720p
                summary: Minimal request (replace resource IDs)
              extend_complete:
                value:
                  source_video_id: 123456794
                  model: v6
                  prompt: >-
                    The camera continues moving forward into the city, the scene
                    becomes brighter
                  duration: 5
                  quality: 720p
                summary: Complete scenario (replace resource IDs)
      responses:
        '200':
          x-apidog-ordering: 0
          description: >-
            Request processed. ErrCode=0 indicates business success; a nonzero
            ErrCode indicates failure, even with HTTP 200.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ErrCode:
                    type: integer
                    description: >-
                      Business result code. A nonzero code indicates a request
                      error even with HTTP 200.
                  ErrMsg:
                    type: string
                    description: Response message.
                  Resp:
                    type: object
                    properties:
                      video_id:
                        type: integer
                        description: Task ID. Poll GET /openapi/v2/video/result/{video_id}.
                        format: int64
                        minimum: 1
                        examples:
                          - 123456789
                      credits:
                        type: integer
                        description: Credits consumed by the task.
                    required:
                      - video_id
                    x-apidog-orders:
                      - video_id
                      - credits
                    nullable: true
                  Error:
                    type: object
                    description: >-
                      Optional supplemental error details. Existing error
                      handling remains valid when this object is absent.
                    required:
                      - Type
                      - Message
                      - Param
                    additionalProperties: true
                    properties:
                      Type:
                        type: string
                        description: >-
                          A stable error type identifier. Allow unknown type
                          values.
                      Message:
                        type: string
                        description: >-
                          The cause of the error and a suggested action. Do not
                          match the complete message text for program logic.
                      Param:
                        type: object
                        description: >-
                          Details relevant to this error; {} when no reliable
                          details are available. All child fields are optional
                          and additional fields are allowed. Fields vary by
                          error and endpoint.
                        additionalProperties: true
                        properties:
                          Fields:
                            type: array
                            items:
                              type: string
                            description: Request fields related to the error.
                          AllowedValues:
                            type: array
                            items:
                              type: string
                            description: >-
                              Values supported for quality, aspect_ratio or
                              duration by the current rule. Duration values are
                              also strings. Omitted when the full set cannot be
                              determined.
                          RequiredField:
                            type: string
                            description: >-
                              Request field to use instead for template input
                              validation.
                          RequiredCount:
                            type: integer
                            description: >-
                              Number of inputs required by the selected
                              template.
                          Moderation:
                            type: object
                            additionalProperties: true
                            description: >-
                              Supplemental moderation information, when
                              available.
                            properties:
                              LabelName:
                                type: string
                                description: >-
                                  A readable moderation explanation, when
                                  available. Multiple explanations are separated
                                  by newlines; do not match this text for
                                  program logic.
                            x-apidog-orders:
                              - LabelName
                        x-apidog-orders:
                          - Fields
                          - AllowedValues
                          - RequiredField
                          - RequiredCount
                          - Moderation
                    x-apidog-orders:
                      - Type
                      - Message
                      - Param
                required:
                  - ErrCode
                  - ErrMsg
                additionalProperties: true
                x-apidog-orders:
                  - ErrCode
                  - ErrMsg
                  - Resp
                  - Error
              examples:
                accepted:
                  summary: Successful Example
                  value:
                    ErrCode: 0
                    ErrMsg: Success
                    Resp:
                      video_id: 123456789
                      credits: 10
                failure_extend_c1:
                  summary: Bad Example
                  value:
                    ErrCode: 400017
                    ErrMsg: >-
                      generate_multi_clip_switch is supported in model v5.5, v6
                      only.
                    Resp: null
                    Error:
                      Type: FIELD_VALUE_INVALID
                      Message: >-
                        Field 'model' has an unsupported value. Check the
                        allowed values and format for this endpoint.
                      Param:
                        Fields:
                          - model
                        AllowedValues:
                          - v5.5
                          - v6
                          - v5
                          - v4.5
                          - v4
                          - v3.5
          headers: {}
          x-apidog-name: ''
      security: []
      x-apidog-folder: API /Core Capabilities
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/772214/apis/api-43051216-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://app-api.pixverse.ai
    description: Prod Env
security: []

```
