---
title: "Anonymous Grant"
method: POST
path: "/v1/auth/anonymous"
tags: ["auth-anon"]
---

# Anonymous Grant

`POST /v1/auth/anonymous`

## Request

- Base URL: `https://api.usekeel.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.usekeel.io/v1/auth/anonymous`
- Auth: none declared

Provision an anonymous principal + org and mint a restricted token.

Public (no Bearer). Rate limited three ways: the shared PUBLIC HTTP
tier, per-real-client-IP, and per client fingerprint, plus the global
daily circuit breaker (R5).

## Request body

- AnonymousGrantRequest: Body of POST /v1/auth/anonymous (spec 05 R1). Everything optional — a bare POST is a valid grant request.
  - `client_name` string: Display label for the granting client (e.g. 'Keel CLI/0.5.7'). Carried on the token's client_name claim and used as one half of the abuse-limit fingerprint. Never used for authorization.

## Response `201`

Successful Response

- AnonymousGrantResponse: Token response plus the anonymous-org facts the client needs to render the one-line notice and later claim the org. All quota numbers come from plans.yaml (the enforcement source) — never invented.
  - `access_token` string, required
  - `refresh_token` string, required
  - `token_type` 'Bearer'
  - `expires_in` integer, required: Access-token lifetime in seconds.
  - `scope` string, required: Space-separated granted scope: the advertised tier tokens the credential fully covers (`base`, `live`) first, then the resolved credential_scopes (Q-1786).
  - `anonymous` boolean
  - `org_id` string, required
  - `principal_id` string, required
  - `plan` string
  - `org_expires_at` string, required: ISO timestamp when the unclaimed org is garbage-collected.
  - `quota` object, required: Anon plan limits from plans.yaml: backtest_runs, backtest_compute_seconds, strategies_max.
  - `notice` string, required: One-line anonymous-mode notice for CLI/agent display.
  - `claim` object, required: How to keep the work: sign in and POST /v1/orgs/claim.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/usekeel/apis/keel-api.md) · [All operations](https://skmtc.dev/usekeel/apis/keel-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usekeel/apis/keel-api/revisions/3191ca10b0ab?raw)
