SDK ReferencePython SDK
Account
API functions for the Account resource.
Account
Functions for interacting with the account API resource. Each operation ships in four forms — sync / sync_detailed and their async counterparts.
Create API Key
Create API key
Returns the plaintext key exactly once. Max 50 active keys per account.
Parameters
body (CreateApiKeyBody | Unset)
Call styles
sync_detailed(client=client, body=body) -> Response[ApiKeyCreatedResponse | Error]
sync(client=client, body=body) -> ApiKeyCreatedResponse | Error | None
await asyncio_detailed(client=client, body=body) -> Response[ApiKeyCreatedResponse | Error]
await asyncio(client=client, body=body) -> ApiKeyCreatedResponse | Error | NoneGet Account
Get account details
Returns account, plan, and current API key details, including the api_key and subscription
fields.
Call styles
sync_detailed(client=client) -> Response[GetAccountResponse200]
sync(client=client) -> GetAccountResponse200 | None
await asyncio_detailed(client=client) -> Response[GetAccountResponse200]
await asyncio(client=client) -> GetAccountResponse200 | NoneGet API Key
Get API key
Parameters
id (str)
Call styles
sync_detailed(id=id, client=client) -> Response[ApiKeyResponse | Error]
sync(id=id, client=client) -> ApiKeyResponse | Error | None
await asyncio_detailed(id=id, client=client) -> Response[ApiKeyResponse | Error]
await asyncio(id=id, client=client) -> ApiKeyResponse | Error | NoneList API Keys
List API keys
Parameters
include_revoked (bool | Unset): Default: False.
Call styles
sync_detailed(client=client, include_revoked=include_revoked) -> Response[ListApiKeysResponse200]
sync(client=client, include_revoked=include_revoked) -> ListApiKeysResponse200 | None
await asyncio_detailed(client=client, include_revoked=include_revoked) -> Response[ListApiKeysResponse200]
await asyncio(client=client, include_revoked=include_revoked) -> ListApiKeysResponse200 | NoneReveal API Key
Reveal API key
Decrypts and returns the plaintext API key. Only available when reveal_available is true.
Parameters
id (str)
Call styles
sync_detailed(id=id, client=client) -> Response[ApiKeyRevealResponse | Error]
sync(id=id, client=client) -> ApiKeyRevealResponse | Error | None
await asyncio_detailed(id=id, client=client) -> Response[ApiKeyRevealResponse | Error]
await asyncio(id=id, client=client) -> ApiKeyRevealResponse | Error | NoneRevoke API Key
Revoke API key
Idempotent — returns 204 even if already revoked.
Parameters
id (str)
Call styles
sync_detailed(id=id, client=client) -> Response[Any | Error]
sync(id=id, client=client) -> Any | Error | None
await asyncio_detailed(id=id, client=client) -> Response[Any | Error]
await asyncio(id=id, client=client) -> Any | Error | NoneUpdate API Key
Rename API key
Parameters
id (str)body (UpdateApiKeyBody)
Call styles
sync_detailed(id=id, client=client, body=body) -> Response[ApiKeyResponse | Error]
sync(id=id, client=client, body=body) -> ApiKeyResponse | Error | None
await asyncio_detailed(id=id, client=client, body=body) -> Response[ApiKeyResponse | Error]
await asyncio(id=id, client=client, body=body) -> ApiKeyResponse | Error | None