Getting Started
The Mental Model
A normal ACM2 session looks like this:
- WordPress authenticates the user
- WordPress sends the user's DB key to the backend
- the backend returns a session token
- the frontend app uses that session token for normal API calls
- those API calls read and write only that user's encrypted data
The backend is stateful in one important way: it caches the user's DB key in RAM.
That is why login matters, and why a backend restart can force the user to log in again even if the browser still has a token.
Main Objects
The API revolves around a few major object types:
- users
- presets
- contents
- runs
- run artifacts
- credits
- provider keys
Typical User Journey
Most real usage follows this path:
- create or load presets
- create or load contents
- create a run from a preset
- start the run
- poll run status or list runs
- inspect run detail, logs, report, and export
The Important Constraint
Free users can read but cannot write user state.
Paid users can do normal create and update operations.
Base URL
The backend API lives under:
https://api.apicostx.com/api
In local or private environments, use the backend host URL that your deployment defines.