DEV Community

vvvvking
vvvvking

Posted on

A genuinely free AI video + image generation API (no credit card) — with working Python code

Disclosure: I operate NovAI, the gateway described below. All prices are what our billing actually charges as of July 2026. This post was written with AI assistance and reviewed by me.

Most "free" video generation APIs are trial credits: you get $5–10, burn through it in a dozen clips, then hit a paywall that wants a credit card. While building our gateway I found that Zhipu's flash-tier models (cogvideox-flash for video, cogview-3-flash for images) are genuinely free upstream — but the free tier is only exposed on the China-domestic platform. Zhipu's international site (z.ai) only sells the paid models.

We route to the domestic endpoint, so both models are billed at $0 through our OpenAI-compatible API. Email signup, no card. Here's the working code.

Free image generation ($0/image)

It's a drop-in for the OpenAI SDK — just change base_url:

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_NOVAI_KEY",              # free key: https://aiapi-pro.com
    base_url="https://aiapi-pro.com/v1",
)

img = client.images.generate(
    model="cogview-3-flash",               # $0 / image
    prompt="isometric illustration of a tiny server room, pastel colors",
)
print(img.data[0].url)
Enter fullscreen mode Exit fullscreen mode

Free video generation ($0/generation)

Video is asynchronous: submit a job, poll until it's done.

import requests, time

BASE = "https://aiapi-pro.com/v1"
H = {"Authorization": "Bearer YOUR_NOVAI_KEY", "Content-Type": "application/json"}

job = requests.post(f"{BASE}/video/generations", headers=H, json={
    "model": "cogvideox-flash",            # $0 / generation
    "prompt": "a paper plane gliding over a neon city at night",
}).json()

while True:
    r = requests.get(f"{BASE}/video/generations/{job['id']}",
                     headers=H, params={"model": "cogvideox-flash"}).json()
    if r.get("status") == "succeeded":
        print("video:", r["content"]["video_url"]); break
    if r.get("status") == "failed":
        raise RuntimeError(r)
    time.sleep(5)
Enter fullscreen mode Exit fullscreen mode

Node.js and curl versions are in the novai-examples repo (MIT).

The honest part: what "flash tier" means

These are not frontier models. Being specific:

  • cogview-3-flash: solid for illustrations, thumbnails, placeholders. Noticeably below Seedream 5.0 / DALL·E-class output on photorealism and text rendering.
  • cogvideox-flash: short clips, lower fidelity than Seedance/Kling/Sora-class models. Good for prototyping a video pipeline, not for client deliverables.
  • Free-tier requests are queued at lower priority, so generation can be slower at peak times.

Where they shine: CI pipelines, hackathons, prototyping an async video flow, or any product where image cost must be exactly $0.

When you outgrow the free tier

Same API key and endpoint also serve paid Chinese models — for reference (our billing, July 2026):

Model Type Price
cogview-3-flash image $0
cogvideox-flash video $0
hy-image-lite image $0.014/image
doubao-seedream-5.0 image $0.027/image
doubao-seedance-2.0 video $0.329/s @1080p
hy-video-1.5 video $0.21/generation

For comparison, fal.ai's published price for Seedance 2.0 at 1080p is roughly $0.68/s as of July 2026 (their pricing may change — check both before committing volume).

Links

Questions about the routing setup or limits — happy to answer in the comments.

Top comments (0)