Skip to main content

genblaze-replicate

Replicate provider adapter for genblaze — run any Replicate-hosted image, video, or audio model through a unified AI pipeline with SHA-256 provenance.

genblaze-replicate wraps Replicate's hosted model catalog (FLUX, SDXL, Stable Diffusion, video models, music models — anything on Replicate) as a genblaze provider. Compose Replicate calls into multi-step pipelines, persist outputs to Backblaze B2 or any S3-compatible store, and emit a tamper-evident provenance manifest for every run.

Why genblaze-replicate

  • Any Replicate model, one API — Pass the owner/model slug; genblaze handles submission, polling, asset download, and manifest capture.
  • Provenance by default — SHA-256 hash of every output, canonical manifest with prompt + params + timestamps.
  • Composable — Chain Replicate outputs into downstream steps (image → video, upscale, transcode).
  • Production-ready — Timeouts, retries, moderation hooks, step caching, OpenTelemetry tracing.
  • Durable storage — Drop the genblaze-s3 sink in for B2/S3/R2/MinIO persistence of assets + manifests.

Models

Supports any model hosted on Replicate — including:

  • Imageblack-forest-labs/flux-schnell, black-forest-labs/flux-dev, stability-ai/sdxl, stability-ai/stable-diffusion-3
  • Video — text-to-video and image-to-video models on Replicate
  • Audio — music and speech models on Replicate

Use the full owner/model slug from https://replicate.com/explore — official and community models alike. submit() runs each via the right Replicate endpoint: community models resolve to their latest published version (cached per-slug), official models run version-less. Pin an exact community version with owner/model:<version-hash>.

Install

pip install genblaze-replicate

Registers the replicate provider via entry points; genblaze-core discovers it automatically.

Quickstart — FLUX Schnell (text-to-image)

pip install genblaze-core genblaze-replicate
export REPLICATE_API_TOKEN="r8_..."
from genblaze_core import Modality, Pipeline
from genblaze_replicate import ReplicateProvider

run, manifest = (
    Pipeline("flux-demo")
    .step(
        ReplicateProvider(),
        model="black-forest-labs/flux-schnell",
        prompt="a photorealistic golden retriever puppy in a field of wildflowers, "
               "golden hour, shallow depth of field",
        modality=Modality.IMAGE,
        num_outputs=1,
        aspect_ratio="1:1",
    )
    .run()
)

print(run.steps[0].assets[0].url)
print(manifest.canonical_hash)
assert manifest.verify()

Quickstart — persist to Backblaze B2

pip install genblaze-core genblaze-replicate genblaze-s3
export REPLICATE_API_TOKEN="r8_..."
export B2_KEY_ID="..."  B2_APP_KEY="..."
from genblaze_core import KeyStrategy, ObjectStorageSink, Pipeline
from genblaze_replicate import ReplicateProvider
from genblaze_s3 import S3StorageBackend

storage = ObjectStorageSink(
    S3StorageBackend.for_backblaze("my-bucket"),
    key_strategy=KeyStrategy.CONTENT_ADDRESSABLE,
)

result = (
    Pipeline("flux-b2")
    .step(ReplicateProvider(), model="black-forest-labs/flux-schnell",
          prompt="cyberpunk tokyo street at night, neon reflections on wet pavement")
    .run(sink=storage, timeout=120)
)

print(result.run.steps[0].assets[0].url)   # durable B2 URL

Credentials

Env var Where to get it
REPLICATE_API_TOKEN https://replicate.com/account/api-tokens

Documentation

Related packages

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genblaze_replicate-0.3.3.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genblaze_replicate-0.3.3-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file genblaze_replicate-0.3.3.tar.gz.

File metadata

  • Download URL: genblaze_replicate-0.3.3.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for genblaze_replicate-0.3.3.tar.gz
Algorithm Hash digest
SHA256 a25920988f445e1d8c71c4f1aa60ce18ec9b0fbf130b4c024579d29e5a88b0d4
MD5 b72ee85d900e3fdba9048698ce5b5e7c
BLAKE2b-256 93e2bac2a87640e150fd3ce52a825a93c82c4c1188149e490f68254569b2dfc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for genblaze_replicate-0.3.3.tar.gz:

Publisher: release.yml on backblaze-labs/genblaze

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genblaze_replicate-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for genblaze_replicate-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c308e6e5cab549478e617de9f7db72109893cac2a69805480f38e4c0bfeafb7e
MD5 310e91c61bd080e4ed4709f9e1217c41
BLAKE2b-256 fab198ddf5c8ef1dd2dcb1e420ae7e743e114117731104a26ce3ae383626092e

See more details on using hashes here.

Provenance

The following attestation bundles were made for genblaze_replicate-0.3.3-py3-none-any.whl:

Publisher: release.yml on backblaze-labs/genblaze

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.4

2 files

This release

0.3.3 This release

2 files

0.3.2

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page