Genblaze
Pipeline SDK for AI-generated video, audio, and images with built-in provenance.
Genblaze is an AI pipeline SDK by Backblaze for building and orchestrating generative media workflows across video, image, and audio.
A unified Pipeline API spans providers like OpenAI, Google, Runway, Luma, ElevenLabs, and Stability Audio, plus models served through platforms such as GMI Cloud and NVIDIA NIM (build.nvidia.com) — so you swap providers without rewriting orchestration. Every run produces a canonical provenance manifest you can embed directly into media files (.mp4, .png, .mp3, …) and persist to Backblaze B2 or any S3-compatible store. Manifest.verify() checks the manifest hash and requires every output asset to declare a valid sha256; callers that fetch asset.url should re-hash those bytes separately, and the CLI's opt-in genblaze verify --fetch mode does exactly that.
Why Genblaze
Genblaze sits between "call a single video API" and "run a media pipeline in production." The differentiators:
- Provenance by default. Every run yields a canonical manifest — deterministic, embeddable into
.mp4 / .png / .jpg / .webp / .mp3 / .wav, or persisted alongside the asset. Outputs become SHA-256-covered when providers return bytes orObjectStorageSinktransfers them into durable storage; URL-only outputs do not passManifest.verify(). Tamper-evident in trusted storage; pair with your own signer or C2PA when adversarial verification matters. See trust modes. - One pipeline, many providers. Eleven adapters across video, image, audio, and chat behind a single
Pipeline/StepAPI. Swap Sora → Runway → Veo by changing one line; chain text → image → video without re-plumbing. - Storage is first-class.
S3StorageBackend.for_backblaze("bucket")ships durable, credential-free asset URLs and content-addressable layouts. Designed for Backblaze B2; works against any S3-compatible store (AWS S3, Cloudflare R2, MinIO). - Fallback chains and conformance.
fallback_models=[...]retries onMODEL_ERROR; CI-gradeprobe_modelsand provider-contract tests catch upstream drift before users do. - Replayable runs. Every manifest captures the full provenance — provider, model, prompt, params, timestamps — so a run can be reconstructed via
genblaze replay manifest.jsonor by feeding the canonical params back into a Pipeline.
Reach for something else when:
- You only need an LLM chat loop → use the provider's SDK or LangChain.
- You're building a UI-driven generation app in JS/TS → use the Vercel AI SDK.
- You're not generating media or don't care about provenance → the provider's SDK directly is simpler.
Install
pip install genblaze # core + B2/S3 storage (the umbrella)
pip install "genblaze[gmicloud]" # + GMICloud provider
pip install "genblaze[video]" # + curated video bundle
pip install "genblaze[all]" # + every provider
The umbrella pulls in genblaze-core (pipeline + models) and genblaze-s3 (Backblaze B2 / S3 storage) so you have a working provenance pipeline out of the box. Provider adapters are opt-in extras.
A GitHub Release tag (e.g.
v0.7.0) is not agenblazeversion — don't pingenblaze==. The tag names a CHANGELOG wave; every package in that wave versions independently, so wave tags and the umbrella's PyPI versions are separate sequences that happen to look alike (see RELEASING.md). A pin on a wave tag either:
- fails outright (no such version was published), or
- resolves silently to an unrelated umbrella build from a different wave — no error, just stale code (e.g.
genblaze==0.4.0on PyPI predates thev0.4.0wave).Pin the exact umbrella version instead (from that wave's "Released package versions" list in its release notes) — but note the umbrella pins ranges (e.g.
genblaze-core>=0.3.8, even that isn't fully reproducible on its own. For a locked install, generate a lockfile (pip freeze,uv lock`, or a constraints file) once your stack works.
Install packages individually if you prefer:
pip install genblaze-core # Pipeline, Step, Run, Manifest, sinks, tracers
pip install genblaze-s3 # S3-compatible storage (B2, AWS, R2, MinIO)
pip install genblaze-cli # CLI: extract, verify, replay, index
# Provider adapters
pip install genblaze-openai # OpenAI: Sora, DALL-E / gpt-image, TTS, chat
pip install genblaze-google # Google: Veo, Imagen, Gemini-image, chat
pip install genblaze-nvidia # NVIDIA NIM: Cosmos, SDXL/FLUX, Fugatto, Riva, chat
pip install genblaze-gmicloud # GMICloud: video, image, audio, chat (request queue)
pip install genblaze-runway # Runway Gen video
pip install genblaze-luma # Luma Dream Machine video
pip install genblaze-decart # Decart Lucy video / image
pip install genblaze-replicate # Replicate (Flux, SDXL, etc.)
pip install genblaze-elevenlabs # ElevenLabs TTS + sound effects
pip install genblaze-stability-audio # Stability AI Stable Audio (music)
pip install genblaze-lmnt # LMNT fast TTS
pip install genblaze-hume # Hume AI Octave TTS
pip install genblaze-assemblyai # AssemblyAI speech-to-text / transcription
Install names use hyphens, Python imports use underscores: pip install genblaze- → import genblaze_.
TypeScript types for the manifest schema are published on npm:
npm install @genblaze/spec
Quickstart
End-to-end: generate a video, persist it and its provenance manifest to Backblaze B2, verify the hash.
pip install genblaze-core genblaze-gmicloud genblaze-s3
export GMI_API_KEY="gmi-..."
export B2_KEY_ID="..."
export B2_APP_KEY="..."
from genblaze_core import Modality, ObjectStorageSink, KeyStrategy, Pipeline
from genblaze_gmicloud import GMICloudVideoProvider
from genblaze_s3 import S3StorageBackend
storage = ObjectStorageSink(
S3StorageBackend.for_backblaze("my-bucket"),
key_strategy=KeyStrategy.HIERARCHICAL,
)
result = (
Pipeline("my-first-pipeline")
.step(
GMICloudVideoProvider(),
model="seedance-2-0-260128",
prompt="A drone shot soaring over a coastal city at golden hour",
modality=Modality.VIDEO,
duration=10,
aspect_ratio="16:9",
)
.run(sink=storage, timeout=600)
)
print(f"Asset URL: {result.run.steps[0].assets[0].url}") # B2 durable URL
print(f"SHA-256: {result.run.steps[0].assets[0].sha256}")
print(f"Manifest: {result.manifest.manifest_uri}") # Provenance JSON in B2
print(f"Hash: {result.manifest.canonical_hash}")
print(f"Verified: {result.manifest.verify()}")
The manifest captures the full provenance chain — provider, model, prompt, parameters, timestamps, and a canonical hash for integrity verification — and is uploaded alongside the asset. The asset URL is durable (credential-free, never expires), safe to store anywhere.
Runnable copy:
examples/quickstart.py. No API key? Tryexamples/quickstart_local.py— builds and verifies a manifest with zero external calls.
Concepts
| Primitive | Description |
|---|---|
Pipeline |
Fluent, composable multi-step generation workflow with sync, async, and streaming runners. Supports fan-in (input_from), fallback chains, and AV compositing. |
Step |
A single generation operation — provider, model, prompt, params, retry budget, fallback chain, cost. |
Run |
A pipeline execution: collection of steps with shared run_id, tenant_id, and parent_run_id for lineage. |
Asset |
Generated media artifact with durable URL, SHA-256, MIME type, duration, and per-modality metadata. |
Manifest |
Canonical, hash-verified provenance document — embeddable into MP4 / PNG / JPEG / WebP / MP3 / WAV. |