Official Python SDK for the Protoface API.
Project description
protoface-sdk
Official Python SDK for the Protoface API.
Install protoface-sdk and import protoface_sdk.
Installation
pip install protoface-sdk
Or with uv:
uv add protoface-sdk
Requires Python 3.10+ and a Protoface API key.
Quickstart
import os
from protoface_sdk import ProtofaceClient
with ProtofaceClient(api_key=os.environ["PROTOFACE_API_KEY"]) as client:
status = client.get_status()
avatars = client.avatars.list(limit=10)
print(status.status.value)
print([avatar.id for avatar in avatars.data])
Resources
client.sessions.create(session_request, idempotency_key=...)
client.sessions.create_livekit(avatar_id=..., url=..., room_name=..., worker_token=...)
client.sessions.get(session_id)
client.sessions.list(status=["running"], avatar_id=..., limit=...) # -> Page[Session]
client.sessions.end(session_id)
client.avatars.list(scope="platform", q="stock", limit=...) # -> Page[Avatar]
client.avatars.get(avatar_id)
client.avatars.create(image=..., name=...) # multipart upload
client.avatars.delete(avatar_id)
client.pipecat.sessions.create(avatar_id=...) # Pipecat relay bootstrap
client.usage.summary(period="current_month") # or period_start/period_end
client.list_billing_plans()
client.get_status()
Page objects expose .data, .has_more, and .next_cursor. Pass
.next_cursor back as starting_after to fetch the next page.
LiveKit sessions
client.sessions.create_livekit(...) starts the backend worker for a
customer-owned LiveKit room. Your application still owns the room and mints a
short-lived worker token with its own LiveKit API key and secret.
session = client.sessions.create_livekit(
avatar_id="av_stock_001",
url=livekit_url,
room_name="demo-room",
worker_token=worker_token,
)
session = session.wait_until_running(timeout=10)
print(session.id, session.status)
For framework-level realtime integrations, use the dedicated packages:
livekit-plugins-protofacefor LiveKit Agents.pipecat-protofacefor Pipecat.
Errors
Every non-2xx response raises a typed ProtofaceError subclass
(AuthenticationError, RateLimitError, QuotaExceededError, etc.). Switch on
the stable error.code, never on error.message:
from protoface_sdk import ProtofaceError, QuotaExceededError, RateLimitError
try:
client.sessions.create(session_request)
except RateLimitError as err:
print("rate limited:", err.code, err.retry_after_seconds)
except QuotaExceededError as err:
print("quota:", err.code)
except ProtofaceError as err:
print(err.code, err.request_id, err.status)
The client retries 429, 503, and transient network failures for safe
requests, and for writes that include an Idempotency-Key.
License
Apache-2.0 - see LICENSE.
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
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 protoface_sdk-0.1.0.tar.gz.
File metadata
- Download URL: protoface_sdk-0.1.0.tar.gz
- Upload date:
- Size: 30.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9bad5c781bcc9956f1010b1d74ef359c17780c4df4d44398f509ed098b87c90
|
|
| MD5 |
a507cb3c88a5a1804290df65ae3ceda1
|
|
| BLAKE2b-256 |
4210500045972bbebda0bae19e68fa8ae189da40bfd9391666fca9a4e756dbe0
|
Provenance
The following attestation bundles were made for protoface_sdk-0.1.0.tar.gz:
Publisher:
release.yml on protoface-ai/protoface-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
protoface_sdk-0.1.0.tar.gz -
Subject digest:
c9bad5c781bcc9956f1010b1d74ef359c17780c4df4d44398f509ed098b87c90 - Sigstore transparency entry: 2017129211
- Sigstore integration time:
-
Permalink:
protoface-ai/protoface-sdk-python@1032a96cb8d0b909fb0c644c75d4cfb43f3e81c2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/protoface-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1032a96cb8d0b909fb0c644c75d4cfb43f3e81c2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file protoface_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: protoface_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af3bc01bb9b2e6516c2ea763e4d367751556562edc96a96d82eb16ced6e25d72
|
|
| MD5 |
30822845e15d8954b68e8ae0a1426ead
|
|
| BLAKE2b-256 |
1036501c1b6e10d27a74dc134a10c9d72cdb82858d42e8465cce6a6921fb0ddb
|
Provenance
The following attestation bundles were made for protoface_sdk-0.1.0-py3-none-any.whl:
Publisher:
release.yml on protoface-ai/protoface-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
protoface_sdk-0.1.0-py3-none-any.whl -
Subject digest:
af3bc01bb9b2e6516c2ea763e4d367751556562edc96a96d82eb16ced6e25d72 - Sigstore transparency entry: 2017129434
- Sigstore integration time:
-
Permalink:
protoface-ai/protoface-sdk-python@1032a96cb8d0b909fb0c644c75d4cfb43f3e81c2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/protoface-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1032a96cb8d0b909fb0c644c75d4cfb43f3e81c2 -
Trigger Event:
release
-
Statement type: