Skip to main content
These methods are read-mostly account helpers. They use the same YoukaClient authentication and per-request options as project and export calls.

client.account.get(options?)

Fetch the account identity for the active API key.
Use this to validate a key at startup or show which account an automation is using.

client.credits.overview(options?)

Fetch available balance, renewal dates, top-ups, and subscription renewal metadata.

client.billing.getCatalog(options?)

Fetch subscription and top-up pricing for the authenticated account.
The catalog also reports top-up eligibility and whether the account already has an active subscription. planQuantities lists every owned subscription quantity together with its provider; check enabled because maxed-out subscriptions remain in the list. planQuantity identifies the automatic target when the default provider or a sole eligible alternative can be increased. When no automatic target exists, its nullable fields distinguish a sole disabled owner from an unresolved owner. For eligible accounts, subscription.monthly.priceExperiment identifies the active price experiment, assigned variant, and effective unit price in cents. The field can be null or omitted when no experiment applies.

client.billing.createCheckout(body, options?)

Create a checkout URL with the currently configured default payment provider.
For top-ups, pass productType: "topup" and a positive quantity; the account must have an active subscription. The SDK defaults platform to "sdk" unless you override it. The response includes provider, Youka’s checkoutId, and the provider’s sessionId.

client.billing.getManageUrl(input?, options?)

Create a billing portal URL.
When a manageable account is resolved, the provider portal URL is short-lived and should be opened by the user who owns the account. With multiple manageable providers, the API selects the most recently updated account. If no manageable account is available or resolution fails, the method returns the Youka pricing URL instead.

What’s next

  • Projects - quote and create projects
  • Exports - quote and render exports
  • Errors - handle authentication and billing errors