Low-cost chatbot backend for SaaS startups: per-token pricing, batching, data boundaries
Description and use
The article proposes an architecture for SaaS startups that separates audio processing from text summarization to reduce costs and risks. Audio is handled by a specialized vendor, while text (after PII redaction) is processed via an OpenAI-compatible backend, enabling easy vendor switching and GDPR compliance.
Problem
SaaS startups need a survivable, low-cost chatbot backend that handles sensitive sales call data while managing unpredictable per-token pricing and strict data residency/retention requirements for European and US markets.
Outcome
The proposed architecture reduces cost and compliance risk by separating audio processing from text summarization. It enables vendor agility for the LLM layer, ensures PII is never sent to the LLM, and leverages prompt caching and batching to optimize token usage.
Workflow
- Record sales call and send audio to a specialized ASR vendor with a clear data processing contract.
- Receive transcript and immediately redact PII (emails, phone numbers, credentials) replacing them with stable tokens.
- Store the redacted transcript; delete raw audio according to ASR vendor's retention policy.
- Construct a prompt with a stable system prefix (CRM schema, action taxonomy) followed by the redacted transcript.
- Send the prompt to an OpenAI-compatible LLM backend (e.g., Infrai) using prompt caching for the stable prefix.
- Parse the JSON response to extract summary and CRM actions (tasks, notes, stage changes).
- Use batch routes for non-real-time tasks like re-summarizing historical data or backfilling fields.
- Keep live chatbot turns on the synchronous path for immediate user feedback.
Evidence
Use two providers, not one. Keep the audio with a transcription specialist you actually have a contract with, and run the text step... behind an OpenAI-compatible chat backend you can repoint in an afternoon.
I redact before the model call, not after — emails, phone numbers, and anything that looks like a key get replaced with stable tokens
Prompt caching is a discount on repetition. It pays when the stable prefix is large and identical across requests
- Record date: 2026-09-05T13:14:24.101Z