Skip to main content

OpenAI provider adapters for genblaze (Sora, DALL-E, TTS)

Project description

genblaze-openai

OpenAI provider adapters for genblazeSora text-to-video, DALL·E / gpt-image text-to-image, and TTS text-to-speech — with SHA-256 provenance manifests on every output.

genblaze-openai wraps OpenAI's generative media APIs (Sora video, DALL·E 3 and gpt-image-1 images, tts-1 / tts-1-hd / gpt-4o-mini-tts audio) as genblaze providers. Compose them into multi-step AI pipelines, persist outputs to Backblaze B2 or any S3-compatible store, and emit a tamper-evident provenance manifest for every run.

Why genblaze-openai

  • Three OpenAI modalities, one SDK — video (Sora), image (DALL·E, gpt-image), audio (TTS) — same Pipeline API.
  • Built-in provenance — Every Sora render / DALL·E image / TTS clip lands with a SHA-256-verified manifest.
  • Swap models without rewrites — Same pipeline works with Runway, Luma, Flux, Veo, ElevenLabs, etc.
  • Production-ready — Retries, timeouts, moderation hooks, step caching, streaming events.
  • Durable storage — Plug genblaze-s3 in for B2 / AWS S3 / R2 / MinIO persistence.

Providers + models

Provider class Modality Models
SoraProvider video sora-2, sora-2-pro
DalleProvider image gpt-image-1, dall-e-3, dall-e-2 (+ edits)
OpenAITTSProvider audio tts-1, tts-1-hd, gpt-4o-mini-tts

Each is registered via entry points (openai-sora, openai-dalle, openai-tts).

Install

pip install genblaze-openai

Quickstart — Sora text-to-video

export OPENAI_API_KEY="sk-..."
from genblaze_core import Modality, Pipeline
from genblaze_openai import SoraProvider

run, manifest = (
    Pipeline("sora-demo")
    .step(SoraProvider(), model="sora-2",
          prompt="A cinematic drone shot gliding over a misty mountain valley at sunrise",
          modality=Modality.VIDEO, seconds=4, size="1280x720")
    .run(timeout=300)
)
print(run.steps[0].assets[0].url, manifest.canonical_hash)

Quickstart — DALL·E text-to-image

from genblaze_openai import DalleProvider

run, manifest = (
    Pipeline("dalle-demo")
    .step(DalleProvider(), model="dall-e-3",
          prompt="A watercolor painting of a cozy bookshop on a rainy evening",
          modality=Modality.IMAGE, size="1024x1024", quality="hd")
    .run(timeout=120)
)

Quickstart — OpenAI TTS

from genblaze_openai import OpenAITTSProvider

run, manifest = (
    Pipeline("tts-demo")
    .step(OpenAITTSProvider(output_dir="output/audio"),
          model="tts-1-hd",
          prompt="Welcome to Genblaze — generative media pipelines with provenance.",
          modality=Modality.AUDIO, voice="nova", response_format="mp3")
    .run(timeout=60)
)

Persist to Backblaze B2

from genblaze_core import KeyStrategy, ObjectStorageSink
from genblaze_s3 import S3StorageBackend

storage = ObjectStorageSink(
    S3StorageBackend.for_backblaze("my-bucket"),
    key_strategy=KeyStrategy.HIERARCHICAL,
)
# …then pass sink=storage to .run(…)

See Backblaze B2 — the recommended default sink for genblaze.

Credentials

Env var Where to get it
OPENAI_API_KEY https://platform.openai.com/api-keys

Documentation

Related packages

License

MIT

Project details


Download files

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

Source Distribution

genblaze_openai-0.3.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

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

genblaze_openai-0.3.0-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file genblaze_openai-0.3.0.tar.gz.

File metadata

  • Download URL: genblaze_openai-0.3.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for genblaze_openai-0.3.0.tar.gz
Algorithm Hash digest
SHA256 295805fa127ed48a1d33b3c84c33eb06aca582f729fbc44840dd098b0582fd49
MD5 5ba685e17e2d84552e25867234a75580
BLAKE2b-256 dd01f4789c07a640f6273889526c6e3380b3922fbaf8c3a5b152cabbec466816

See more details on using hashes here.

Provenance

The following attestation bundles were made for genblaze_openai-0.3.0.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_openai-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: genblaze_openai-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for genblaze_openai-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76924dcbd568d70082022112a540f9efbd73cce3c295283902561b5580f36424
MD5 dbcd823830ae2d9a1d3a163ef93ec958
BLAKE2b-256 09c8aec29b08827c76ccca2f34e03c93ce4c33542d20ebd0db10ea6ceb1a45d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for genblaze_openai-0.3.0-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page