visynx
Run your VisionForge computer-vision models from Python.
Train a model in VisionForge, grab an API key, and you are three lines from predictions — detection, segmentation, pose, classification, and semantic segmentation, all through one call.
pip install visynx
Quickstart
from visynx import Visynx
vf = Visynx(api_key="vf_...") # or set VISYNX_API_KEY
model = vf.model("shelf-scanner/3") # your project name and version
result = model.predict("shelf.jpg", confidence=0.4)
for d in result:
print(d.class_name, round(d.confidence, 2), d.box)
result.save("annotated.jpg")
bottle 0.94 [412.0, 118.5, 501.2, 388.0]
bottle 0.91 [502.6, 121.0, 590.4, 390.7]
can 0.78 [604.1, 210.3, 664.9, 372.2]
visynx pulls in only requests and Pillow. No OpenCV, no numpy, no torch —
the models run on VisionForge's GPUs, not yours.
Find your models
for m in vf.models():
print(m.slug, m.provider, m.display_name)
# shelf-scanner/3 yolo Shelf Scanner v3
# defect-seg/1 rfdetr Defect Seg v1
"shelf-scanner/3" is the model's slug — your project name and its training
version, the same name you see in the app. A raw "yolo/<job_id>" also works
and skips the lookup.
What you get back
predict() returns a Result: iterate it for detections, or reach for the raw
API payload with .json().
result = model.predict("shelf.jpg")
len(result) # 3
result.detections[0] # Detection('bottle', 0.94)
result.json() # the raw API response, untouched
result.plot() # a PIL image with boxes drawn on
result.save("out.jpg") # ...written to disk
Each Detection carries class_id, class_name, confidence, and box
([x1, y1, x2, y2] in absolute pixels). Segmentation models add polygons;
pose models add keypoints.
Anything image-shaped works
model.predict("shelf.jpg") # a path
model.predict("frames/") # a directory -> list of Results
model.predict(open("shelf.jpg", "rb")) # an open file
model.predict(pil_image) # a PIL image
model.predict(numpy_array) # a numpy array (from OpenCV, say)
Beyond boxes
Two flags the hosted GPUs do for you, with nothing extra to install. Each runs a second model, so each costs extra credits:
# Turn every detected box into a precise instance polygon with SAM 2
result = model.predict("shelf.jpg", segment=True)
result.detections[0].polygons
# Add a monocular depth map, and a relative distance per detection
result = model.predict("shelf.jpg", depth=True)
result.detections[0].depth_median # 0-1, higher is closer
result.depth_image.save("depth.png")
Semantic-segmentation models return a dense mask instead of boxes:
result = model.predict("road.jpg")
result.semantic["legend"] # [{'class_id': 1, 'class_name': 'road', ...}]
result.save("mask.jpg") # the mask, blended over your image
Get an API key
In VisionForge, go to Settings → API Keys, create a key, and copy the secret —
it is shown once. Keys start with vf_, never expire, and can be locked to
specific IPs or CIDR ranges. Keep it out of source control:
vf = Visynx() # reads VISYNX_API_KEY
A plain predict() call spends 1 Vision Credit; segment=True and depth=True
each add a surcharge for the extra model they run. You are charged only after the
inference succeeds — a failed call is free — and a call retried after a 429 is
billed once, not twice.
Some endpoints are deliberately not reachable with an API key: batch prediction
over a whole dataset, live-camera inference, workflow runs, and the AI-labelling
tools (SAM/DINO/box-prompt). Those run from the VisionForge app with a signed-in
session. Calling them with a key returns PermissionDeniedError.
Errors
Every failure is a typed exception, and it quotes the response's X-Request-ID
when the server sent one — include it if you contact support. (Authentication
failures are rejected before that header is assigned, so 401s carry none.)
| Exception | Means | Do |
|---|---|---|
AuthenticationError |
key invalid or revoked | create a new key |
PermissionDeniedError |
email unverified, or the key's IP allowlist rejected you | verify your email / check the allowlist |
InsufficientCreditsError |
out of Vision Credits | top up |
ModelNotFoundError |
no such model, or not yours | check vf.models() |
PayloadTooLargeError |
image over 50 MB | resize before sending |
RateLimitError |
rate limited, retries exhausted | back off |
MaintenanceError |
platform in maintenance | retry later |
429s are retried automatically, honouring the server's Retry-After.
All of these subclass VisynxError, so one except VisynxError catches everything.
Self-hosting
Point the client at your own deployment:
vf = Visynx(api_key="vf_...", api_url="https://visionforge.internal/api")
or set VISYNX_API_URL.
License
MIT
Metadata
Release files for visynx 0.1.0
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 |
|---|---|---|---|---|
| visynx-0.1.0.tar.gz | 14.5 kB | With provenance | Details for visynx-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| visynx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for visynx-0.1.0-py3-none-any.whl |
Total release size: 28.5 kB
Release files / visynx-0.1.0.tar.gz
| Download URL | visynx-0.1.0.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bbfa4ff44d9d42b558de68567d0b26f38bd58b83af1c10e8e90c9c532146890
|
|
BLAKE2b-256 checksum How to use checksums |
1420b15f995ab1f6d2eefaf45ae279298e986751b01a466e5c1963ddbe4deede
|
| 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 Aug 2, 2026.
Transparency logRelease files / visynx-0.1.0-py3-none-any.whl
| Download URL | visynx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b64996db2998e06a7958699f8a2e834e5c564a47ddcff747f0e14e4b8a04b970
|
|
BLAKE2b-256 checksum How to use checksums |
5874b0939f451922dcc192f12183d572f397398eb67a51039ee5dfeb99f5b647
|
| 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 Aug 2, 2026.
Transparency logSecurity for visynx 0.1.0
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 visynx-0.1.0.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 Aug 2, 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.