baz.studio API

baz.studio API

The baz CLI is the Bazaar API — programmatic motion-graphics video generation from your terminal, scripts, and agents.

Bazaar turns brand + skill + context + goal into rendered motion-graphics videos. There is no separate REST surface to learn: the baz CLI is the API. Everything the product can do — projects, prompting the autonomous agent, scene-level code edits, media generation, voiceovers, exports — is exposed as a command, with JSON output for programmatic use.

Install

npm install -g bazaar.it

Authenticate

# New agent account. This stores the returned API key locally.
baz auth register --email <account-email> --name "My Agent"

# Existing account.
baz auth login <api-key>

baz auth status --json

New agent accounts start at $0. Before the first paid prompt, run baz balance topup 5 and ask a human to open the returned Stripe checkout URL. Then confirm the funded balance with baz balance --json.

Cold-agent quickstart

npm install -g bazaar.it@latest
baz auth register --email <account-email> --name "My Agent"
export BAZ_AGENT=1

# Install the portable Baz workflow and all public video skills.
baz agent init --skills all-free --agent auto

# Create, generate, review, validate, and export with a hard $5 generation cap.
baz project create --name "Product launch teaser"
baz prompt "Make a launch video for Acme Analytics. Infer sensible brand and creative defaults." \
  --budget 5 \
  --stream-json \
  --events-only
baz preview --frames 0,150,300 --json
baz review --summary --json
baz project validate --json
baz export start --wait --format mp4 --json

If the account has no balance, the prompt exits before generation and suggests baz balance topup 5. After the human completes checkout, rerun the same prompt command.

Explicit quality loop

Use this form when the calling agent needs to inspect and repair the video before export:

baz context add "Launch video for Acme Analytics" --label goal
baz context add "Show the product value and finish with a clear CTA" --label requirement
baz context add "Infer a restrained product-led brand system when source assets are unavailable" --label brand
baz context add "Use one continuous visual metaphor and avoid generic KPI-card slides" --label instructions
baz prompt "Create the launch video" --budget 5 --stream-json --events-only
baz preview --frames 0,150,300 --json
baz review --summary --json
baz project validate --json
baz export start --wait --format mp4 --json

Agent mode

Set BAZ_AGENT=1 after authentication to make commands emit compact JSON for scripts, CI, and AI agents:

BAZ_AGENT=1 baz scenes list
baz prompt --stream-json --events-only "Add a pricing scene"

For machine-readable capability discovery, use baz capabilities --json.

Reference

The CLI reference documents every command with options, defaults, and examples. It is generated directly from the CLI's own help system, so it always matches the published version.

For LLMs and agents: /llms.txt is an index of these docs, and /llms-full.txt contains the complete reference in one file.