thelastapi
Get started free

A vertical 9:16 video API for Shorts, Reels and TikTok

Generate vertical 9:16 AI videos for Shorts, Reels, and TikTok using thelastapi jobs endpoint or the CLI, with permanent storage included.

On this page 7 sections

You can generate vertical 9:16 AI videos by sending a generation job to /v1/ai/jobs with aspect_ratio: "9:16" using the vibiz/video model. Every video job produces a 6-second, 720p clip with sound for $0.54, either directly from a text prompt or animated from an input image. The resulting MP4 is automatically saved to your project's permanent storage, ready to download, stream, or publish to social feeds.

Creating automated content for YouTube Shorts, Instagram Reels, and TikTok requires native vertical aspect ratios. Running media pipelines across fragmented providers often forces you to juggle multiple billing dashboards, manage separate file storage buckets, and parse disparate job schemas. thelastapi unifies vertical video generation under a single API key with built-in asset storage.

How to generate vertical video with the API

Video rendering takes time, so video generation runs as an asynchronous job. You create the job with a POST request to /v1/ai/jobs specifying aspect_ratio: "9:16", receive a 202 Accepted response with a job ID, and poll GET /v1/ai/jobs/:id until the status is complete.

Here is how to submit a text-to-video request using curl:

Terminal
curl https://thelastapi.dev/v1/ai/jobs \
  -H "Authorization: Bearer $VIBIZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "video",
    "model": "vibiz/video",
    "input": {
      "prompt": "Cinematic aerial shot tracking a cyclist descending a mountain pass at sunset",
      "aspect_ratio": "9:16"
    }
  }'

The server returns an initial job object:

JSON
{
  "id": "job_01k8y9z4q2e",
  "type": "video",
  "status": "queued",
  "model": "vibiz/video",
  "created_at": "2026-03-30T14:20:00.000Z"
}

Check the status by querying the job route:

Terminal
curl https://thelastapi.dev/v1/ai/jobs/job_01k8y9z4q2e \
  -H "Authorization: Bearer $VIBIZ_API_KEY"

When the render finishes, the status updates to succeeded, providing output metadata and permanent file URLs in output.data:

JSON
{
  "id": "job_01k8y9z4q2e",
  "type": "video",
  "status": "succeeded",
  "model": "vibiz/video",
  "cost_micro_usd": 540000,
  "output": {
    "data": [
      {
        "url": "https://thelastapi.dev/f/Qm9x81abc/2026-03-30-cinematic-aerial-shot.mp4",
        "file_id": "file_01k8ya",
        "file_url": "https://thelastapi.dev/f/Qm9x81abc/2026-03-30-cinematic-aerial-shot.mp4",
        "expires_at": null
      }
    ]
  }
}

Because vibiz/video runs on LTX-2.5 Fast, each successful job produces a 6-second video at 720p resolution with generated sound for a flat price of $0.54. If you pass 1:1, the API returns a 16:9 video; specify 9:16 explicitly for portrait formats. You can learn more about configuring media models in our guide on one API for image, video and voice AI models.

How to generate vertical video from the command line

When testing prompts or creating batch social assets locally, the vibiz CLI lets you generate vertical video without writing boilerplate polling loops:

Terminal
vibiz video "Barista pouring latte art in a sunlit cafe, slow motion steam" \
  --aspect 9:16 \
  -o latte.mp4

The CLI automatically handles dispatching the job to the backend, monitoring its progress, and saving the finished MP4 directly to your local file path.

To inspect available media models and check live prices over HTTP before kicking off a job, send a query to the catalogue route:

Terminal
curl "https://thelastapi.dev/v1/ai/media-models?q=video" \
  -H "Authorization: Bearer $VIBIZ_API_KEY"

How to animate an image into vertical video

Short-form video production often starts from a still image to ensure brand consistency or maintain character likeness across scenes. You can generate a portrait base image using an image model like Nano Banana 2 via vibiz/image, and then pass that image directly into your video request. Read how to use Nano Banana with an API key for details on base image generation.

First, create the portrait image:

Terminal
vibiz image "A courier standing in a rain-slicked alley, vibrant storefront lighting" \
  --size 1024x1024 \
  -o courier.png

Upload the image to your project storage or use an existing link, then pass the image URL into your video generation job using the --from-image flag:

Terminal
vibiz video "Rain falls as the courier turns toward the camera" \
  --from-image https://thelastapi.dev/f/Qm9x81abc/courier.png \
  --aspect 9:16 \
  -o courier_animated.mp4

Using the HTTP API, supply image_url within the input dictionary:

JSON
{
  "type": "video",
  "model": "vibiz/video",
  "input": {
    "prompt": "Camera pushes slowly toward the character while reflections flicker",
    "image_url": "https://thelastapi.dev/f/Qm9x81abc/courier.png",
    "aspect_ratio": "9:16"
  }
}

This workflow creates continuous narrative sequences for vertical feeds. You can chain text generation, image creation, and voice synthesis into an automated pipeline by following our guide on script, voice and video pipelines.

How generated videos are stored and served

When you make calls using a project AI key (vz_ai_...) or an application key (VIBIZ_APP_KEY), the API automatically saves every completed render to your project's storage. You do not need to configure third-party object storage buckets or handle signed file upload ceremonies.

Key characteristics of generated media storage include:

  • Permanent links: The url returned in output.data[i] has expires_at: null. The link is static, public, and safe to embed in web players or social scheduling queues.
  • Automated file tracking: The file appears in Files named with the date and prompt (for example, 2026-03-30-barista-pouring-latte-art.mp4).
  • Streaming headers: Files are served with Accept-Ranges: bytes so players on mobile browsers can seek instantly without buffering the entire 50 MB limit.
  • Unauthenticated account safety: If you run video generation using a bare account secret key (vz_sk_...) without assigning an X-Vibiz-Project header, the file link expires after 24 hours because no project drive exists to house it.

You can view, search, and manage generated files using the CLI:

Terminal
# List all AI-generated videos
vibiz files --type video --source ai

# Fetch the URL of the most recent video
vibiz files latest --type video

# Search files by prompt text
vibiz files search "latte art"

Running third-party video models by model ID

In addition to the standard vibiz/video tier, you can call specialized models from labs such as Kling, Seedance, Veo, Hailuo, and Wan directly by their model identifier.

Search for specific models using the API:

Terminal
curl "https://thelastapi.dev/v1/ai/media-models?q=kling" \
  -H "Authorization: Bearer $VIBIZ_API_KEY"

To run a specific external model, specify its model string and pass custom parameters inside model_input (up to 16 KB of configuration). For example, to generate a 10-second vertical render with Kling:

Terminal
curl https://thelastapi.dev/v1/ai/jobs \
  -H "Authorization: Bearer $VIBIZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "video",
    "model": "kling-video/v2.1/master/image-to-video",
    "input": {
      "prompt": "She smiles and gestures toward the city skyline",
      "image_url": "https://thelastapi.dev/f/Qm9x81abc/character.png",
      "model_input": {
        "duration": "10",
        "aspect_ratio": "9:16"
      }
    }
  }'

Every model call is metered against your balance at its live rate, capped at a maximum of $10 per call to prevent runaway loops. If you request a model ID that does not exist in the catalogue, the API returns 400 invalid_request with param: "model". It will never silently route your request to a different engine.

Media models and pricing summary

Here is how video compares to other media and multimodal capabilities available on the gateway:

ModelLab / EngineOutput / PurposePrice
vibiz/videoLTX-2.5 Fast (Lightricks)6 s vertical (9:16) or horizontal (16:9) clips at 720p with sound$0.54 per video
vibiz/imageNano Banana 2 (Google)Fast image generation, character editsabout $0.067 per image
vibiz/image-proNano Banana 2.1 (Google)High-fidelity image generationabout $0.034 per image
vibiz/voiceLab voice modelNatural speech synthesis (alloy, echo, etc.)$0.04 per 1,000 characters
vibiz/transcribeLab voice modelSpeech to text transcription across 99 languages$0.22 per audio hour

For technical limits, error codes, and request parameter structures across all endpoints, review the official AI documentation.

To start generating vertical video for your publishing workflows, initialize your project using vibiz init "Shorts Engine" --resources ai, grab your project key, and submit your first render job to /v1/ai/jobs.

Frequently asked questions

How do I ensure my generated video has a vertical 9:16 aspect ratio?

Pass `"aspect_ratio": "9:16"` inside the `input` object when submitting a job to `POST /v1/ai/jobs`, or pass the `--aspect 9:16` flag when running the `vibiz video` CLI command.

What happens if I pass an unsupported aspect ratio like 1:1 to the video endpoint?

The `vibiz/video` model accepts `16:9` or `9:16`; any request specifying `1:1` is automatically returned in a `16:9` format.

How long are video URLs accessible after generation?

When you generate a video using a project key, the MP4 is stored permanently in your project's Files and the returned URL never expires (`expires_at: null`). Calls made without a project header expire after 24 hours.

Does the video API support generating video from an existing picture?

Yes, you can provide a public image link via the `image_url` parameter inside `input` (or using `--from-image <url>` in the CLI) to animate a still image into a 6-second vertical clip.