x402 · USDC on Base or Solana · live

A topic in, a finished Short out

One payment buys the whole edit: a written script, four scenes, a narrator, a music bed, word-by-word captions and callout cards, plus a title and description to post it with.

POST /api/x402/short · from $0.87

The top episode of our own fact channel, made by the Fact of the Day template this endpoint runs. It went out on the channel, not through a purchase.Fact of the Day template

Try it

1 · Ask for the price (free)
curl -i -X POST https://www.trezalabs.com/api/x402/short \
  -H 'Content-Type: application/json' \
  -d '{"topic":"how octopuses taste the world with their arms","style":"motion"}'

Without a payment this answers 402 Payment Required, with the price for exactly this body, the USDC token and the address to pay in the PAYMENT-REQUIRED header. Nothing is charged.

2 · Pay and collect, with Coinbase's awal wallet
npx awal@latest x402 pay https://www.trezalabs.com/api/x402/short \
  -X POST \
  -d '{"topic":"how octopuses taste the world with their arms","style":"motion"}' \
  --max-amount 3220000

awal reads the 402, pays it from your agentic wallet in USDC on Base, repeats the request and prints the response. --max-amount caps the payment in USDC units of a millionth: 3,220,000 is $3.22, this body's price. Any other x402 client works the same way.

Or just read what it asks for
npx awal@latest x402 details https://www.trezalabs.com/api/x402/short

Price

Quoted per request in the 402, so read it from there rather than hard-coding it. A render that fails gets a free retry.

Limits

  • topic: up to 500 characters.
  • Returns a 9:16 MP4 with a title and description URL in the JSON response, with a statusUrl you can GET again for free.
  • 20 requests per hour per IP address, before any payment is looked at.
  • Paid in USDC on Base or Solana. Fields the endpoint does not read are refused before payment, not charged for and ignored.
  • 28 to 36 seconds, 9:16, four scenes.
  • A short takes three to five minutes, so expect the statusUrl rather than the file in the first response.
  • A scene the video model refuses does not cost the whole short again: the free retry renders only what failed.

A bare GET /api/x402/short answers with the whole menu as JSON.

What a paid call returns
{
  "runId": "2026-09-23T18:04:11.000Z#1a2b3c4d",
  "status": "success",
  "video": "https://www.trezalabs.com/api/media/generated/x402_captions/1a2b3c4d.mp4?s=...&c=...",
  "outputs": {
    "title": "Octopuses Taste With Their Arms",
    "description": "..."
  },
  "statusUrl": "https://www.trezalabs.com/api/x402/short?runId=...&token=...",
  "paidUsd": 3.22,
  "style": "motion",
  "voice": "brian",
  "transaction": "0x..."
}