AI capture
AI capture lets signed-in users describe subscription changes in natural language or upload a screenshot. The model returns a proposed command; the app shows a review screen and only writes data after the user confirms.What users can do
- Add one or more subscriptions from a sentence, receipt, statement excerpt, or screenshot.
- Update an existing subscription by name or id.
- Batch update several subscriptions in one request.
- Delete an existing subscription after review.
- Confirm, edit, discard, or undo the resulting action in the app.
Required hosted services
- Supabase auth, because AI capture is only available to signed-in users.
- Supabase migrations through
20260625000100_ai_budget_reservations.sql, because quota and budget RPCs are required. - Netlify Functions, because provider keys stay server-side.
- An AI provider key for OpenRouter or Anthropic.
Provider variables
OpenRouter is the default low-cost path whenOPENROUTER_API_KEY is present:
AI_PROVIDER is optional. Without it, the server infers openrouter when OPENROUTER_API_KEY is set; otherwise it uses the Anthropic path.
Guardrail variables
All guardrails are server-only variables:Privacy model
The pasted text or uploaded screenshot is sent once to the configured model provider for extraction. Subscription Manager does not store or log the content. The database keeps only:- Per-user daily AI capture counters.
- Workspace-wide monthly aggregate token counts.
Errors and fallback
Common error codes returned by/.netlify/functions/ai-parse-subscriptions:
| Code | Meaning |
|---|---|
ai_unavailable | No provider key is configured |
ai_quota_exceeded | The signed-in user has used today’s quota |
ai_budget_exceeded | The workspace monthly budget is exhausted |
input_too_large | Text exceeds AI_MAX_INPUT_CHARS |
image_too_large | Image exceeds AI_MAX_IMAGE_BYTES |
ai_provider_unavailable | The provider request failed due to network/provider availability |
ai_parse_failed | The provider responded, but no usable command was produced |