Skip to main content

recall-relay

recall-relay is a dependency-free, provider-neutral Python client. It checks a private Recall memory before an image, video, or audio provider runs; on a safe hit it returns the stored asset, and on a miss it captures the caller-generated bytes for future reuse.

Install

pip install recall-relay

For local development:

pip install -e sdk/python

Configure

Use either a private workspace pair or a scoped Recall integration key:

export RECALL_URL=https://recall-production-production.up.railway.app
export RECALL_WORKSPACE_ID=ws-...
export RECALL_WORKSPACE_KEY=save-the-one-time-key
# Alternative to the workspace pair:
# export RECALL_API_KEY=your-scoped-integration-key
export GEMINI_API_KEY=your-google-key

`n## Use

recall-relay doctor
recall-relay gemini "Editorial cobalt glass product image" --tag launch --intent brand=Recall --intent format=1:1 --output hero.png --cost-usd 0.067

The CLI never prints credentials. gemini calls Google only after Recall's private workspace returns a safe miss.

OpenAI image generation

Set OPENAI_API_KEY locally and run:

recall-relay openai "Editorial cobalt glass product image" --model gpt-image-1 --output hero.png --cost-usd 0.067

Secure releases

PyPI releases use GitHub Trusted Publishing from .github/workflows/release.yml and the protected pypi environment. No long-lived PyPI token is stored in GitHub.

Any provider: the adoption API

Use generate_with() to add Recall in front of any image, video, or audio provider. The provider call and its credentials stay in your application; Recall only receives completed media after a safe miss.

from recall_relay import RecallRelay

relay = RecallRelay("https://your-recall.example", workspace_id="ws-...", workspace_key="...")

result = relay.generate_with(
    "A launch visual for our cobalt collection",
    generator=lambda prompt: call_your_provider(prompt),  # returns bytes
    provider="your-provider",
    model="your-model",
    media_type="image/png",
    tags=["launch", "cobalt"],
    intent={"brand": "Acme", "format": "1:1"},
    cost_usd=0.42,  # effective cost for this completed output
)

On reused, call_your_provider is never invoked; Relay performs the explicit free retrieval so Recall records the avoided cost. On generated_and_captured, Recall stores the output, byte hash, provider/model record, caller-reported cost, and reuse receipt for the next request.

Capture requires a private workspace or RECALL_API_KEY; the public demo lane cannot be used for arbitrary uploads. cost_usd is optional, but savings remain unpriced until a trustworthy effective cost is supplied. Completed media is limited to 18 MB per capture by default. RecallRelay(..., max_media_bytes=...) can lower the client-side ceiling, while the server remains authoritative. Existing output files are never silently overwritten; the CLI selects a numbered filename.

Metadata

Release files for recall-relay 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for recall-relay 0.1.1
File Size Uploaded
recall_relay-0.1.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for recall-relay 0.1.1
File Interpreter ABI Platform
recall_relay-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 kB

Release files / recall_relay-0.1.1.tar.gz

Download URL recall_relay-0.1.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a9d906eec47e64b3df4544fcb80b99cccd6d799b4f233643d4188d7d6a75f03b
BLAKE2b-256 checksum
How to use checksums
4efc9715380bc46db2b890078959b48fe56f7bbf86ba209e0255ba2c54439d3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.

Transparency log

Release files / recall_relay-0.1.1-py3-none-any.whl

Download URL recall_relay-0.1.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61eddd5a2bc2183c8ffd17f3d6ebcfab623bf2f38d3f340be2a69a234700b93b
BLAKE2b-256 checksum
How to use checksums
1778bf0b8184c2fd90705af3989d752a54fce1a71b975379f013e0517a591da0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release 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