Give your CrewAI crew images and video
crewai-treza is a Python package of tools for CrewAI. An agent in your crew calls them to make a picture, make a video clip or run one of your Treza pipelines, and gets back the finished file's link and what it cost.
Free to add. You pay only for what you make.
Set it up in CrewAI
Install the package
Python 3.10 or newer, with CrewAI 0.100 or newer.
- 1
Install it
Add the package to the environment your crew runs in.
pippip install -U crewai-treza - 2
Add your Treza API key
Make a key on the Treza API keys page with the pipelines:read, pipelines:write and pipelines:run permissions. It starts with treza_live_. Set it as TREZA_API_KEY, or pass api_key in your code.
Shellexport TREZA_API_KEY="treza_live_..." - 3
Call one tool
Each tool returns JSON with the file's link, its status, the price and the model.
Pythonfrom crewai_treza import TrezaGenerateVideo tool = TrezaGenerateVideo(max_cost_usd=1.00) print(tool.run(prompt="A red fox trots through fresh snow", aspect_ratio="9:16", duration_sec=4)) - 4
Or give them all to an agent
treza_tools builds every tool with one key and one price cap. Pass the list as an agent's tools.
Pythonfrom crewai import Agent from crewai_treza import treza_tools director = Agent( role="Video director", goal="Turn a brief into a finished short clip", backstory="You write tight shot descriptions and deliver a link to the finished file.", tools=treza_tools(max_cost_usd=1.00), )
What the tools do
- 1
treza_generate_image and treza_generate_video
The agent writes the prompt and picks the shape, and for video the length and whether it has sound. Links to pictures in your Treza library can be references for an image, or the first and last frame of a clip.
- 2
treza_run_pipeline
Starts a pipeline you built in Treza with the inputs the agent passes in, and returns everything it made. Leave it out with treza_tools(include_pipelines=False).
- 3
treza_get_run
Looks a render up by its IDs. A video that takes longer than the tool waits comes back as still running, not as an error, and this picks it up. Free.
- 4
treza_balance
The credits left on your Treza account. Free.
Crews to start from
Each one is the Treza tools on one agent, beside the agents you already have.
A writer and a director
A writer agent drafts a shot description, and a director agent with treza_generate_video turns it into a finished clip.
A picture, then the clip
The director makes a picture with treza_generate_image and passes its link as first_frame_url to treza_generate_video.
Your pipeline as a tool
A producer agent calls treza_run_pipeline with the topic from the task, and reports the finished video's link.
A budget keeper
An agent with treza_balance checks the credits left before the crew starts a batch of renders.
Questions
What does it cost?
The package is free and MIT licensed. Renders spend prepaid credits from your Treza balance, with no subscription. Set max_cost_usd in your code: Treza prices the render first, and when the price is higher the tool tells the agent so and nothing is spent.
Can the agent raise the price cap?
No. max_cost_usd and the API key are set in your code and are not part of what the model sees or fills in. With no cap set, a render runs at its quoted price as long as your balance covers it, so set one for a crew.
What about videos that take minutes?
Each tool waits up to wait_seconds, 300 by default. A render still going after that comes back with status running and its IDs, and nothing is started twice. The get-run tool returns the file once it is done.
Do I need an API key?
Yes. A crew runs without you signing in, so it uses a key from the API keys page instead of Google. Delete the key there to cut it off.
Do my videos and credits carry over between apps?
Yes. Every app signs in to the same Treza account, so your library, your pipelines and your balance are the same in ChatGPT, Claude, Muse, Gemini, Cursor, Codex, Hermes Agent, Blender, n8n, Zapier, Dify, Gumloop and on trezalabs.com.
Treza in other apps
ChatGPT
In ChatGPT's plugin directory. Add it and mention @Treza in any chat.
Set it up->Claude
A custom connector in the Claude app, or the Treza plugin in Claude Code.
Set it up->Muse
Ask Muse to build a Treza connector, or add Treza to Muse Code.
Set it up->Gemini
A custom app in the Gemini app, or a server in Antigravity CLI.
Set it up->Cursor
One click adds Treza to Cursor's agent.
Set it up->Codex
From the plugin catalog in the ChatGPT app, or one command in Codex CLI.
Set it up->Hermes Agent
A few lines in ~/.hermes/config.yaml and one login command.
Set it up->Blender
An add-on that turns your camera view into AI renders and video clips.
Set it up->n8n
A verified node that makes images and videos inside your workflows.
Set it up->Zapier
Steps that make images and videos in your Zaps. In beta.
Set it up->Dify
A tool plugin that makes images and videos in your workflows and agents.
Set it up->ComfyUI
Nodes that make images and videos in your graphs, with no GPU needed.
Set it up->LangChain
Python tools that let an agent make images and videos, with a price cap.
Set it up->LlamaIndex
A tool spec that lets an agent make images and videos, with a price cap.
Set it up->Vercel AI SDK
TypeScript tools that let a model make images and videos, with a price cap.
Set it up->Gumloop
A custom MCP server that lets your agents make images and videos.
Set it up->Any MCP client
One URL for every client that speaks Streamable HTTP MCP.
Set it up->CrewAI is a trademark of CrewAI. Treza is an independent product and is not affiliated with or endorsed by CrewAI.
Setup steps from crewai-treza on GitHub, CrewAI Docs: Tools.