Agent402 / tools / v1-videos

Video generation (4-second clip)

$0.200 per call · USDC via x402 · POST /v1/videos/generations

Text-to-video over x402 - one silent 4-second 720p clip (MP4, inline base64) for a flat $0.20, served by Veo 3.1 Lite. Choose aspect_ratio 16:9 (default) or 9:16; duration, resolution and audio are fixed so the price is. The call returns when the clip is ready (about 40 seconds measured, up to 4 minutes); a failed or timed-out generation is never charged.

TRY IN PLAYGROUND →

Input

FieldTypeDescription
prompt *stringText description of the clip (up to 2,000 chars)
aspect_ratiostring16:9 (default, 1280x720) or 9:16 (720x1280)

Example output

{
  "created": 1750000000,
  "model": "google/veo-3.1-lite",
  "data": [
    {
      "b64_json": "AAAAIGZ0eXBpc29t…",
      "media_type": "video/mp4",
      "duration_seconds": 4,
      "resolution": "720p",
      "aspect_ratio": "16:9"
    }
  ],
  "usage": {
    "generation_seconds": 40
  }
}

Try it - see the 402 challenge (free)

curl -i -X POST https://agent402.tools/v1/videos/generations \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A paper boat drifting down a rain-soaked gutter, close up, cinematic","aspect_ratio":"16:9"}'

The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/v1/videos/generations", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "prompt": "A paper boat drifting down a rain-soaked gutter, close up, cinematic",
    "aspect_ratio": "16:9"
  }),
});
Wallet-only. This tool reaches the network/browser/storage, so it is paid in USDC via x402 (no proof-of-work tier).

Related tools

Chat completions - nano tier

$0.003 · POST /v1/nano/chat/completions

OpenAI-compatible chat completions, nano tier: gpt-4.1-nano, gpt-5-nano, gemini flash-lite, small llama/ministral/qwen, …

try in playground →

Chat completions - auto tier (eval-ranked routing)

$0.01 · POST /v1/auto/chat/completions

OpenAI-compatible chat completions with server-side model choice: omit "model" (or send "auto") and the gateway routes t…

try in playground →

Grounded chat (web search, OpenAI-compatible)

$0.03 · POST /v1/grounded/chat/completions

OpenAI-compatible chat completions GROUNDED in a live web search on every call: the gateway runs an Exa search (up to 5 …

try in playground →