Use this skill when the user wants to create, edit, or export videos using the Bazaar CLI ( baz).
This is a GATED workflow. You MUST complete each phase in order. Do NOT skip phases. Do NOT declare "done" until the completion checklist at the bottom passes.
If you don't have a Bazaar account or API key yet, register programmatically:
bash
# 1. Discover what Bazaar can do
curl https://bazaar.it/api/v1/capabilities
# 2. Register (one POST, no human needed)
curl -X POST https://bazaar.it/api/v1/register \
-H "Content-Type: application/json" \
-d '{"email":"your-agent@example.com","name":"My Agent"}'
# Returns: api_key, auth header name, quickstart steps, endpoint URLs
# 3. Save your API key — authenticate all future requests with:
# -H "x-api-key: <your-api-key>"
# 4. Check pricing before you start
curl https://bazaar.it/api/v1/pricing
# 5. Install the CLI
npm install -g bazaar.it
baz auth login <your-api-key>
Balance starts at $0. When you hit a paid operation, you'll get HTTP 402 with a top_up_url in the response body. Call POST /api/v1/top-up with {"amount_cents": 500} (minimum $5) to get a Stripe checkout URL.
Shortcut: If your human creates an account at bazaar.it, they get $4 to start with. Ask them to grab an API key from the dashboard and you can skip straight to step 5.
Already have an API key? Skip to Phase 1.
baz prompt vs Spar#baz prompt — Scene creation, edits, full agent orchestrationbaz prompt --spar — Planning-only conversation (no timeline mutations)You MUST set project context BEFORE generating any scenes. This gives the composition agent the information it needs to produce correct output on the first try.
bash
# Create or select project
baz project create --name "Descriptive Name - Date/Purpose" --json
# OR
baz project use <id>
# Set goal (be specific — audience, purpose, desired outcome)
baz context add "Create 45-60 second feature announcement for [Product]. \
Audience: [who]. Key value: [what they get]." --label "goal"
# Add requirements (each one should be independently verifiable)
baz context add "Show [specific feature interaction]" --label "requirement"
baz context add "Include CTA: '[specific text]'" --label "requirement"
baz context add "Total duration: [range]" --label "requirement"
# Set brand guidelines
baz context add "Brand: [Name]. Primary [hex], accent [hex]. Font: [name]. \
[Logo placement]. [Visual style notes]." --label "brand"
bash
baz context list --json
Gate: Do NOT proceed to Phase 2 until baz context list shows at least one goal, one requirement, and one brand entry.
Now prompt the agent to create scenes. You can use one big prompt or multiple scene-by-scene prompts.
bash
# Option A: One comprehensive prompt
baz prompt "Create a video with: [scene 1 description], [scene 2], ..." --stream-json
# Option B: Scene-by-scene (more control)
baz prompt "Scene 1 (5s): Dark gradient intro, logo top-left, title slides up" --stream-json
baz prompt "Scene 2 (7s): Problem statement with mock UI..." --stream-json
baz prompt "Scene 3 (18s): Feature walkthrough..." --stream-json
Tips:
For videos with 3 or more scenes, plan choreography BEFORE generating. This prevents the "lockstep slideshow" pattern where all layers swap at the same frame boundary.
Before prompting, plan your actors:
ActorTrackLifetimeRoleBackground0Full durationEvolving gradient, particlesHero160-80%Main UI, enters, demotes to corner, returnsSupporting1-220-40%Cards/charts, appear during hero demotionText2+10-30%Headlines, arrive at beat points, explicit exits
spring() for hero entrance)bash
baz context add "CHOREOGRAPHY: Every overlay scene must specify its position and size. \
Use spring() for hero elements. Every non-final scene must have exit animations. \
Prefer one continuous background." --label "instructions"
baz prompt "Create a 15-second product demo: dark theme intro with logo, \
feature showcase with 3 cards, area chart showing growth, and a CTA. \
Brand: #6366f1 purple, #10b981 green, Inter font." --stream-json
ONE natural prompt. The composition agent handles decomposition into tracks + spatial layout internally based on choreography context.
After generation, you MUST run both review and verify. This is not optional.
bash
baz review --json
Read the output. Compare every requirement from Phase 1 against what was generated.
bash
baz verify --criteria "requirement 1,requirement 2,requirement 3" --json
Pass ALL requirements from Phase 1 as comma-separated criteria. The verify command checks each one.
json
{
"passedAll": true,
"results": [
{ "criteria": "...", "passed": true },
{ "criteria": "...", "passed": false, "reason": "..." }
]
}
Gate: If passedAll: false, you MUST proceed to Phase 4. Do NOT export. Do NOT declare done.
Fix every failing criteria. Then re-verify.
text
LOOP:
1. Read failing criteria from Phase 3
2. Fix with: baz prompt "Fix: [specific issue]" --stream-json
3. Re-run: baz review --json
4. Re-run: baz verify --criteria "req1,req2,req3" --json
5. If passedAll: false → GOTO 1
6. If passedAll: true → proceed to Phase 5
Do NOT exit this loop until passedAll: true.
Only export if the user explicitly asked for a rendered video AND Phase 3/4 passed.
bash
baz export start --wait --json
CommandPurposebaz project create --name "..." --jsonCreate new projectbaz project use <id>Set active projectbaz context add "..." --label "goal"Set project goalbaz context add "..." --label "requirement"Add verifiable requirementbaz context add "..." --label "brand"Set brand guidelinesbaz context list --jsonView all context entriesbaz prompt "..." --stream-jsonGenerate or edit scenesbaz prompt "..." --sparPlanning-only conversation (no edits)baz review --jsonGet full project state for reviewbaz verify --criteria "..." --jsonVerify specific criteria passbaz scenes list --jsonList all scenesbaz export start --wait --jsonRender final video
CategoryActiontransientRetry with backoff (wait retry_after seconds)validationFix input, do not retry same requestauthCheck API key with baz auth status``fatalStop and report to user
You are NOT done until ALL of these are true:
baz context list shows goal + requirements + brandbaz promptbaz review --json run AND baz verify --criteria "req1,req2,..." --json runpassedAll: true (or was true on first verify)If you skipped review/verify, you are not done. Go back and run them.
URLMethodData SentPurposebazaar.it/api/v1/capabilitiesGETNoneDiscover available toolsbazaar.it/api/v1/registerPOSTemail, nameCreate agent accountbazaar.it/api/v1/pricingGETNoneView operation costsbazaar.it/api/v1/estimatePOSToperation keys + quantitiesPre-execution cost estimatebazaar.it/api/v1/top-upPOSTamount in centsGet Stripe checkout URLbazaar.it/api/generate-streamPOSTprompt, projectIdGenerate video scenes (SSE)bazaar.it/api/trpc/*POSTvariesProject CRUD, scene management
x-api-key headerbaz CLI binary — it does not read or modify local files beyond CLI config at ~/.bazaar/config.jsonbaz auth status to see remaining balance before large jobsYour human can also edit the project directly in the browser at:
https://bazaar.it/projects/<project-id>/generate
After creating a project, share this link so they can preview scenes, tweak code, or make manual edits alongside your CLI workflow.