Skip to main content

Account and organization

Get information about your user account, organization, and subscription details.

User information​

Retrieve information about the currently authenticated user:

curl -X POST https://uthana.com/graphql \
  -u $API_KEY: \
  -H "Content-Type: application/json" \
  -d '{
    "query": "{ user { id email email_verified name roles tz tos_accepted survey_completed } }"
  }'

Organization information​

Get information about your organization, including download allowances and character limits:

curl -X POST https://uthana.com/graphql \
  -u $API_KEY: \
  -H "Content-Type: application/json" \
  -d '{
    "query": "{ org { id name motion_download_secs_per_month motion_download_secs_per_month_remaining characters_allowed characters_allowed_remaining users { id name email } } }"
  }'

Subscription information​

Subscription and billing details are managed through the Uthana web interface. For API access to plan limits and usage, see the Pricing and Rate limits pages.

Tracking usage via API​

You can query your organization's usage and limits through the API to monitor your balance and set up alerts when approaching limits.

Motion seconds (download allowance)

The org query returns motion download usage directly:

  • motion_download_secs_per_month — Total seconds of motion downloads allocated to your organization per month
  • motion_download_secs_per_month_remaining — Seconds remaining for the current month

motion_download_secs_per_month_remaining updates as you download motions. Use it to check how much of your monthly allowance is left before hitting limits.

Characters (rigs)

The org query returns character usage for the current month:

  • characters_allowed — Maximum number of characters your organization can create, upload, and/or rig per month (the limit)
  • characters_allowed_remaining — Character creation slots remaining for the current month

characters_allowed_remaining updates as you create (upload, generate, or rig) characters. Use it to check how many character creation slots you have left before hitting limits.

Example query for usage monitoring:

curl -X POST https://uthana.com/graphql \
  -u $API_KEY: \
  -H "Content-Type: application/json" \
  -d '{
    "query": "{ org { id name motion_download_secs_per_month motion_download_secs_per_month_remaining characters_allowed characters_allowed_remaining } }"
  }'

Every organization has an affiliate_code. Share https://uthana.com/r/<code>. The link and the code are case-insensitive. When someone signs up through that link, or enters the code on their account page, pay-as-you-go purchases they make in their first 6 months grant this organization 30% of the purchase amount as Uthana credits.

user.referred_by_code is the code saved on the logged-in user, or null. set_referral_code(code:) saves a code once, while that user is still inside the 6-month window.

Next steps​

PAYG billing history​

Read the authenticated organization's recorded transactions with payg_ledger. Results are newest first, ordered by creation time and ID. The default limit is 50 and the maximum is 500. Pass the last row's ID as before_id for the next page; a cursor from another organization is refused. since is inclusive, until exclusive, and types filters entry kinds (debit, topup, credit_grant, adjustment). Timestamps use UTC.

query BillingHistory($before: ID, $since: DateTime, $until: DateTime) {
  payg_ledger(limit: 50, before_id: $before, since: $since, until: $until) {
    id created type total_usd balance_before balance_after
    job_id task_id model model_version billing_unit quantity unit_price ref status
  }
}

USD amounts are decimal strings and these rows are recorded transactions, not estimates. On a generation debit, job_id contains the charged asset ID despite its name; task_id contains the processing job ID. ref identifies its kind, such as motion:<id> or character:<id>. Monthly subscription allowances remain separate from PAYG history. Python client 0.8.2 adds client.org.get_ledger(...) and its synchronous variant for this query.