Shipped architecture
What happens before and after generation
The backend is the authoritative safety boundary for typed requests and generated-image prompts on iOS, Android, and the web. Client checks stop obviously invalid input from being sent, but the server does not trust them and runs the safety checks itself. Uploaded photos and voice conversations take separate paths, described below.
Client input validation
All clients constrain input before sending: iOS, Android, and the web each reject empty input and hold it to the same prompt-length limit. None of them decides whether content is safe. Askie's multi-layer filtering runs server-side on every typed request and generated-image prompt, whichever client sent it.
Authenticated backend middleware
Requests pass authentication, rate limits, supplied-age range checks, content structure checks, and prompt-injection screening before Askie's safety filter evaluates the text. When a child ID is present, the backend verifies that the profile belongs to the authenticated account.
Age-aware model controls
The age sent with the request selects prompt instructions, keyword rules, and provider safety settings. Askie's clients normally take it from the selected child profile. The server validates the range but does not currently replace it with the stored profile age.
Text response filtering
Provider controls can stop generation while it is streaming. Askie's age-aware post-generation filter checks the completed text and returns a child-friendly error when it fails. Because text chat streams chunks to the client, those chunks may render before the completed-response check.
Image safety
Generated-image prompts pass the general input checks and a dedicated image blacklist. Gemini refusal states and safety ratings are handled as blocked generations rather than shown to the child. Uploaded photos are checked for supported type, presence, and size, then Gemini handles the visual input; Askie does not run a separate server-side pixel-content scan on those photos.
PII-aware logging
Some server logging pathways use utilities that mask emails, user IDs, tokens, IP addresses, phone numbers, links, social handles, street addresses, and postcodes in selected structured and free-text fields. The text safety filter and the image prompt validator each log a short contentPreview of the content they block, and those previews are not currently passed through the free-text PII redactor.
Live voice safety
A voice conversation runs over a real-time connection to Askie's voice agent instead of the text request path, so it carries its own safety layers: the age-aware child-safety instructions the backend builds for each session, framing that tells the model to treat topic and replayed chat text as data rather than instructions, the provider's own real-time controls, and, where the heads-up feature is enabled, a review of the session transcript once the call ends. Images asked for during a call are still generated through the backend, so they pass the same image checks.