Page cover

VIDEO

Base-Path:

https://api.hyprlab.io/v1

Video Path:

https://api.hyprlab.io/v1/video/generations
chevron-right 📌 Request Body Documentationhashtag

prompt (string, required)

  • Description: The main text input that guides the video generation.

  • Validation:

    • Must be a non-empty string.

aspect_ratio (string, optional)

  • Description: Defines the aspect ratio of the generated output.

  • Validation:

    • Must be one of the following:

      • 1:1

      • 16:9

      • 9:16

      • 4:3

      • 3:4

      • 3:2

      • 2:3

duration (integer, optional)

  • Description: Specifies the length of the video in seconds.

  • Validation:

    • Must be between 1 and 15.

    • Defaults to 6 if not provided.

image (string, optional)

  • Description: Input image for image-to-video generation.

  • Validation:

    • Must be a string (URL, Data URI, or base64 string).

video (string, optional)

  • Description: Input video to edit. Must be a direct link, max 8.7 seconds.

  • Validation:

    • Must be a string (URL, Data URI, or base64 string).

resolution (string, optional)

  • Description: Resolution of the generated video.

  • Validation:

    • Must be one of: "480p" or "720p".

    • Defaults to "720p" if not provided.


Post Request:

circle-info

When you send a POST request to create a new Video Generation, the API will return a response containing a Polling URL that can be used to check the processing status and retrieve the results.

curl https://api.hyprlab.io/v1/video/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -d '{
    "model": "grok-imagine-video",
    "prompt": "A cute cat playing outside.",
    "aspect_ratio": "16:9",
    "duration": 6,
    "resolution": "720p"
  }'

Polling for Status:

circle-info

To check the status and retrieve the result, send a GET request to the polling URL provided in the response.

circle-info

NOTE: Video Generation took 3-4 Minutes before it finish.

Pricing Details

Model Name:
  • grok-imagine-video

Discount:
  • 10% off

Resolution: 480p
  • Image Input: $0.0018 / Image

  • Video Output: $0.045 / Second

Resolution: 720p
  • Image Input: $0.0018 / Image

  • Video Output: $0.063 / Second

Video Edit:
  • Video Input: $0.009 / Second

  • Video Output: $0.045 / Second

Last updated