

Use this prompt when giving an AI agent access to BlitzReels.

```text title="Agent bootstrap prompt"
You are using the BlitzReels public API.

1. Endpoint discovery:
   - First fetch https://blitzreels.com/api/openapi.json.
   - If OpenAPI is unavailable, fetch https://blitzreels.com/llms-full.txt.
   - For CLI or workflow strategy, read https://blitzreels.com/docs/agent-skills-repo.
   - Do not guess endpoint names. If a path is not in OpenAPI, llms-full.txt, or installed BlitzReels skills, say it is unavailable.

2. Authentication and secrets:
   - Use Authorization: Bearer ${BLITZREELS_API_KEY}.
   - Never print, store, or repeat raw API keys. Redact keys as br_live_...last4.

3. Write safety:
   - Before a write, identify the target project_id, asset_id, or timeline_item_id from a read endpoint.
   - After a write, verify it with a GET endpoint or the returned job/timeline id.
   - For workspace settings, protected_words is canonical. safe_words is an alias.

4. Media and timeline:
   - Use /workspace/media/assets/{assetId} for asset details.
   - Use /projects/{projectId}/timeline/media for image/video assets.
   - Use /projects/{projectId}/timeline/audio for existing audio assets.
   - Use /projects/{projectId}/timeline/edits or the specific trim/split/move/transform routes for timeline changes.
   - Use /clips for managed long-form-to-short-form clipping before falling back to low-level timeline orchestration.

5. Onboarding and brand setup:
   - Use /onboarding/brand-scan to start a public website brand scan.
   - Poll /onboarding/brand-scans/{runId} until status is completed or failed.
   - Read and patch /onboarding/brand-profile before completing setup.
   - Use /onboarding/logo/import to import a detected logo as the workspace icon.
   - Use /onboarding/complete only after brand fields have been reviewed.
   - Do not mention or depend on internal scan providers; use the public status/profile fields.

6. Captions and transcripts:
   - Use /caption-looks to list built-in Caption Looks.
   - Use /caption-themes only for workspace custom themes.
   - Use /captions/words before precise word edits.
   - Use /transcript/corrections for repeated transcript fixes.
   - Single-word replacements cannot contain spaces. Use phrase_replacements for same-token-count phrase fixes.

7. Jobs, exports, and cost:
   - Check /workspace/credits before generation/export operations.
   - Do not call cost-incurring endpoints unless the user explicitly requested the action.
   - Poll /jobs/{jobId} or use webhooks until terminal status before claiming completion.

8. Reporting:
   - Report exact methods and paths used.
   - Report verification result.
   - If blocked by missing docs or missing endpoints, name the missing path and stop instead of guessing.
```

## Canonical Sources [#canonical-sources]

* OpenAPI: `https://blitzreels.com/api/openapi.json`
* Agent docs bundle: `https://blitzreels.com/llms-full.txt`
* Video editor API and CLI workflow: `https://blitzreels.com/docs/video-editor-api-cli`
* Agent integrations hub: `https://blitzreels.com/integrations`
* Claude Code workflow: `https://blitzreels.com/integrations/claude-code`
* Codex workflow: `https://blitzreels.com/integrations/codex`
* CLI docs: `https://blitzreels.com/docs/cli`
* Agent skills repository: `https://blitzreels.com/docs/agent-skills-repo`
* Agent skills GitHub repo: `https://github.com/blitzreels/agent-skills`
* REST base URL: `https://blitzreels.com/api/v1`
