x402 video generation API

Video generation your agent can pay for with a wallet

An x402 video generation API sells finished video over HTTP: the request carries a USDC payment instead of an API key. POST a prompt to Treza's endpoint, let the wallet answer the 402 challenge, and poll the returned link until the video URL appears. No account, no key, no signup.

The payment is the only credential

There is no signup form, API key, or OAuth flow anywhere in the path. An agent that holds a funded wallet can discover the endpoint, pay the 402 challenge, and collect a finished video with no human in the loop.

Priced per second, quoted per request

The 402 challenge quotes the exact price of the clip you described: $1.64 for 5 seconds, $3.27 for 10, $4.90 for 15. The rate is our measured provider cost times the same markup human customers pay, so it moves when the model's price moves.

Real production renders

Every purchase runs a frozen, versioned pipeline on the same engine behind the rest of the platform, in 16:9 landscape or 9:16 vertical. This is the path our own published channels render on, not a demo model.

Built for agent discovery

The endpoint is listed in the x402 Bazaar with a machine-readable input schema, output example, and per-size prices, so an agent's planner can evaluate the offer and commit a payment without a docs page in the loop.

Async by design, no webhooks needed

Renders take minutes, so a paid POST answers immediately with a status URL containing a signed claim ticket. Polling is free, and the ticket is the proof of purchase, which suits agents that have a wallet but nowhere to receive a callback.

Overpayment becomes balance, not loss

A settled payment credits an account keyed to the paying wallet, and the render spends from it at the normal rate. Whatever a render does not use stays on that wallet's balance for its next call.

How it works

From idea to finished video

  1. Step 01

    POST a prompt

    Send JSON with a prompt, a clip length of 5, 10, or 15 seconds, and an aspect ratio to the endpoint. Unpaid, the response is a 402 challenge quoting the exact USDC price for that clip.

  2. Step 02

    Let the wallet pay

    An x402 client signs the payment authorization and retries the request with it attached. The payment verifies and settles on Base before the render starts.

  3. Step 03

    Hold the claim ticket

    The paid POST returns 202 with a run id and a status URL carrying a signed ticket. That ticket is the proof of purchase, so store it: it is the only credential that can claim the video.

  4. Step 04

    Poll until the video URL appears

    GET the status URL until the run finishes, then download the file. Polling costs nothing, because the render behind it is already paid for.

See the live demo, prices, and a settled transaction

Use cases

What people build with it

Agents that produce content end to end

An autonomous agent researching a topic can buy the video for its own post mid-task, paying per clip instead of carrying a platform subscription it uses twice a week.

Apps that refuse to manage API keys

A product that needs occasional video generation can hold a wallet instead of a vault of provider keys, and its unit economics are visible per request.

MCP and tool-use workflows

A Claude or GPT agent with a wallet tool can quote the price to its user, pay for exactly one render, and hand back the file, all inside one conversation.

Crypto-native builders

If your stack already settles in USDC on Base, video generation becomes one more x402 service call, with the transaction hash as the receipt.

Pay-as-you-go prototyping

Trying a video idea costs one clip, not a signup, a card form, and a minimum top-up. The first render is the whole commitment.

Marketplaces and resellers

A service that composes other x402 services can add video generation to its catalog by forwarding a request, without holding an account with us.

FAQ

x402 video generation API, answered

What is x402?

x402 is a payment protocol built on the HTTP 402 Payment Required status code. A paid endpoint answers an unpaid request with a 402 carrying structured payment requirements: the price, the token (USDC), the network, and the address to pay. The client signs a payment with its wallet and retries the request with the payment attached; the server verifies and settles it through a facilitator, then serves the resource. It replaces accounts, API keys, and card forms with a per-request payment, which is what autonomous agents need, since an agent can hold a wallet but cannot complete a signup flow.

Do I need a Treza account or API key to use this?

No. The payment is the entire relationship. A settled payment creates an account keyed to the paying wallet behind the scenes, which is what holds any unspent balance, but there is nothing to sign up for and no key to store. The signed ticket returned by the paid request is the only credential involved, and it only claims that one video.

What exactly does a video cost?

Price scales with clip length: $1.64 for 5 seconds, $3.27 for 10 seconds, and $4.90 for 15 seconds, in 16:9 or 9:16. The 402 challenge always quotes the exact price for the request you sent before any money moves, and the rate derives from measured provider cost, so it changes when the underlying model's price does.

Which network and token does it settle on?

USDC on Base mainnet, settled through Coinbase's x402 facilitator. The response to a paid request includes the on-chain transaction hash, so every purchase has a public receipt.

What happens if the request is invalid, or I pay too much?

Validation runs after the payment verifies but before it settles, so a request for a size we do not sell is refused with your money untouched. When a payment does settle, it credits a balance keyed to your wallet and the render spends from it at the normal rate, so an overpayment stays on your balance for the next call instead of disappearing.

Can I use this without being an AI agent?

Yes, any x402-capable client with a funded wallet works, including a developer at a terminal. If you would rather have a canvas, templates, scheduling, and publishing around your video generation, that is the Treza platform itself, and it takes a normal signup and prepaid credits instead of a wallet.

How much does it cost to make x402 video generation api with Treza?

Treza runs on prepaid credits with no subscription. Each generation is charged at the model's own rate from your balance, and only successful runs are charged, so a failed generation costs nothing. A typical video generation settles around $1.06, and credit packs start at $5 and never expire.

Can I call this as an API instead of using the canvas?

Yes. Every pipeline can be published as a versioned HTTP endpoint. Call the typed /invoke endpoint with JSON in and JSON out, or point any OpenAI SDK at the OpenAI-compatible endpoint. Swap a model on a node later and the API your product calls does not change.

Do I need to know how to edit video?

No. Start from a template, change the topic, and run it. If you do want frame-level control, the timeline editor is there with multi-track video and audio, per-clip trims, fades, and volume, but nothing about the automated path requires opening it.