Your app's data · Read with a key
Supabase / Postgres
Request-level AI usage rows from your application database (read-only), mapped to model, tokens, customer, feature and cost.
- How data moves
- AI Spendbook reads it on a schedule with a key, token or read-only role you give it.
- Credential
- Read-only database role
- What it covers
- request telemetry, app records
- Money
- An estimate priced by AI Spendbook, never a bill
- Runs
- each scheduler run (daily on the hosted deployment)
- Freshness
- As fresh as your table at the time of the sync.
- History on first sync
- Up to 365 days
- Status
- Built from the vendor's public documentation and tested with recorded responses. Not yet run against a live account.
Set it up
- Create a read-only role: CREATE ROLE spendbook_ro LOGIN PASSWORD '…'; GRANT USAGE ON SCHEMA public TO spendbook_ro; GRANT SELECT ON public.ai_requests TO spendbook_ro;
- Use the Supabase connection pooler host (or direct host) and port shown under Project Settings → Database.
- Run discovery, choose the table and only the columns you need (sensitive columns are excluded by default).
- Map columns to model, tokens, timestamp and the primary key; test the mapping, then sync.
What it needs
A dedicated read-only Postgres role with SELECT on the selected tables only (no INSERT/UPDATE/DELETE, not a superuser). TLS is required.