Official Python SDK for the Relancify API.
Project description
Relancify SDK (Python)
Official Python SDK for the Relancify API.
Installation
pip install relancify-sdk
Quickstart
from relancify_sdk import RelancifyClient
client = RelancifyClient(
base_url="https://api.relancify.com/api/v1",
api_key="<your_api_key>",
)
agents = client.agents.list()
print(len(agents))
client.close()
Available resources
client.agentsclient.operationsclient.runtimeclient.usersclient.voicesclient.api_keysclient.billingclient.conversations
Notes
- The SDK uses synchronous
httpx. - HTTP errors are raised as
relancify_sdk.errors.ApiError. - Runtime websocket connections can use short-lived connect tokens via
client.runtime.create_connect_token(...). - Publish flow: create/update agent locally, call
client.agents.publish(agent_id), then pollclient.operations.get(operation_id). - Agent IDs use the public format
ag_<uuid>for all agent endpoints.
Billing reads
from relancify_sdk import RelancifyClient
client = RelancifyClient(api_key="<your_api_key>")
summary = client.billing.summary()
usage = client.billing.usage_ledger(page=1, page_size=20)
transactions = client.billing.credit_transactions(page=1, page_size=20)
client.close()
Returned fields are intentionally user-facing and minimal (plan/status, balances, period usage totals, and paginated simple history rows). Internal provider-cost details are not exposed in these tenant endpoints.
Runtime session
from relancify_sdk import RelancifyClient
agent_id = "ag_12345678-1234-1234-1234-123456789abc"
client = RelancifyClient(api_key="<your_api_key>")
session = client.agents.create_runtime_session(agent_id)
print(session["session_id"])
client.close()
Conversation audio
from relancify_sdk import RelancifyClient
client = RelancifyClient(api_key="<your_api_key>")
conversation_id = "8a922e4f-ede8-499f-a4ec-1a192f096dcf"
audio = client.conversations.get_audio(conversation_id)
filename = audio["filename"] or f"{conversation_id}.mp3"
file = open(filename, "wb")
file.write(audio["audio_bytes"])
file.close()
client.close()
Publish flow
from relancify_sdk import RelancifyClient
agent_id = "ag_12345678-1234-1234-1234-123456789abc"
client = RelancifyClient(api_key="<your_api_key>")
accepted = client.agents.publish(agent_id)
operation = client.operations.get(accepted["operation_id"])
print(operation["status"])
client.close()
Security best practices
- Never hardcode API keys or bearer tokens in source code.
- Use environment variables or a secure secret manager.
- Rotate credentials periodically.
- Prefer short-lived access tokens when possible.
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
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 relancify_sdk-0.4.4.tar.gz.
File metadata
- Download URL: relancify_sdk-0.4.4.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f022dc74cb00f331aa440a9be5a0088dcbfd6195c3b077c8c71a421f1fef67c
|
|
| MD5 |
d2e00ce217e6b78f329c7edb57f2bb60
|
|
| BLAKE2b-256 |
595c799e68bc54278952ca246c76dbac46f0a4d939504982bb131c28b29f5e0b
|
Provenance
The following attestation bundles were made for relancify_sdk-0.4.4.tar.gz:
Publisher:
publish-sdk-pypi.yml on NKSTUD/relancify-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relancify_sdk-0.4.4.tar.gz -
Subject digest:
2f022dc74cb00f331aa440a9be5a0088dcbfd6195c3b077c8c71a421f1fef67c - Sigstore transparency entry: 1091291192
- Sigstore integration time:
-
Permalink:
NKSTUD/relancify-sdk@44878b12d5d7f17f1d031775e089ed9f9f26a200 -
Branch / Tag:
refs/tags/sdk-v0.4.4 - Owner: https://github.com/NKSTUD
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk-pypi.yml@44878b12d5d7f17f1d031775e089ed9f9f26a200 -
Trigger Event:
push
-
Statement type:
File details
Details for the file relancify_sdk-0.4.4-py3-none-any.whl.
File metadata
- Download URL: relancify_sdk-0.4.4-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c8f7ffc73c674169e46a885fe0a4ae208573a8e5013bf76505d67586a8d1238
|
|
| MD5 |
f259008b45e08e7c46eed7d66d056eb6
|
|
| BLAKE2b-256 |
0513ba9388200ac9e55851b75e50fdf74e50c887aff056864e59978aa4e04ebc
|
Provenance
The following attestation bundles were made for relancify_sdk-0.4.4-py3-none-any.whl:
Publisher:
publish-sdk-pypi.yml on NKSTUD/relancify-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relancify_sdk-0.4.4-py3-none-any.whl -
Subject digest:
0c8f7ffc73c674169e46a885fe0a4ae208573a8e5013bf76505d67586a8d1238 - Sigstore transparency entry: 1091291201
- Sigstore integration time:
-
Permalink:
NKSTUD/relancify-sdk@44878b12d5d7f17f1d031775e089ed9f9f26a200 -
Branch / Tag:
refs/tags/sdk-v0.4.4 - Owner: https://github.com/NKSTUD
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk-pypi.yml@44878b12d5d7f17f1d031775e089ed9f9f26a200 -
Trigger Event:
push
-
Statement type: