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

# Image to Video

> Turn an image into a 5-second video, with 480p / 720p, motion level and batch size.

> [!TIP]
>
> You can also submit through the unified task endpoint `POST /v1/task/submit` with `model` set to `midjourney-video` and the parameters inside `input`. Both behave and bill the same.

The response carries a task ID. Fetch the result with [Get Task](https://docs.rixapi.com/docs/en/api-reference/midjourney/task.md), or pass `notify_hook` when submitting. When the task succeeds, `actions` in the result lists what you can do next through [Image Actions](https://docs.rixapi.com/docs/en/api-reference/midjourney/action.md).

This endpoint starts from your own image. To start from an image in an existing task, or to extend a video, call [Image Actions](https://docs.rixapi.com/docs/en/api-reference/midjourney/action.md) with `action` set to `video` or `video-extend`.


## OpenAPI

````yaml en/openapi/midjourney.json POST /midjourney/video
openapi: 3.1.0
info:
  title: Midjourney API
  version: 1.0.0
  description: Midjourney
servers:
  - url: https://api.ephone.ai
security:
  - bearerAuth: []
paths:
  /midjourney/video:
    post:
      summary: Image to Video
      description: >-
        Turn an image into a 5-second video, with 480p / 720p, motion level and
        batch size.
      operationId: midjourney_video
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                image:
                  type: string
                  description: >-
                    **First Frame**: An image URL (publicly reachable) or a
                    base64 data URI, up to 20 MB each.
                prompt:
                  type: string
                  maxLength: 6000
                  description: >-
                    **Prompt**: Optional: describe the motion. Without it,
                    motion is generated automatically.
                resolution:
                  type: string
                  enum:
                    - 480p
                    - 720p
                  default: 480p
                  description: '**Resolution**: 480p (default) or 720p (3.2x price).'
                motion:
                  type: string
                  enum:
                    - low
                    - high
                  default: low
                  description: >-
                    **Motion**: low (default, subtle motion) or high (large
                    camera motion).
                batch_size:
                  type: integer
                  enum:
                    - 1
                    - 2
                    - 4
                  default: 1
                  description: >-
                    **Batch Size**: Videos per task: 1 (default), 2 or 4; priced
                    by count.
                end_image:
                  type: string
                  description: >-
                    **End Frame**: Optional end frame. An image URL (publicly
                    reachable) or a base64 data URI, up to 20 MB each.
                loop:
                  type: boolean
                  default: false
                  description: >-
                    **Loop**: Make a seamless loop; cannot be combined with
                    end_image.
                speed:
                  type: string
                  enum:
                    - fast
                    - turbo
                  default: fast
                  description: >-
                    **Speed**: Video supports fast and turbo only. You can also
                    write --fast / --turbo in the prompt; this field wins.
                notify_hook:
                  type: string
                  format: uri
                  description: >-
                    **Notify hook**: when the task ends, the same content as the
                    fetch result is POSTed to this URL (a public http / https
                    URL). Omit it to poll instead.
              required:
                - image
            example:
              image: https://example.com/first-frame.png
              motion: low
              batch_size: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
              example:
                task_id: mj-6f1c2b0e9a7d4e2fb1c3d5e7f9a1b2c3
                action: video
                status: submitted
                created_at: 1792000000
        '400':
          description: invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: invalid_request
                  message: index must be between 1 and 4
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Invalid API key
        '402':
          description: insufficient_quota
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient balance
        '429':
          description: queue_full
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: queue_full
                  message: Queue is full, please try again later
        '500':
          description: upstream_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: upstream_error
                  message: The service is temporarily unavailable, please retry
components:
  schemas:
    SubmitResponse:
      type: object
      properties:
        task_id:
          type: string
          description: Task ID.
        action:
          type: string
          description: Action name, e.g. `imagine`, `upscale`.
        status:
          type: string
          description: Task status, see the table above.
          enum:
            - submitted
            - in_progress
            - success
            - failure
        created_at:
          type: integer
          description: Created at (Unix seconds).
      required:
        - task_id
        - action
        - status
        - created_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your API key in the `Authorization: Bearer YOUR_API_KEY` header.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.