Skip to content
Docs menu

admin

Who uses the hub, for the hub's own operators. Only a hub admin signed in to the web app may call these. An API key is 403. Anyone else is 404.

2 operations · 11 schemas

GET /v1/admin/users

Everyone with an account on this hub

listAdminUsers · scope session

The people with an account on this hub, for its operators. Only a hub admin signed in to the web app may call it. A hub admin is a person the deployment names by id, or an owner of an organization it names by id. Handles and slugs never count, since a freed name can be taken by anyone. An API key of any scope is 403. Anyone else, signed in or not, is 404.

Each call is recorded in the audit log as admin.users.view.

email and sign_in_methods come from the sign-in provider, Clerk. They are read in one batched call per page and cached for five minutes. When Clerk is not configured or does not answer, clerk says so and sign_in_methods is null. email then falls back to the copy the sign-in token carried, if any (email_source: hub).

Counts and spend_month_usd cover each person's own account. Work owned by an organization counts toward the organization. spend_month_usd is what the calendar month (UTC) recorded: Lucen cloud jobs, the agent, and Coach and planner calls.

last_active_at is the person's last authenticated request, stamped at most every five minutes. Keys the hub minted for a robot, a hosted job or an agent turn do not count.

Parameters

listAdminUsers parameters
NameInTypeDescription
qquerystring

length 1–100

Matches the handle, the display name and the e-mail address, ignoring case. With Clerk configured, Clerk's own user search is asked too. So an address only Clerk holds still matches.

sortqueryAdminUserSort

created: newest sign-up first. last_active: most recently active first, people never seen last. spend: the month's highest spend first.

methodquerystring

pattern ^[a-z0-9_]{1,32}$

Only people who can sign in this way, as sign_in_methods names it. This needs Clerk. When Clerk is unavailable the page is empty and clerk says why.

limitqueryinteger

default 20 · ≥ 1 · ≤ 100

Page size.

cursorquerystring

length ≤ 512

Opaque cursor from the previous page's next_cursor.

Responses

listAdminUsers responses
StatusDescriptionBody
200

A page of people.

AdminUserPage
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

GET /v1/admin/stats

How many people use the hub, and what they made

getAdminStats · scope session

The hub in numbers, for its operators: people, sign-ups per day for 30 days, what exists, and this month's spend. Access is the same as listAdminUsers. Every number is one SQL aggregate over the hub's own tables, and nothing is read from Clerk.

Days are whole days in UTC. A 7-day window is today and the six days before it. "Active" means at least one authenticated request in the window, as AdminUser.last_active_at records it.

Responses

getAdminStats responses
StatusDescriptionBody
200

The hub's numbers.

AdminStats
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json

Schemas (11)

The schemas these operations reach before any other tag’s do. A type that links elsewhere is rendered on that tag’s page.

AdminUserSort

string

one of created · last_active · spend

default "created"

AdminUserPage

object

AdminUserPage fields
FieldTypeDescription
itemsrequiredarray of AdminUser
next_cursorrequiredstring | null
totalrequiredinteger

≥ 0

People matching q and method, across every page.

clerkrequiredAdminClerkStatus

AdminStats

object

AdminStats fields
FieldTypeDescription
generated_atrequiredstring (date-time)
usersrequiredAdminUserStats
signups_per_dayrequiredarray of AdminSignupDay

Thirty days, oldest first, today last. A day with no sign-ups is a zero.

totalsrequiredAdminHubTotals
spend_monthrequiredAdminSpendMonth

AdminUser

object

AdminUser fields
FieldTypeDescription
idrequiredId
handlerequiredSlug
display_namerequiredstring | null
avatar_urlrequiredstring | null
created_atrequiredstring (date-time)

When the hub first saw the person, at their first sign-in.

last_active_atrequiredstring (date-time) | null (date-time)

The last authenticated request, stamped at most every five minutes. Null when the hub has never recorded one.

orgsrequiredarray of AdminUserOrg
countsrequiredAdminUserCounts
spend_month_usdrequirednumber

What the person's own account recorded this calendar month (UTC): Lucen cloud jobs, the agent, and Coach and planner calls.

emailrequiredstring | null

The primary e-mail address.

email_sourcerequiredstring | null

one of clerk · hub

clerk when Clerk answered for this person. hub when it did not and the address is the copy the sign-in token carried.

sign_in_methodsrequiredarray of string | null

How the person can sign in, from Clerk: an OAuth provider (google, github, ...), email (an address confirmed by code or link), password, passkey, phone, sso or wallet. Null when Clerk did not say.

clerk_user_idrequiredstring | null
clerk_dashboard_urlrequiredstring (uri) | null (uri)

The person's page in the Clerk dashboard.

clerk_statusrequiredstring

one of ok · missing · not_linked · unavailable

ok: Clerk returned the person. missing: Clerk has no such user. not_linked: the hub's row has no Clerk user id. unavailable: Clerk was not asked or did not answer.

AdminClerkStatus

object

What the sign-in provider said for this page. ok: Clerk answered. unconfigured: this deployment has no Clerk secret key. unreachable: Clerk did not answer in time, or refused the key.

AdminClerkStatus fields
FieldTypeDescription
statusrequiredstring

one of ok · unconfigured · unreachable

detailrequiredstring | null

One sentence for the page when status is not ok.

AdminUserStats

object

AdminUserStats fields
FieldTypeDescription
totalrequiredinteger

≥ 0

new_todayrequiredinteger

≥ 0

new_7drequiredinteger

≥ 0

new_30drequiredinteger

≥ 0

active_7drequiredinteger

≥ 0

active_30drequiredinteger

≥ 0

AdminSignupDay

object

AdminSignupDay fields
FieldTypeDescription
dayrequiredstring (date)
countrequiredinteger

≥ 0

AdminHubTotals

object

AdminHubTotals fields
FieldTypeDescription
robotsrequiredinteger

≥ 0

policiesrequiredinteger

≥ 0

datasetsrequiredinteger

≥ 0

runsrequiredinteger

≥ 0

Training runs, plans excluded.

devices_onlinerequiredinteger

≥ 0

Connected robots heard from within online_window_s.

online_window_srequiredinteger

≥ 1

AdminSpendMonth

object

What every account on the hub recorded this calendar month (UTC). cloud_usd is Lucen cloud jobs, agent_usd the agent's AI model calls and sandbox, model_calls_usd Coach and planner calls.

AdminSpendMonth fields
FieldTypeDescription
monthrequiredstring

pattern ^[0-9]{4}-[0-9]{2}$

total_usdrequirednumber
cloud_usdrequirednumber
agent_usdrequirednumber
model_calls_usdrequirednumber

AdminUserOrg

object

AdminUserOrg fields
FieldTypeDescription
slugrequiredSlug
display_namerequiredstring | null
rolerequiredstring

one of owner · member

AdminUserCounts

object

What the person's own account holds. policies are model repos. runs are training runs, plans excluded. devices are connected robots that were not disconnected.

AdminUserCounts fields
FieldTypeDescription
robotsrequiredinteger

≥ 0

policiesrequiredinteger

≥ 0

datasetsrequiredinteger

≥ 0

runsrequiredinteger

≥ 0

devicesrequiredinteger

≥ 0