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

# Submit Grok Imagine Video 1.5 task

> POST a Grok Imagine Video 1.5 text-to-video or reference image-to-video task

## Submit task

`prompt` is required. Omit `image_urls` for text-to-video, or provide 1–7 public HTTP(S) image URLs for image-to-video; `type` is inferred when omitted. `resolution` is `480p` or `720p` (default) and `duration` is 6–15 seconds (default 6).

```bash theme={null}
curl --fail-with-body --silent --show-error \
  -X POST https://api.wizzx.ai/api/v1/task/submit/grok-imagine-video-1.5 \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  --data '{
    "prompt": "Waves crash against a lighthouse at golden hour",
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "duration": 6
  }'
```

The gateway charges per second: 480p = 20, 720p = 37 credits. Reference images are not billed. Read `/pricing` for the current amount.


## OpenAPI

````yaml POST /api/v1/task/submit/grok-imagine-video-1.5
openapi: 3.0.3
info:
  title: Wizzx AI API
  version: 1.2.0
  description: >-
    Wizzx asynchronous image, video, and audio generation API. Model keys are
    placed in the submit URL. Submit returns a Wizzx task_id; poll that ID
    through /api/v1/task/status. Authentication uses a Wizzx API key in the
    Authorization: Bearer <key> header.
  license:
    name: MIT
    url: https://github.com/tonyljx/documentation/blob/main/LICENSE
servers:
  - url: https://api.wizzx.ai
    description: Production API
security: []
tags:
  - name: Discovery
    description: Public model and pricing discovery.
  - name: Credits
    description: Authenticated credit balance.
  - name: Image generation
    description: Asynchronous image tasks.
  - name: Video generation
    description: Asynchronous video tasks.
  - name: Audio generation
    description: Asynchronous music and audio tasks.
  - name: Tasks
    description: Asynchronous task status.
  - name: Legacy models
    description: >-
      Compatibility-only models hidden from /pricing. Do not select these
      automatically.
paths:
  /api/v1/task/submit/grok-imagine-video-1.5:
    post:
      tags:
        - Video generation
      summary: Submit Grok Imagine Video 1.5 task
      description: >-
        Creates one asynchronous paid task. Save data.task_id and poll the
        status endpoint. Do not automatically retry an ambiguous submit.
      operationId: submitGrokImagineVideo15Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrokImagineVideo15SubmitRequest'
            example:
              prompt: Waves crash against a lighthouse at golden hour
              aspect_ratio: '16:9'
              resolution: 720p
              duration: 6
      responses:
        '200':
          description: Task accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskSubmitResponse'
        '400':
          description: Malformed JSON or binding validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, invalid, or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Request body exceeds the configured limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Model-specific validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-Retry-After:
              description: Retry delay in seconds.
              schema:
                type: integer
                minimum: 0
        '500':
          description: Internal or upstream submission error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service or model temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    GrokImagineVideo15SubmitRequest:
      type: object
      additionalProperties: false
      required:
        - prompt
      description: >-
        type is optional and inferred from image_urls: none means text-to-video,
        1-7 images means image-to-video. With reference images the output
        follows the reference image's aspect ratio. Billed per second by
        resolution; reference images are not billed.
      properties:
        prompt:
          type: string
          minLength: 1
        type:
          type: string
          enum:
            - text-to-video
            - image-to-video
        image_urls:
          type: array
          maxItems: 7
          items:
            type: string
            format: uri
            pattern: ^https?://
            description: Publicly reachable HTTP(S) URL.
        aspect_ratio:
          type: string
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '3:2'
            - '2:3'
          default: '16:9'
        resolution:
          type: string
          enum:
            - 480p
            - 720p
          default: 720p
        duration:
          type: integer
          minimum: 6
          maximum: 15
          default: 6
      allOf:
        - not:
            required:
              - type
              - image_urls
            properties:
              type:
                type: string
                enum:
                  - text-to-video
        - not:
            required:
              - type
            properties:
              type:
                type: string
                enum:
                  - image-to-video
            not:
              required:
                - image_urls
    TaskSubmitResponse:
      type: object
      required:
        - code
        - message
        - data
        - request_id
      properties:
        code:
          type: integer
          enum:
            - 0
        message:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/TaskSubmitData'
        request_id:
          type: string
          format: uuid
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
        request_id:
          type: string
          format: uuid
        retry_after:
          type: integer
          format: int64
          minimum: 0
          description: Retry delay in seconds. Present for rate-limit errors.
    TaskSubmitData:
      type: object
      required:
        - task_id
        - model_key
        - credits_deducted
      properties:
        task_id:
          type: string
          format: uuid
          description: Wizzx task ID used for status polling.
        model_key:
          type: string
        credits_deducted:
          type: integer
          minimum: 0
          description: Credits reserved when the task is accepted.
        provider_task_id:
          type: string
          description: Diagnostic field returned only when debug=1.
        provider_key:
          type: string
          description: Diagnostic field returned only when debug=1.
    ErrorDetail:
      type: object
      required:
        - message
        - type
        - param
        - code
      properties:
        message:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
            - authentication_error
            - insufficient_quota
            - permission_denied
            - not_found_error
            - conflict_error
            - unprocessable_entity_error
            - rate_limit_error
            - server_error
            - service_unavailable
        param:
          type: string
          nullable: true
        code:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Wizzx API key. This is not a JWT.

````