Account & control plane
Python SDK reference for identity, usage, API keys, teams, billing, devices, audit logs, execution policy, and the platform contract — every AlgentaClient method and endpoint.
These AlgentaClient methods manage who you are and how your organization is governed: identity and usage, API keys, team members, billing and metering, devices, audit logs, execution policy, and the machine-readable platform contract. Each is a faithful client over the /v1 HTTP contract; the async client AsyncAlgentaClient exposes the same names to await.
import os
from decision_engine import AlgentaClient
client = AlgentaClient(
api_key=os.environ["ALGENTA_API_KEY"],
base_url="https://api.algenta.ai", # or http://localhost:8000 self-hosted
)Identity and usage
me()
GET /v1/me
MeResult
update_me(*, name=None, org_name=None)
PATCH /v1/me
Any
usage()
GET /v1/usage
UsageInfo
limits()
GET /v1/limits
dict
distributions()
GET /v1/distributions
DistributionListResult
templates()
GET /v1/templates
TemplateListResult
health()
GET /v1/health
dict
version()
GET /v1/version
dict
mereturns your user and organization (me.user,me.org);update_merenames your user (name) or organization (org_name).usagereports the currentbilling_period,simulations_run,api_calls, andquota_used_pct;limitsreturns the raw quota ceilings.healthandversionare unauthenticated liveness and build endpoints.
API keys
list_api_keys()
GET /v1/api-keys
list[APIKeyInfo]
create_api_key(label=None, *, name=None, expires_at=None, device_limit=None)
POST /v1/api-keys
dict
revoke_api_key(key_id)
DELETE /v1/api-keys/{key_id}
dict
create_api_keyreturns the new key's full secret exactly once — store it immediately.device_limitcaps how many devices may bind to the key;expires_ataccepts adatetimeor ISO-8601 string.list_api_keysreturns metadata only (id,label,key_prefix,status), never the secret.
Team members
list_team_members(*, page=None, limit=None)
GET /v1/team
TeamListResult
invite_team_member(*, email, role="member")
POST /v1/team/invite
TeamInviteResult
update_team_member_role(user_id, *, role)
PATCH /v1/team/{user_id}/role
TeamRoleUpdateResult
remove_team_member(user_id)
DELETE /v1/team/{user_id}
TeamRemoveResult
Billing, credits and metering
get_billing_info()
GET /v1/billing/info
BillingInfoResult
create_billing_checkout(*, plan=None)
POST /v1/billing/checkout
BillingSessionResult
create_billing_portal()
POST /v1/billing/portal
BillingSessionResult
refresh_credits(*, device_id, billing_period, credits_used=0)
POST /v1/credits/refresh
CreditRefreshResult
ingest_metering_events(*, device_id, events)
POST /v1/metering
MeteringBatchResult
create_billing_checkoutandcreate_billing_portalreturn a hosted session you redirect the user to.refresh_creditsandingest_metering_eventsare generic managed-runtime compatibility methods. Self-hosted Algenta does not call them for billing or enforcement; decisions are unlimited and audit records remain local.
Devices
list_devices(*, page=None, limit=None)
GET /v1/device/list
DeviceListResult
revoke_device(registration_id)
DELETE /v1/device/{registration_id}
DeviceRevokeResult
Audit logs and execution policy
get_audit_logs(*, page=1, limit=25, actor_email=None, action=None, resource_type=None, result=None, policy_snapshot_id=None, schema_snapshot_id=None, manifest_version=None, request_hash=None)
GET /v1/audit-logs
AuditLogResult
get_audit_log_artifacts(*, page=1, limit=25, actor_email=None, action=None, resource_type=None, result=None, policy_snapshot_id=None, schema_snapshot_id=None, manifest_version=None, request_hash=None, content_hash=None)
GET /v1/audit-logs/artifacts
Any
get_execution_policy()
GET /v1/execution/policy
ExecutionPolicyResult
list_execution_policy_snapshots()
GET /v1/execution/policy/snapshots
ExecutionPolicySnapshotListResult
update_execution_policy(*, min_confidence=None, risk_floor=None, require_calibration=None, allow_reexecution=None)
PATCH /v1/execution/policy
ExecutionPolicyResult
Audit queries filter on provenance (
policy_snapshot_id,schema_snapshot_id,manifest_version,request_hash) so you can reconstruct exactly what governed any action;get_audit_log_artifactsadditionally filters bycontent_hash.update_execution_policytunes the gate that decides whether a recommendation may auto-execute:min_confidence,risk_floor,require_calibration, andallow_reexecution. Only the fields you pass are changed.
Platform contract and runtime
get_contract()
GET /v1/meta/contract
PlatformContractResult
get_runtime_manifest()
GET /v1/runtime/manifest
RuntimeManifestResult
get_runtime_modules()
GET /v1/admin/runtime/modules
RuntimeAdminModulesResult
get_runtime_benchmarks()
GET /v1/admin/runtime/benchmarks
RuntimeAdminBenchmarksResult
get_runtime_release_validation()
GET /v1/admin/runtime/validation
RuntimeReleaseValidationResult
get_contractis the machine-readable description of everything this instance supports — endpoint families, SDK/CLI/MCP method names, and governed-filter rules. It is what the SDKs bootstrap from.get_runtime_manifestreports the signed engine build serving requests; theadmin/runtime/*methods surface module inventory, benchmarks, and release validation for the running engine.
Example: who am I, and how much have I used
Expected output resembles:
Example: tighten the execution policy
Related references
Agent runsAPI overviewUsage & limitsLast updated
Was this helpful?