Skip to main content

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.agents
  • client.operations
  • client.runtime
  • client.users
  • client.voices
  • client.api_keys
  • client.billing

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 poll client.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()

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

relancify_sdk-0.4.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

relancify_sdk-0.4.3-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file relancify_sdk-0.4.3.tar.gz.

File metadata

  • Download URL: relancify_sdk-0.4.3.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for relancify_sdk-0.4.3.tar.gz
Algorithm Hash digest
SHA256 55bfc7f93dfc398eecf73a829d10511d246c48e00f931ea69078a16afbe6c533
MD5 8f30d760d89b5125e53f2b1028c45d22
BLAKE2b-256 946af79aa52c81428ed6412f0a9a659909e9f9877ca73f701532fba95f88c0c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for relancify_sdk-0.4.3.tar.gz:

Publisher: publish-sdk-pypi.yml on NKSTUD/relancify-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file relancify_sdk-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: relancify_sdk-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for relancify_sdk-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f858464683e9822bb7b7e12a138a1bd7e40e292af3286ee5de754d9f410cf4aa
MD5 7e16553d77f288d5b2936aa2ace1bc4d
BLAKE2b-256 7cc091fe98d25d3b9aab2c979aad4ab55b16113fe7b8d3edabfec278d0f0b448

See more details on using hashes here.

Provenance

The following attestation bundles were made for relancify_sdk-0.4.3-py3-none-any.whl:

Publisher: publish-sdk-pypi.yml on NKSTUD/relancify-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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