Python SDK: Admin API

⚠️
Preview — this feature is being built; the design below is the spec.

Organization management with an Admin key. Use the separate SynticAdmin client, which reads SYNTIC_ADMIN_KEY and sets the admin beta flag.

from syntic import SynticAdmin
 
admin = SynticAdmin()  # reads SYNTIC_ADMIN_KEY
MethodEndpointReturns
organization.retrieveGET /v1/organizations/meOrganization
workspaces.createPOST /v1/organizations/workspacesWorkspace
members.listGET /v1/organizations/usersSyncPage[Member]
invites.createPOST /v1/organizations/invitesInvite
api_keys.updatePATCH /v1/organizations/api_keys/{api_key_id}ApiKey
service_accounts.createPOST /v1/organizations/service_accountsServiceAccount
usage_report.messagesGET /v1/organizations/usage_report/messagesUsageReport
cost_report.retrieveGET /v1/organizations/cost_reportCostReport
analytics.summaryGET /v1/organizations/analytics/summaryAnalyticsSummary
audit_events.listGET /v1/organizations/audit_eventsSyncPage[AuditEvent]

Methods

organization.retrieve

Organization info and real plan name. Maps to GET /v1/organizations/me.

result = admin.organization.retrieve()

workspaces.create

Create a workspace. Maps to POST /v1/organizations/workspaces.

result = admin.workspaces.create(name="support-prod")

members.list

List members; auto-paginates. Maps to GET /v1/organizations/users.

for item in admin.members.list(role="developer"):
    print(item.id if hasattr(item, 'id') else item)

invites.create

Invite by email. Maps to POST /v1/organizations/invites.

result = admin.invites.create(email="new.hire@example.com", role="developer")

api_keys.update

Rename or disable a key. Maps to PATCH /v1/organizations/api_keys/{api_key_id}.

result = admin.api_keys.update('apikey_01JA0B2D4F6H8K0M2P4R', status="inactive")

service_accounts.create

Create a service account. Maps to POST /v1/organizations/service_accounts.

result = admin.service_accounts.create(
    name="ci-billing",
    workspace_id="wrkspc_01JC0A2C4E6G8J0L2N4Q",
    permissions=["inference"],
)

usage_report.messages

Token usage in buckets, grouped as you choose. Maps to GET /v1/organizations/usage_report/messages.

result = admin.usage_report.messages(
    starting_at="2026-11-01T00:00:00Z",
    bucket_width="1d",
    group_by=["model"],
)

cost_report.retrieve

Spend by day and workspace. Maps to GET /v1/organizations/cost_report.

result = admin.cost_report.retrieve(starting_at="2026-11-01T00:00:00Z")

analytics.summary

Headline numbers for a period. Maps to GET /v1/organizations/analytics/summary.

result = admin.analytics.summary(starting_at="2026-10-01T00:00:00Z")

audit_events.list

Audit feed, cursor-paginated. Maps to GET /v1/organizations/audit_events.

for item in admin.audit_events.list(action="api_key.*"):
    print(item.id if hasattr(item, 'id') else item)

Conventions

Every method accepts extra_headers, extra_query, extra_body and timeout keyword arguments, and has an async twin on AsyncSyntic. List methods return pages that iterate across all pages automatically.

See the Python SDK overview for installation, errors and retries.

Was this page helpful?