/api/csrfIssue a CSRF token
Frontend contract
HTTP routes for a new frontend. They run the same server functions as the live dashboard.
Cookie session. CSRF on POST: GET /api/csrf, then header x-csrf-token. Do not send GPU names or API keys. Chat is Agent Zero after launch.
The live UI calls Next.js server actions. Use the HTTP column in a new app.
| Dashboard | HTTP |
|---|---|
| login() | POST /api/v1/auth/login |
| logout() | POST /api/v1/auth/logout |
| createPodRequest() | POST /api/v1/assistants/claim |
| getUserActiveAssignments() | GET /api/v1/assistants |
| getUnassignedPods() | GET /api/v1/assistants |
| getPodActivationStatus() | GET /api/v1/assistants |
| upgradeToPrivate() | POST /api/v1/assistants/upgrade |
| extendSession() | POST /api/v1/assistants/extend |
| releaseMyPod() | POST /api/v1/assistants/release |
| Open assistant | GET /api/agent-zero/launch |
| Resume | POST /api/pods/{id}/resume |
| Proxy health | GET /api/proxy/health |
CSRF, register, session
/api/csrfIssue a CSRF token
/api/registerCreate an account
/api/v1/auth/loginSign in and set the session cookie
Same backend as dashboard server action login() in src/actions/auth.ts. The live login page calls the action; this route runs that function.
/api/v1/auth/logoutClear the session cookie
Same backend as dashboard server action logout() in src/actions/auth.ts.
/api/v1/meCurrent account
/api/userCurrent account (legacy path)
Existing dashboard JSON route. Prefer GET /api/v1/me, which adds credits.
Shared vs Private claim, session, launch
/api/v1/assistantsCurrent assistant, plans, and credits
Same backend as getUserActiveAssignments() and getUnassignedPods() in src/actions/dashboard-data.ts, plus getPodActivationStatus() via current.status. Poll until current.status is READY, then open current.launchPath.
/api/v1/assistants/claimClaim Shared or Private
Same backend as dashboard server action createPodRequest() in src/actions/requests.ts. The live claim modal calls the action with an internal pod id; this route picks the pod and then runs that function. Send only tier and durationHours.
/api/v1/assistants/releaseEnd the current session and refund unused time
Same backend as dashboard server action releaseMyPod() in src/actions/pod-assignment.ts. Looks up the caller's assignment so the client does not send a pod id.
/api/v1/assistants/extendAdd hours to the current session
Same backend as dashboard server action extendSession() in src/actions/pod-assignment.ts.
/api/v1/assistants/upgradeMove Shared to Private on the same account
Same backend as dashboard server action upgradeToPrivate() in src/actions/pod-assignment.ts. Memory stays on the account. Unused shared time is refunded first.
/api/agent-zero/launchOpen the managed assistant (browser redirect)
Same URL the live dashboard Open assistant button uses. Requires a session cookie. Returns 302 to the auto-login entrypoint when READY, or an HTML wait page while starting. Use from a top-level navigation or window.open, not as JSON.
/api/pods/{id}/resumeResume a stopped assistant runtime
HTTP fetch used by the live dashboard user-pod-actions (POST /api/pods/{id}/resume). This is not a server action. A new frontend can keep using it if it has the assignment's internal id, or prefer polling GET /api/v1/assistants after claim.
Conversation metadata stored on the account
/api/conversationsList account conversations
/api/conversationsCreate a conversation record
Does not start a model reply.
/api/conversations/{id}/messagesList messages in a conversation
/api/conversations/{id}/messagesStore a message
Persists history. It does not call the GPU model.
Liveness and readiness
/api/proxy/healthAuth-proxy health (dashboard poll)
HTTP fetch used by the live dashboard ProxyStatusCard. Not a server action.
/api/health/liveProcess liveness
/api/health/readyAccepts traffic when the database is up
/api/openapi.jsonThis OpenAPI document
Managed OpenAI-compatible proxy on api.aicharli.com
/v1/chat/completionsOpenAI-compatible chat completions
Managed assistant inference. Authorization is a Bearer key minted for the claimed assistant, not a customer-supplied key. Prefer launchPath for the product chat UI.
/v1/modelsList managed models
/v1/memory/searchSearch the account's conversation memory