Page cover

VIDEO

Base-Path:

https://api.hyprlab.io/v1

Video Path:

https://api.hyprlab.io/v1/video/generations
📌 SORA-2-PRO - Request Body Documentation

prompt (string, required)

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

  • Validation:

    • Must be a non-empty string.

input_reference(string, optional)

  • Description: Input image to start generating from.

  • Validation:

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

seconds (integer, optional)

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

  • Validation:

    • Must be one of: 4, 8, or 12.

    • Defaults to 4 if not provided.

aspect_ratio (string, optional)

  • Description: Video aspect ratio.

  • Validation:

    • Must be one of: "portrait" or "landscape".

    • Defaults to "landscape" if not provided.

resolution (string, optional)

  • Description: Resolution of the generated video.

  • Validation:

    • Must be one of: "standard" or "high".

    • Defaults to "standard" if not provided.

📌 SORA-2 - Request Body Documentation

prompt (string, required)

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

  • Validation:

    • Must be a non-empty string.

input_reference(string, optional)

  • Description: Input image to start generating from.

  • Validation:

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

seconds (integer, optional)

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

  • Validation:

    • Must be one of: 4, 8, or 12.

    • Defaults to 4 if not provided.

aspect_ratio (string, optional)

  • Description: Video aspect ratio.

  • Validation:

    • Must be one of: "portrait" or "landscape".

    • Defaults to "landscape" if not provided.

Post Request:

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": "sora-2",
    "prompt": "A playful and adorable cat is surrounded by tall trees.",
    "input_reference": "https://site.com/path/of/image.png",
    "seconds": 8,
    "aspect_ratio": "landscape",
  }'
// Sample Response:
{
  "created": 123,
  "id": "abc123",
  "data": [
    {
      "url": "https://api.hyprlab.io/v1/video/result/123-abc123"
    }
  ]
}

Polling for Status:

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

curl -X GET "https://api.hyprlab.io/v1/video/result/123-abc123" \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -H "Accept: application/json"

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

{
  "created": 123,
  "data": [
    {
      "url": "https://pub-abc123.r2.dev/123-abc123.mp4"
    }
  ]
}

🎥 Sora Video Models

Model Name:
Discount:
Resolution:
4 Seconds:
8 Seconds:
12 Seconds:

sora-2-pro

10% off

Standard

$1.08

$2.16

$3.24

High

$1.8

$3.6

$5.4

sora-2

10% off

Standard

$0.36

$0.72

$1.08

Last updated