Saltar a la navegación

Get Account

Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check plan limits and remaining credits or free allowance, and after a 402, 403 or 429 to decide how to recover: billingModel says whether to top up credits (credits), pay or update the payment method (usage), upgrade (free) or contact sync. (enterprise). Send people to billingUrl for anything that needs a payment.

Autenticación

x-api-keystring
Autenticación con clave API vía encabezado

Respuesta

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 every request with this credential acts in.
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.

Valores permitidos:
planobject
Current plan.
billingModelenum

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

Valores permitidos:
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.

Errores

401
Unauthorized Error
500
Internal Server Error