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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file recall_relay-0.1.1.tar.gz.
File metadata
- Download URL: recall_relay-0.1.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9d906eec47e64b3df4544fcb80b99cccd6d799b4f233643d4188d7d6a75f03b
|
|
| MD5 |
97de28e8007a5bf08d46d47c3929f8f7
|
|
| BLAKE2b-256 |
4efc9715380bc46db2b890078959b48fe56f7bbf86ba209e0255ba2c54439d3b
|
Provenance
The following attestation bundles were made for recall_relay-0.1.1.tar.gz:
Publisher:
release.yml on usv240/recall-generation-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
recall_relay-0.1.1.tar.gz -
Subject digest:
a9d906eec47e64b3df4544fcb80b99cccd6d799b4f233643d4188d7d6a75f03b - Sigstore transparency entry: 2252073973
- Sigstore integration time:
-
Permalink:
usv240/recall-generation-memory@6c3aa3fcb62936836f5a692b28ef433957321f17 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/usv240
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6c3aa3fcb62936836f5a692b28ef433957321f17 -
Trigger Event:
release
-
Statement type:
File details
Details for the file recall_relay-0.1.1-py3-none-any.whl.
File metadata
- Download URL: recall_relay-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61eddd5a2bc2183c8ffd17f3d6ebcfab623bf2f38d3f340be2a69a234700b93b
|
|
| MD5 |
1171568ad3e357d96425319e15ad4d98
|
|
| BLAKE2b-256 |
1778bf0b8184c2fd90705af3989d752a54fce1a71b975379f013e0517a591da0
|
Provenance
The following attestation bundles were made for recall_relay-0.1.1-py3-none-any.whl:
Publisher:
release.yml on usv240/recall-generation-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
recall_relay-0.1.1-py3-none-any.whl -
Subject digest:
61eddd5a2bc2183c8ffd17f3d6ebcfab623bf2f38d3f340be2a69a234700b93b - Sigstore transparency entry: 2252074200
- Sigstore integration time:
-
Permalink:
usv240/recall-generation-memory@6c3aa3fcb62936836f5a692b28ef433957321f17 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/usv240
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6c3aa3fcb62936836f5a692b28ef433957321f17 -
Trigger Event:
release
-
Statement type: