cuento conlaIA
SampleGalleryBlog
Create story
Editorial methodology

How we build every storybook.

Prompts, models, moderation, and why character consistency is the heart of the product.

1. The golden rule: character consistency

A 20-page storybook fails if the kid can't recognise themselves on any one of them. Faces drift, outfits shift, the plush goes through identity crises. That was the hardest problem to solve — and the reason this is a service rather than a self-hosted script.

Our first version explored the open-stack route (ComfyUI + LoRAs trained on character embeddings). It worked for 4–5 pages; past that, details fell apart. We switched to a frontier model that can keep the protagonist coherent across the whole book. It's the less satisfying engineering choice — self-hosting is always cleaner — but the only one that delivers a book where the kid recognises themselves cover to back cover.

2. The prompt chain

Each book is a graph of discrete steps, not one mega-prompt:

  1. Plan-story: an LLM (gpt-5 / gpt-4.1) takes the user's idea (guided, freestyle or lucky mode) and composes a 20-page skeleton with title, scene, narrative beat and recurring elements.
  2. Generate-image: for every page, a deterministic prompt combines the plan with the kid + plush visual references and generates the illustration via gpt-image-2.
  3. Verify (optional): on some plans, a vision model (Anthropic) reviews cross-page coherence and flags pages for regeneration.
  4. Assemble-pdf: ReportLab composes the final PDF (20 pages + cover + back cover) with the discreet cuentoconlaIA.com mark and the AI-generated content notice.
  5. Publish-output: we store the PDF in S3 with a 365-day TTL, generate a public (HMAC-signed) link, and email it along with the in-browser viewer URL.

The whole chain is orchestrated by an AWS Step Functions Standard execution, gated by Stripe's `payment_intent.succeeded` event. If any step fails, there's an automatic refund path and an email to the user.

3. Image moderation

User-uploaded photos pass through AWS Rekognition before anything else reads them. If Rekognition flags inappropriate content (nudity, explicit violence, substances), the generation cancels automatically and we refund the payment. We also check that photos contain recognisable faces — that's what makes the final book work.

AI-generated images are explicitly labelled in the viewer, in the PDF and in the EXIF metadata — required by EU Regulation 2024/1689 Art. 50 (EU AI Act).

4. Privacy by architecture

User photos auto-delete after 30 days via an S3 lifecycle rule that runs without human intervention. It's not a promise: it's a managed AWS component. If we wanted to bypass it we'd need to actively reconfigure the bucket — and CloudTrail audits every change.

Generated creations (PDFs + page images) are kept for 365 days, or until you ask us to delete them. None of it feeds model training: not our weights (we don't train), not OpenAI's or Anthropic's (the enterprise plans we use opt out of training by default).

5. Author's rights

When you confirm a book you get a personal, non-exclusive licence to print, gift, read and share it within your family and friends. cuentoconlaIA.com retains the underlying ownership of the work to prevent unauthorised commercial reproductions.

Full details in terms & conditions §6 "Intellectual property and authorial rights".

6. When something breaks

The system emits an email-error if generation drops mid-flow (timeout, model failure, blocking moderation). We refund automatically and invite the user to retry with a different idea or photo. Every error has a job-id the operator can inspect in the internal log.

7. What we DO NOT do

  • We don't use the kid's photos to train models. Not us, not our upstream providers.
  • We don't use marketing cookies. Only essentials + analytics (with consent).
  • We don't sell data. Ever. The privacy policy says so in legally binding terms.
  • We don't generate pornographic or violent content. The moderation chain blocks it by architecture.
  • We don't publish your book in the gallery without your consent. Only the books you choose to share appear in /en/creations/.
cuento conlaIA© 2026 cuentoconlaIA.com · A product by Nexo Apex S.L.