Zero-dependency Python SDK for the Visage B2B API — verify AI likeness licenses, log usage events, and manage deals.
Project description
Visage Python SDK
Zero-dependency Python SDK for the Visage B2B API. Verify AI likeness licenses, log usage events, and manage deals.
Installation
pip install visage-sdk
Quick Start
from visage import Visage
client = Visage(api_key="vsg_live_xxxxxxxxxxxxxxxx")
# Verify a license before generation
result = client.verify_license("VSG-A1B2-C3D4-E5F6")
print(result.status) # "ACTIVE"
print(result.model_sku) # "VSG-MDL-ALEX-042"
print(result.rights_summary.media_types) # ["digital", "social"]
# Log a usage event after generation
event = client.log_usage(
license_key="VSG-A1B2-C3D4-E5F6",
platform_id="your-platform",
event_type="generation",
units=1,
metadata={"campaign": "Summer 2026"}
)
print(event.id) # event UUID
# List models
models = client.list_models(limit=10)
print(f"{models.total} models available")
# Get model by SKU
model = client.get_model_by_sku("VSG-MDL-ALEX-042")
print(model.display_name)
# List active licenses
licenses = client.list_licenses(status="active")
# List completed deals
deals = client.list_deals(status="completed", limit=50)
Error Handling
from visage import Visage, VisageAuthError, VisageLicenseNotFoundError, VisageAPIError
client = Visage(api_key="vsg_live_xxx")
try:
result = client.verify_license("VSG-INVALID-KEY")
except VisageAuthError as e:
print(f"Bad API key: {e}") # 401
except VisageLicenseNotFoundError as e:
print(f"Not found: {e}") # 404
except VisageAPIError as e:
print(f"API error {e.status_code}: {e}")
Requirements
Python 3.10+. Zero dependencies — uses only the standard library.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
visage_sdk-1.0.0.tar.gz
(3.9 kB
view details)
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 visage_sdk-1.0.0.tar.gz.
File metadata
- Download URL: visage_sdk-1.0.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c869fd7282f12a4260faf22301fd5afc197304cb595e3bc4cdf9b3aac31eacbd
|
|
| MD5 |
80974c7500920363263776e99e5debd0
|
|
| BLAKE2b-256 |
14c6c07a4600b08c6a8b976a50c2e539ed61831821c928f2e8c69ae12ee262fc
|
File details
Details for the file visage_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: visage_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c23d823d7fe15d503526afcec04016929915a1f519a0f3af968863e0a85e4569
|
|
| MD5 |
50ba5e93d0dca80dbcddfe7e7a276036
|
|
| BLAKE2b-256 |
d332b9a1988aa314dfbcd32c83759b1ff1589a9b7061c1148505e3daa939a6fb
|