Clients, Projects & Tokens
These endpoints let a client app manage the account-side resources: clients (organizations), projects that belong to a client, and the API tokens used to authenticate. All endpoints accept either a session cookie (__Host-aius_session) or a
bearer aius_… token, unless noted. Your identity is derived from the
credential — you cannot act on another user’s resources.
Clients (organizations)
A client is an organization that owns projects, billing, and tokens. A default client is created automatically when you register.List clients
200:
Create a client
200:
owner_id.
Projects
A project belongs to a client. List/create operations are scoped by the client id.List projects
org_id query parameter (the client id) is required.
200:
Create a project
| Field | Type | Required |
|---|---|---|
org_id | string | Yes — the owning client id |
name | string | Yes |
description | string | No |
200: the created project (same shape as the list item above).
Get a project
Delete a project
200: { "deleted": true }
Accessing a project in a client you don’t belong to returns 403 NO_ACCESS; an
unknown id returns 404 NOT_FOUND.
Fork a project
Create a point-in-time copy of a project as a brand-new project. The fork duplicates the brief, artifacts, and reports, records its lineage (forked_from_id), and gets an auto-uniqued name (<name> (fork)). The
original project is untouched.
200: the new project, e.g.
{ "id": "proj_456", "name": "Churn model (fork)", "forked_from_id": "proj_123", ... }
Tokens
API tokens are theaius_… credentials you use as bearer tokens. Minting
requires a session (cookie), not a bearer token. Listing and revoking also
require a session.
Mint a token
200:
List tokens
200: { "data": [ ... ] }. The secret token value is never
returned again after minting — only metadata is listed.
Revoke a token
200: { "id": 42, "revoked_at": 1717124500 }. A revoked token is
rejected on all subsequent requests with 401 invalid token. Missing id →
400; unknown id → 404.
Billing (overview)
A client also exposes Stripe-backed billing endpoints (subscription checkout, credit top-ups and balance, invoices, payment methods, and a billing portal), all under/v1/clients/{client_id}/…. These are typically driven from the web
dashboard. See Billing for details.