This release is a pre-release and may not be stable for production use.
physionlabs
Official Python client for the Galileo video evaluation API.
Release candidate.
pip install physionlabsresolves it. The API below is not final until 0.1.0, and this notice is what will change when it is.
Setup
pip install --pre physionlabs
export GALILEO_API_KEY="your-api-key"
The new Client API requires rc.6 or newer. Put an H.264 MP4 named video.mp4
in the working directory (at most 15 seconds and 50 MiB), and replace the prompt
below with what your video was meant to show.
What Galileo does
Submit a generated video and a prompt; get back the places where the video has visual defects and the places where it does not do what the prompt asked.
from physionlabs import Client
client = Client() # reads GALILEO_API_KEY
evaluation = client.evaluations.create(
model="galileo-1.0",
input={
"video": {"path": "./video.mp4"},
"prompt": "A red ball rolls off a table and bounces twice.",
},
)
# `result` is None on a failed run, so it is worth branching rather than
# reaching straight in — a failed evaluation is an outcome, not an exception.
if evaluation.status.value == "failed":
print("failed:", evaluation.error.message if evaluation.error else "no reason given")
else:
for finding in (evaluation.result.glitches if evaluation.result else []):
print(finding.type.value, finding.description)
partial is also terminal and DOES carry a result: one detector finished and
another did not, and detectors says which of them to trust. A caller waiting
for completed alone waits forever.
Uploading separately to reuse a video across evaluations:
video = client.videos.upload("./clip.mp4")
if video.status.value != "ready":
raise ValueError("Video failed validation.")
evaluation = client.evaluations.create(
model="galileo-1.0",
input={
"video": {"upload_id": video.id},
"prompt": "A red ball rolls off a table and bounces twice.",
},
)
Walking a large account, and retrying what failed:
for ev in client.evaluations.iterate(status=["failed"]):
nxt = client.evaluations.retry(ev.id) # idempotent, unlike create
print(ev.id, "->", nxt.id)
retry() is the only idempotent submission in this API: press it in a burst and
every caller is handed the same successor. create() is not, which is why this
client never retries it — see the note in resources/evaluations.py.
The contract
This client is not hand-written against a running server. openapi/galileo-v1.yaml
is a copy of the API's OpenAPI description, and the models in
physionlabs/models.py are generated from it — so a field cannot be wrong here
without being wrong in the contract.
openapi/SOURCE records which upstream revision the copy is.
python scripts/check_contract.py fails if the copy has been edited locally, or
if the generated models are not what the contract produces.
The Node client, @physionlabs/galileo,
is built from the same copy of the same file.
Development
uv sync
uv run python scripts/generate_models.py # regenerate models from the contract
uv run python scripts/check_contract.py # verify the copy and the models are in step
uv run pytest
uv run mypy
License
Apache-2.0. Chosen over MIT for the explicit patent grant: MIT is silent on patents, which is one more thing for a reviewer to think about, and Apache-2.0's retaliation clause protects everyone using it.
Submit without waiting
Client.evaluations.create() handles upload, validation, submission and waiting
for the result. Client.evaluations.submit() accepts the same model and input
but returns the job ID after submission. A local file still has to finish
uploading and validating first. Use retrieve(id) to read the result later.
For a hosted video, use input.video.url instead of input.video.path.
Migrating from rc.5
Import Client, move video and prompt into input, and select
galileo-1.0. Replace create-and-wait with create, and submit-only create
with submit. The original Galileo entry point retains its old behavior.
Metadata
Release files for physionlabs 0.1.0rc6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| physionlabs-0.1.0rc6.tar.gz | 173.4 kB | With provenance | Details for physionlabs-0.1.0rc6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| physionlabs-0.1.0rc6-py3-none-any.whl | Python 3 | none | any | Details for physionlabs-0.1.0rc6-py3-none-any.whl |
Total release size: 206.0 kB
Release files / physionlabs-0.1.0rc6.tar.gz
| Download URL | physionlabs-0.1.0rc6.tar.gz |
|---|---|
| Size | 173.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9ff029d518f27cb9fb51adef4e27a3b916cca382fa2af72e9a1c72d465e4aa5
|
|
BLAKE2b-256 checksum How to use checksums |
0834394df9d886b398b2534a47e00d8e6f73207063a19e7524be9a1255e7ec7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Sep 11, 2026.
Transparency logRelease files / physionlabs-0.1.0rc6-py3-none-any.whl
| Download URL | physionlabs-0.1.0rc6-py3-none-any.whl |
|---|---|
| Size | 32.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12f44a5bd32d0520cd2cb8f2e5295221aae9c70b1f98a1c3241cf696772d3a71
|
|
BLAKE2b-256 checksum How to use checksums |
ad7b49e138b31b836059270e8e99337e2025356a1aceb18672da7626305fa9cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Sep 11, 2026.
Transparency logSecurity for physionlabs 0.1.0rc6
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for physionlabs-0.1.0rc6.tar.gz
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 Sep 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.