Skip to main content
Use API key authentication for these operations. A signed-in integration can also use Firebase authentication to create its first API key.

Read the current account

getUserByPrivateId returns the account identified by the request credential. Call it without arguments and select only the fields your application needs.
CurrentAccount
creditBalances groups balances by common and ultraS. A balance in one category does not imply that it can pay for every generation. maxTaskCount is the account’s concurrency limit; -1 means unlimited. Review credits and billing before paid work.

Create an API key

CreateApiKey
Variables
For a Date input, use a timestamp with an explicit UTC suffix, such as 2027-01-01T00:00:00Z. Returned Date values use yyyy-MM-dd HH:mm:ss and represent UTC even though the output string has no timezone suffix. The complete secret appears in plaintextKey only in the creation response. Store it securely immediately. Listings contain metadata rather than the secret. Every authenticated account can create and manage its own API keys without separate access approval. The account can have at most 10 active keys, including during concurrent creation. Active means not revoked and either without an expiration or with an expiration in the future. Expired and revoked keys do not count toward this limit. Handle a rejected creation rather than automatically creating more keys.
Use the new key as a Bearer credential for /graphql. API key calls do not require a Firebase ID token. Firebase login remains available for signed-in integrations, including initial key creation.

List key metadata

ListApiKeys
maskedKey is formatted by the server, for example apob_Ab12Cd34••••••••Wxyz. Use it directly in key tables; it is a display value and cannot authenticate requests. The existing prefix and last4 fields remain available. Provide a copy button for the complete key in the creation dialog only; the complete key cannot be retrieved again after that response is lost. The list includes active, expired, and revoked keys, ordered by creation time descending. Hide rows with revokedAt set when building a table of unrevoked keys, and use expiresAt to mark expired keys. lastUsedAt can be null for a key that has never been used; usage updates are asynchronous and may lag.

Update a key

UpdateApiKey
Variables
Only the owning account can update a key. Currently, name is the only editable parameter; id identifies the key to update. Its secret, expiration, and revocation state are preserved. Names are trimmed and must not be blank. Updating a revoked or expired key does not reactivate it.

Revoke a key

RevokeApiKey
Variables
Only the owning account can revoke the key. Revoking an already revoked owned key is a no-op. If a creation response is lost, inspect key metadata and revoke the unwanted key before creating a replacement; the plaintext cannot be read back from the listing. API-key management errors include 110105 when the key does not exist or belongs to another account, 110106 when the active-key limit is reached, and 110108 for a blank name.