Skip to main content

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


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.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

visage_sdk-1.0.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file visage_sdk-1.0.1.tar.gz.

File metadata

  • Download URL: visage_sdk-1.0.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for visage_sdk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 df52661d5a5b1faf9982a47e36a9ad8a9892f3de1fb1d834e41cd8f7e1ab6860
MD5 af9901ad49fe3c415807ac79c45e33ac
BLAKE2b-256 32401c032c55cd1646af7b569059ddbbccd609c046229f18a4cd3ab795a93e88

See more details on using hashes here.

File details

Details for the file visage_sdk-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: visage_sdk-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for visage_sdk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5b1e349c39c925f6e066c00b4b6598895a0e0f224f576aba4290ad6c297465d
MD5 6ee05d317f8aad2f980d42b03bb246a8
BLAKE2b-256 cb97aeb692a48f94be88341fac4fdd3ed6626b7680abf51a7030a34898acb523

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page