# How to build an AI companion app in 2026 — architecture, unit economics, pitfalls

> The blueprint for an AI companion product — persona architecture, memory, streaming, media moments, storage, and the economics that decide if it survives.

Published 2026-08-23 · eroq.ai — canonical: https://eroq.ai/blog/how-to-build-an-ai-companion-app


AI companion apps are the most demanding product in the character space: users come back to the same character every day and expect it to remember them, retention hinges on continuity, and your heaviest users are your best customers *and* your biggest cost. This is the blueprint we'd use, with real numbers.

## The architecture, in five decisions

**1. Persona lives in `context`, not in the transcript.** Send the character sheet — identity, voice, boundaries, shared history — through the [`context` field](/docs/chat) on every call, and keep the `messages` array for actual conversation. Editing a personality six months in becomes a data change, not transcript surgery.

**2. You own memory.** The API is stateless by design. Window the last 20–40 turns, and maintain a rolling summary ("what the character knows about this user") that you fold into `context`. Companion products die of amnesia; a summary refreshed every 30 turns is the cheapest fix that works.

**3. Stream everything.** Set `stream: true` and relay [SSE chunks](/docs/streaming) to the client. A companion that "types" feels present; a spinner feels like a form. Messaging mode (`mode: "messaging"`) keeps replies texting-length and snappy — the right register for DMs, and it caps your token ceiling.

**4. Media are moments, not wallpaper.** A snapshot from the character's day at a story milestone ([10 credits](/docs/images)), a [voice note](/blog/tts-for-ai-characters) when the user comes back after a week away (3 credits per 100 characters) — scarce, earned, and priced as premium unlocks. Products that autoplay everything spend 10× and retain worse.

**5. Persist the media users come back to.** Pictures your users unlock are assets they revisit. Add `store: true` to the generation call and the render lands on the [eroq Store](/storage) CDN with a durable URL — object storage built into generation, under the same written policy as the models, instead of a second vendor to wire ([how render, storage and serving fit together](/blog/storing-and-serving-ai-generated-media)).

## The unit economics (the part that kills apps)

Flat credits make this math checkable — a completion is 1 credit on RP mini, 3 on RP+, [full table here](/pricing). The number that matters: **an engaged companion user sends 30–60 messages a day.**

| User profile | Messages/day | Model | Credits/month | Cost/month |
| --- | --- | --- | --- | --- |
| Casual | 8 | RP mini | ~240 | ~$2.00 |
| Engaged | 40 | RP mini | ~1,200 | ~$10.00 |
| Engaged, premium | 40 | 30% RP+ | ~1,920 | ~$16.00 |
| Power user | 100 | RP mini | ~3,000 | ~$25.00 |

Three conclusions fall out immediately:

- **Uncapped free tiers are suicide.** An energy/message-cap system isn't a growth hack, it's solvency.
- **Price tiers around message volume**, not features. $9.99 casual / $24.99 unlimited maps to the actual cost curve.
- **RP+ is the premium lever**: route paying users' emotional beats to the flagship, keep small talk on mini. The [`model` field](/docs/chat) switches per call.

Don't take the table's word for it — the prices are flat and [public](/pricing), so your own spreadsheet reproduces any cell above in a minute.

## The pitfalls, from production

- **Refusal mid-scene is churn.** It's the moment companions break: the story takes a dark turn — a betrayal, a death, a fight — and the character answers with a disclaimer. eroq's engines are [uncensored by policy](/uncensored-ai-api) — the wall is a written AUP enforced at the account level, not a filter's mood deciding mid-conversation.
- **Treat HTTP 402 as an upsell, not an error.** Balance-empty is a [product event](/docs/errors): catch it, route to your top-up flow, never show a stack trace.
- **Let users send photos.** Vision-enabled chat ([+2 credits per image](/blog/let-users-send-pictures-vision-roleplay)) is the highest-retention feature per credit in the category — the character *reacts to the user's day*.
- **Log persona breaks.** Every turn where the character slipped, tag it and drop it from future windows. Drift compounds; curation is cheap.
- **Say what you keep.** People confide in companions, so your privacy page is part of the product — write it from facts. eroq's own models (RP+, RP mini, Voice One, Voice Turbo) retain nothing upstream; prompts are kept in eroq's usage ledger for billing and abuse handling; and on image and video calls, `private: true` keeps no file and no library entry and replaces the prompt with stars in the ledger.

## FAQ

### How much does an AI companion app cost to run per user?

On flat credits, a casual user at 8 messages a day is around $2 a month and an engaged one at 40 a day around $10 — 1 credit per reply on RP mini, 3 on RP+. Route 30% of turns to the flagship and the engaged user lands near $16. The numbers above are just those rates multiplied out, so your own spreadsheet reproduces them.

### Which model should an AI companion app use?

Default to [RP mini](/models/eroq-rp-mini) at 1 credit and escalate to RP+ at 3 for the turns that carry weight — reveals, reunions, the end of an arc. `mode: "messaging"` caps replies at 160 tokens and keeps the texting register, which is the right shape for DM-style products and the cheapest to serve.

### Can the character send pictures and voice notes?

Yes, as separate calls: an image is 10 credits on Image One, Image Anime or Image Art, and a voice line is 3 credits per 100 characters on Voice One (2 on Voice Turbo), in a roster voice or one you cloned. What does not exist is lip-sync or a talking avatar — there is no feature that animates a face to match the audio, so design the moment around a still image plus a voice note.

### Is an AI companion app allowed on eroq?

Yes — character fiction is the core use case, and it renders in character, dark turns included. The limits are written and absolute: fiction only; nothing involving minors, no real identifiable people without consent, nothing illegal — enforced at the account level. Rate your product for the audience it serves, pass through an acceptable-use policy at least as strict as ours, and handle `content_blocked` as a product event.

## Ship the walking skeleton first

Day one is [a key](/signup), a system context, a windowed history and a streamed reply — the [character chat tutorial](/blog/build-ai-character-chat-app) has the code. The 50 free credits cover an evening of testing the exact scenes your product will live on. Everything above is iteration.
