Treza media (x402)
Make videos, images, voiceovers, music, finished narrated shorts and captioned clips from long videos, paid per call in USDC over x402 with no account or API…
by treza-labs338 installs in other catalogs
Install Treza media (x402) in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Treza media
Six endpoints that make media and return the file. Each one is paid per call with x402 (USDC on Base). The payment is the only credential: no Treza account, API key or email.
| Make | Endpoint | From | Usually ready in |
|---|---|---|---|
| Video clip | https://www.trezalabs.com/api/x402/video |
$0.28 (4 s) | 1 to 5 minutes |
| Narrated short | https://www.trezalabs.com/api/x402/short |
$0.87 (stills), $3.22 (animated) | 3 to 5 minutes |
| Clip from a long video | https://www.trezalabs.com/api/x402/clip |
$0.04 (1 min source) | a few minutes, longer for long sources |
| Image | https://www.trezalabs.com/api/x402/image |
$0.02 | under a minute |
| Voiceover | https://www.trezalabs.com/api/x402/speech |
$0.02 | seconds |
| Music | https://www.trezalabs.com/api/x402/music |
$0.06 (30 s clip) | under a minute |
Payments go through awal, the Coinbase Agentic Wallet CLI, version 2.12.2. If
awal is not on PATH, run every command below as npx [email protected] ... instead.
Always name that exact version, never an unpinned one.
What this skill sends, and where
- Every Treza call goes to
https://www.trezalabs.com/api/x402/, and nowhere else. - The only thing sent is the request body the user approved: the prompt, text, topic or source link, with the model and settings. Never add workspace files, environment variables, keys, wallet details or other conversation content.
- Reading a menu and polling a status sends nothing about the user.
- The only other network traffic is
awaltalking to Coinbase: the user's email and one-time code when the wallet signs in (step 2, after the user agrees), and signing and settling each payment. Plus downloading the finished file from the URL in the answer.
1. Read the menu (free)
A GET on any endpoint returns its menu: models, lengths, voices, the accepted body fields and the exact prices. Read it before every purchase and never guess a model or voice id.
curl -s https://www.trezalabs.com/api/x402/video
Only the fields listed in the menu's fields are accepted. Anything else is
refused with a 400 before any money moves.
2. Check the wallet
awal status
awal balance
The first awal command installs a small wallet app and can take a few minutes.
Wait for awal status to report the server running before anything else. If a
command answers "The wallet may be unresponsive", run awal quit, then
awal status, and try again.
If the wallet is not signed in, it needs the user's email, and signing in sends
that email and a one-time code to Coinbase, which runs the wallet (not to
Treza). Tell the user that and wait for a yes. Then ask for their email, run
awal auth login <email>, ask for the 6-digit code they receive and run
awal auth verify <flowId> <code>. If the USDC balance on Base is too low, give
the user the address from awal address to fund.
3. Get a yes before anything is sent
No part of the media request has gone to Treza yet; only the wallet sign-in, if there was one, has reached Coinbase. Before the request goes anywhere, tell the user:
- what you will make, on which model, and the price from the menu (a voiceover
is $0.42 per 1,000 characters of its text, rounded up to the cent, minimum
$0.02, times the voice's
priceMultiplier; a clip is priced by the source's length as the menu'spricingsays); - that their prompt, text, topic or source link will be sent to Treza (www.trezalabs.com) and the model provider that renders it;
- that paying accepts Treza's Terms of Service and Privacy Policy, including the provider's usage policies. Treza is not sold in sanctioned or unsupported regions.
Wait for a yes. A budget the user already gave you covers the price, but not the sending: ask about that the first time in a conversation.
4. Get the exact quote (free)
Only after that yes, POST the body you are about to buy without paying. The 402
answer carries the exact price in its payment-required header, base64-encoded
JSON whose accepts[].amount is the price in USDC atomic units (6 decimals:
420000 is $0.42). If it is above the price the user agreed to, stop and ask
again.
curl -s -D - -o /dev/null -X POST https://www.trezalabs.com/api/x402/speech \
-H 'content-type: application/json' \
-d '{"text":"Welcome back. Today we are looking at three small habits.","voice":"george"}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 -d
5. Buy
POST the same body with awal x402 pay, always with "async": true in the body.
Always pass --max-amount set to the quoted amount, so the wallet can never pay
more than the user agreed to.
Why async every time: awal sends paid requests through a Coinbase relay
that gives up after about ten seconds. A render that takes longer (most images,
every video and sho
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the Treza media (x402) skill do?
Make videos, images, voiceovers, music, finished narrated shorts and captioned clips from long videos, paid per call in USDC over x402 with no account or API key. Video on Veo 3.1, Seedance 2.5 and Hailuo 3 (text or image to video), images on Nano Banana, GPT Image 2.6, Seedream and FLUX.2, ElevenLabs voices, Lyria music, 30-second vertical shorts with script, narration, music and captions, and the best 30 to 60 seconds of a podcast or talk cut, reframed and captioned.
How do I install the Treza media (x402) skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the Treza media (x402) skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…