SDK ReferenceTypeScript SDK

Account

Account info and API key management.

For AI agents: https://bytekit.com/llms.txt — every docs page is available as markdown by appending .md

Account

Account info and API key management. Accessed via client.account.

get

client.account.get(requestOptions?: RequestOptions): Promise<GetAccountResponse>

GET /v1/account — get the authenticated account.

requestOptions carries the CLIENT-side abort budget (requestTimeoutMs) and an optional caller signal; both override the constructor's timeoutMs default.

apiKeys

create

client.account.apiKeys.create(opts?: CreateApiKeyRequest, requestOptions?: RequestOptions): Promise<CreateApiKeyResponse>

POST /v1/account/api-keys — create a new API key.

opts is optional: the spec declares the request body itself as optional, so create() with no arguments is valid and sends no body.

list

client.account.apiKeys.list(requestOptions?: RequestOptions): Promise<ListApiKeysResponse>

GET /v1/account/api-keys — list all API keys for the account

get

client.account.apiKeys.get(id: ApiKeyId, requestOptions?: RequestOptions): Promise<GetApiKeyResponse>

GET /v1/account/api-keys/{id} — get an API key by ID

update

client.account.apiKeys.update(id: ApiKeyId, opts: UpdateApiKeyRequest, requestOptions?: RequestOptions): Promise<UpdateApiKeyResponse>

PATCH /v1/account/api-keys/{id} — update an API key

revoke

client.account.apiKeys.revoke(id: ApiKeyId, requestOptions?: RequestOptions): Promise<void>

DELETE /v1/account/api-keys/{id} — revoke an API key (idempotent).

Returns 204 No Content: operations['revokeApiKey']['responses'][204] declares content?: never, so there is no JSON arm to derive a payload from — hence Promise<void>.

client.request() short-circuits an empty body (204 or any empty response) to undefined before it would parse the body as JSON, so this method resolves cleanly on an empty 204 body.

reveal

client.account.apiKeys.reveal(id: ApiKeyId, requestOptions?: RequestOptions): Promise<RevealApiKeyResponse>

POST /v1/account/api-keys/{id}/reveal — reveal the plaintext API key value