AI Module
The Angstroma AI module provides nine content transform functions powered by Claude. Each function is designed for accessibility use cases: reducing reading level, generating image descriptions, scaffolding learning support, and adapting content for different learning needs.
Credit-pool tiers
Each monthly tier grants a pool of credits that AI tasks draw from. You can change tiers at any time — Stripe prorates to the day. Enterprise contracts may negotiate custom pool sizing.
| Tier | Price (USD) | Credits / month | Good for |
|---|---|---|---|
| Lite | $29/mo | 2,000 | Small sites, ~2K Haiku tasks or ~130 Opus tasks / month |
| Plus | $59/mo | 5,000 | Mid-size sites, mixed Haiku + Sonnet workloads |
| Max | $99/mo | 10,000 | Content-heavy sites and edtech classrooms |
| Scale | $179/mo | 30,000 | Enterprise volume; custom negotiated above this tier |
Smart Mode — pick your Claude model per task
Every transform accepts an optional mode parameter that selects which Claude tier runs the request. Credits are consumed as a multiplier of the Standard cost:
| Mode | Claude model | Credits per task | When to use |
|---|---|---|---|
| Standard (0) | Haiku 4.5 | 1 | Default. Simplify, alt-text, vocabulary, syllable break — ~95% of tasks. |
| Smart (1) | Sonnet 4.6 | 3 | Translation, picture dictionaries, nuanced rephrasing. |
| Genius (2) | Opus 4.7 | 15 | Hard reasoning only — equation speech, long-form summaries, tone. |
Your tenant has a Smart Mode cap set by the owner. Requests above the cap return403 SmartModeCapExceeded without consuming credits. Default cap is Standard.
Sending Smart Mode via the API
Overage & spend cap
If you exhaust your monthly pool, further tasks are billed as metered overage at approximately $0.015 per credit. You set a monthly overage cap in Billing — default is $50 USD. Set it to $0 to hard-block overage; above the cap the API returns 429 AiCapReached. Email alerts fire at 80% and 100% of both pool and cap.
Cache & free hits
All AI responses are cached by a SHA-256 hash of (content + transform + target level + mode)for 7 days. Cache is partitioned by Smart Mode tier, so Haiku and Opus outputs never mix. Cache hits return wasCached: true and consume zero credits. Building cache-friendly requests (stable input text, same grade level, same mode) maximises hit rate.
Currency & billing
AI credit-pool and any overage are always billed in USD via Stripe, globally. This applies even to tenants whose base plan is billed in LKR via PayHere — AI pricing stays uniform worldwide and avoids FX drift on metered usage.
Available transforms
| Function | API endpoint | Description |
|---|---|---|
| simplify() | POST /content/simplify | Rewrites text to a target reading grade level. |
| generateAltText() | POST /content/alt-text | Generates descriptive alt text for an image URL. |
| getHints() | POST /content/hints | Returns scaffolded hints for a question without revealing the answer. |
| rephrase() | POST /content/rephrase | Rephrases a question/answer pair for clarity or reading level. |
| extractVocabulary() | POST /content/vocabulary | Identifies key vocabulary words from a passage. |
| summarize() | POST /content/summarize | Summarizes a passage to a target length. |
| translate() | POST /content/translate | Translates text to a target language. |
| checkGrammar() | POST /content/grammar | Checks grammar and returns corrections with explanations. |
| extractImageText() | POST /content/ocr | Extracts all text from an image URL (OCR). |
Response format
All AI transform endpoints return the same structure:
Usage examples
Via React SDK
Via Vanilla JS SDK
Via REST API directly
Rate limits & quotas
| Plan | AI calls / month | AI rate limit |
|---|---|---|
| Free | Not available | — |
| Starter | 1,000 | 10 / minute |
| Pro | 10,000 | 50 / minute |
| Enterprise | Custom | Custom |