Build with Treza
Video, images, voice and music from your code or your agent. One prompt in, a finished file out, with the price before anything renders.
# Price a video. Nothing is charged yet.
curl https://www.trezalabs.com/api/v1/tools/make_video \
-H "Authorization: Bearer treza_live_..." \
-d '{ "prompt": "A manta ray over a sunlit reef", "durationSec": 6, "aspectRatio": "9:16" }'
# -> { "pipelineId": "...", "quoteId": "...", "estimatedChargeUsd": ... }
# Render it at that price, then poll get_run for the file.
curl https://www.trezalabs.com/api/v1/tools/run_pipeline \
-H "Authorization: Bearer treza_live_..." \
-d '{ "pipelineId": "...", "quoteId": "..." }'Four ways in
Pick the one that fits how you build. They all reach the same models.
MCP server
Your agent makes videos, edits clips and runs pipelines with a quote before every render. Works in Claude, ChatGPT, Codex and Cursor.
# Claude Code
claude mcp add --transport http treza https://www.trezalabs.com/api/mcp
# Codex
codex mcp add treza --url https://www.trezalabs.com/api/mcpTools API
The MCP server's tools as plain HTTP, 37 of them. POST the arguments as JSON with an API key.
curl https://www.trezalabs.com/api/v1/tools/list_assets \
-H "Authorization: Bearer treza_live_..." \
-d '{}'Pay per call with x402
Video, images, speech, music, clips and narrated shorts. The payment is the only credential, so an agent can buy without signing up.
curl https://www.trezalabs.com/api/x402/video \
-H "Content-Type: application/json" \
-d '{ "prompt": "A manta ray over a sunlit reef", "seconds": 5 }'
# -> 402 with the price. Pay in USDC on Base or Solana, repeat, get the video.Your pipeline as an API
Publish a pipeline from the canvas and call it with typed /invoke or any OpenAI SDK. Versioned, with run history.
from openai import OpenAI
client = OpenAI(
api_key="treza_live_...",
base_url="https://www.trezalabs.com/api/pipelines/YOUR_PIPELINE_ID",
)
reply = client.chat.completions.create(
model="treza",
messages=[{"role": "user", "content": "A 6-second product demo"}],
)
print(reply.choices[0].message.content) # -> https://.../output.mp4Everything you need to build
MCP server
Connect a client, sign in, and every tool it can call.
Open->ReferenceOpenAPI spec
Every REST tool with its arguments, generated from the live server.
Open->Paymentsx402
Endpoints, prices, and how an agent pays per call.
Open->PipelinesPipeline API
/invoke, /chat/completions, streaming and the error model.
Open->AuthAPI keys
Create, scope and rotate treza_live_ keys.
Open->ModelsModel catalog
Veo, Seedance, Kling, Gemini image, ElevenLabs and more.
Open->Developer FAQ
What is the fastest way to make a video from code?
Create an API key, then POST a prompt to /api/v1/tools/make_video. It picks a model, returns the price and a quoteId, and charges nothing. Pass the quoteId to /api/v1/tools/run_pipeline to render at that price, then poll get_run for the file.
Can my AI agent use Treza?
Yes. Add the MCP server at https://www.trezalabs.com/api/mcp to Claude, ChatGPT, Codex, Cursor or any MCP client and sign in with Google. The agent gets tools to make videos and images, edit and join clips, run pipelines and check the price before each render.
Do I need an account?
Not for x402. The /api/x402 endpoints sell video, images, speech, music, clips and narrated shorts per call in USDC on Base or Solana, with the payment as the only credential. Everything else uses an account and prepaid credits.
Is the pipeline API OpenAI-compatible?
Yes. Every published pipeline has a /chat/completions endpoint that works with any OpenAI SDK, streaming included. Set the base URL to your pipeline and the API key to your Treza key.
Can Treza call me when a render finishes?
Yes. Pass an https callbackUrl to run_pipeline, assemble_video or edit_asset and Treza POSTs the finished run there once, with the same JSON get_run returns and the headers X-Treza-Event: run.finished and X-Treza-Delivery: <runId>. Answer 2xx within 10 seconds; a timeout, 408, 429 or 5xx is retried twice. The URL must reach a public address. This is how Zapier, Make and n8n wait for a video without polling.
How am I billed?
Prepaid credits, no subscription. You see the price before a render starts. A failed generation costs nothing, and if a run stops partway you pay only for the steps that finished. A low balance returns a 402.
Ready to build?
Get your API key and make your first video in two calls. Prepaid credits, no subscription.
Get your API key->