auth
Identity of the caller
GET / v1/ auth/ me
Who am I
Returns the authenticated principal: the user and how they authenticated (session or API key, and the key's scopes). List org memberships via GET /v1/orgs. account says whether the person has chosen their handle. It also says how they answered the welcome questions. This tells a client when to ask.
Responses
PATCH / v1/ auth/ me
Change my handle or my welcome answers
Changes the signed-in person's handle, records their answers to the welcome questions, or both. Only a signed-in person may do this. A key cannot rename the account it belongs to. A handle follows the organization rules: letters, digits and dashes, no dash at either end, at most 64 characters. Case is ignored and the handle is stored in lower case. A handle already used by a user or an organization is a 409. So is a name the site keeps for its own pages. If the old handle ever owned a repository, it keeps pointing at this account. Its repository addresses still resolve, and nobody else can take it. API keys and robots refer to the account by id, so a rename changes nothing for them. An account may hold at most five old handles. Each rename is recorded in the activity feed.
Request body
| Field | Type | Description |
|---|---|---|
username | string | The new handle. Case is ignored. |
onboarding | OnboardingUpdate |
Responses
| Status | Description | Body |
|---|---|---|
200 | The account after the change. | Me |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
409 | State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...). | Problem |
422 | Request failed validation. | Problem |
DELETE / v1/ auth/ key
Revoke the API key that calls
Ends the API key that sends the request, at once, with the short-lived keys made from it. A program that was handed a key for one job calls it when the job is done, so the key does not outlive it. A key can only end itself this way. Minting, listing and revoking other keys stay with a signed-in person. A session has no key to end (422). Any key may call it, a key limited to some repos too. The revocation is audited as the key's own.
Responses
POST / v1/ desktop-sign-ins/ token
The desktop app turns its code into a key
The app sends the code it received on its own loopback address and the PKCE verifier only it holds. The answer is a key that expires in seven days, a refresh token, and who the key acts as. A code works once and for one minute. An unknown, used or expired code, and a verifier that does not match, all get the same 404.
Request body
| Field | Type | Description |
|---|---|---|
code | string | |
code_verifier | string |
Responses
| Status | Description | Body |
|---|---|---|
200 | Signed in; | DesktopSignInCollected |
404 | Resource not found (or hidden from the caller). | Problem |
422 | Request failed validation. | Problem |
POST / v1/ desktop-sign-ins/ refresh
Renew a desktop app's key
Before its key expires, the app sends its refresh token. The answer is a new key and a new refresh token, and the old key stops working. A refresh token works once. Using one twice ends the sign-in, because it means someone else has it too. An expired key renews until thirty days after the last renewal (the grace window). A key the person revoked or rotated on the keys page, or one made from a key that no longer works, ends the sign-in instead (404).
Request body
| Field | Type | Description |
|---|---|---|
refresh_token | string |
Responses
| Status | Description | Body |
|---|---|---|
200 | Renewed; the new | DesktopSignInCollected |
404 | Resource not found (or hidden from the caller). | Problem |
422 | Request failed validation. | Problem |
Schemas (16)
The schemas these operations reach before any other tag’s do. A type that links elsewhere is rendered on that tag’s page.
Me
| Field | Type | Description |
|---|---|---|
user | UserPublic | |
auth | AuthInfo | |
account | MeAccount |
MeUpdate
Omitted fields are unchanged.
| Field | Type | Description |
|---|---|---|
username | string | The new handle. Case is ignored. |
onboarding | OnboardingUpdate |
DesktopAuthorize
| Field | Type | Description |
|---|---|---|
client | string | The app and its version, as the app reported it. |
device_name | string | The computer's name as the app reported it. The page says so. |
code_challenge | string | The PKCE challenge, the base64url SHA-256 of the app's verifier. |
code_challenge_method | string | |
redirect_port | integer | The port the app listens on, on 127.0.0.1 only. |
DesktopAuthorization
| Field | Type | Description |
|---|---|---|
code | string | One use, one minute, and only with the app's verifier. |
redirect_uri | string | Where the browser goes with the code, on this computer. |
expires_at | string (date-time) |
DesktopCodeExchange
| Field | Type | Description |
|---|---|---|
code | string | |
code_verifier | string |
DesktopSignInCollected
| Field | Type | Description |
|---|---|---|
key | ApiKeyCreated | |
refresh_token | string | Renews the key before it expires ( |
refresh_expires_at | string (date-time) | After this, unused, the app signs in again. |
user | UserPublic |
DesktopRefresh
| Field | Type | Description |
|---|---|---|
refresh_token | string |
AuthInfo
| Field | Type | Description |
|---|---|---|
kind | string | How the caller authenticated. |
key_id | string | null | API key id ( |
scopes | array of string | Effective scopes, hierarchical: |
expires_at | string (date-time) | null (date-time) | When the API key stops working. Null for a session or a key that does not expire. |
limited_to | array of ApiKeyLimit | null | The repos the API key is limited to. Null for a session or an unlimited key. |
agent | boolean | True when the API key is marked as one an AI agent holds. |
MeAccount
What only the account's owner sees about their own account. It says whether they chose their handle, and holds their answers to the welcome questions.
| Field | Type | Description |
|---|---|---|
handle_chosen | boolean | False while the handle is the one the site made up at the first sign-in. A client then asks the person to choose one. |
handle_suggestion | string | null | A free handle drawn from what the sign-in said about the person, to prefill the handle form. It comes from their username, else the part of their e-mail address before the |
onboarding | Onboarding |
OnboardingUpdate
Omitted fields are unchanged and null clears one. finish marks the welcome screen as done, either by answering or by skipping it.
| Field | Type | Description |
|---|---|---|
role | OnboardingRole | null | |
institution | string | null | |
start_with | OnboardingStart | null | |
building | string | null | |
finish | string | null |
ApiKeyCreated
A freshly minted key. key is the plaintext secret and is present only in this response. Store it now. The server keeps an argon2 hash and cannot show it again.
| Field | Type | Description |
|---|---|---|
id | Id | |
name | string | |
key_prefix | string | |
scopes | array of ApiKeyScope | |
daily_gpu_hour_quota | number | null | |
last_used_at | string (date-time) | null (date-time) | |
revoked_at | string (date-time) | null (date-time) | |
expires_at | string (date-time) | null (date-time) | When the key stops working. Null means it does not expire. After this instant the key answers 401 with a problem that says it expired. |
limited_to | array of ApiKeyLimit | null | The repos this key may act on, by their current names. Null means every repo the account can reach. An empty list means every repo it named has since been deleted. |
agent | boolean | Marked as a key an AI agent holds. Its rows in the activity feed say |
replaced_by | Id | null | The key that |
parent_key_id | Id | null | For a short-lived child ( |
created_at | string (date-time) | |
key | string | The plaintext key ( |
ApiKeyLimit
One repo, as owner/slug, or every repo of one owner, as owner/*.
Onboarding
The person's answers to the welcome questions.
| Field | Type | Description |
|---|---|---|
role | OnboardingRole | null | |
institution | string | null | |
start_with | OnboardingStart | null | |
building | string | null | What the person said they are building, in their words. |
finished_at | string (date-time) | null (date-time) | When the person finished or skipped the welcome screen. Null means they have not seen it yet, and a client shows it once. |
skipped | boolean | True when they left the welcome screen without answering. |
OnboardingRole
What the person does, as they said it on the welcome screen.
OnboardingStart
Where the person chose to start. One of: try the sample robot in sim, bring their own robot, bring a dataset, or connect their own AI.
ApiKeyScope
Granted scope. Hierarchical: write implies read, train implies write.