Python SDK: Admin API
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| Method | Endpoint | Returns |
|---|---|---|
organization.retrieve | GET /v1/organizations/me | Organization |
workspaces.create | POST /v1/organizations/workspaces | Workspace |
members.list | GET /v1/organizations/users | SyncPage[Member] |
invites.create | POST /v1/organizations/invites | Invite |
api_keys.update | PATCH /v1/organizations/api_keys/{api_key_id} | ApiKey |
service_accounts.create | POST /v1/organizations/service_accounts | ServiceAccount |
usage_report.messages | GET /v1/organizations/usage_report/messages | UsageReport |
cost_report.retrieve | GET /v1/organizations/cost_report | CostReport |
analytics.summary | GET /v1/organizations/analytics/summary | AnalyticsSummary |
audit_events.list | GET /v1/organizations/audit_events | SyncPage[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.