Passer à la navigation

Get Account

Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check limits and remaining credits, and after a 402, 403 or 429 to decide how to recover; billingModel says what to do. Send people to billingUrl for anything that needs a payment.

Authentification

x-api-keystring
Authentification par clé API via en-tête

En-têtes

x-sync-organization-idstringOptionnel
Organization ID from List Organizations. Omit to use the credential's default organization.

Réponse

Account, organization, plan, limits and balance
accountobject or null

The user this credential acts for: the signed-in user for sessions and OAuth tokens, or the API key owner. Null for an API key that has no owner.

organizationobject
The organization selected for this request, or the credential's default organization.
organizationslist of objects
Organizations these credentials can access, current one first.
credentialTypeenum

api_key: an x-api-key header. oauth: an access token issued to a connected app such as an MCP client. session: a Studio sign-in.

Valeurs autorisées:
planobject
Current plan.
billingModelenum

How generations are paid for, and so how to recover from a 402. credits: prepaid; top up, turn on auto top-up or upgrade at billingUrl. usage: metered and invoiced; pay the open invoice or update the payment method at billingUrl. free: monthly free allowance; upgrade at billingUrl. enterprise: contact your sync. account team.

Valeurs autorisées:
limitsobject
Current plan limits, including organization overrides.
activeJobsobject
Jobs pending or processing right now. May be up to a few seconds stale.
creditsobject or null

Prepaid credit balance when billingModel is credits; null otherwise.

billingPeriodobject
Current billing period. Without a subscription this is the calendar month.
freeAllowanceobject or null

Free monthly allowance when billingModel is free; null otherwise.

billingUrlstring

Studio billing page where a person can change plan, pay, top up or update the payment method. It needs a signed-in browser.

featureslist of strings
API features currently available to these credentials. New names may be added.

Erreurs

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error