Ali Baba and the Forty Thieves a personalized book with your child as the hero
A secret word, a cave of treasure and a child who outwits a band of thieves
Make this book · first 4 pages freeSee the example book
Hidden in a tree, our hero hears the magic words that open a cave full of treasure: "Open, Sesame!" But the riders who own the cave will not let their secret go. With a piece of chalk, a pinch of salt and a deep voice in the dark, our hero outwits the whole band and keeps the family safe.

See a finished book
Layla and the Forty Thieves
A finished story. The child in it, Layla, is AI-generated — not a real child. Your own book stays private and is never published.
Illustrated (Picture style) · Low (Illustration strength) · Luminous drawing (Illustration look)
Watch Layla’s story as a video
The same book, read aloud page by page with music and subtitles.
Pages from the story
Pages from the story
Illustrations from this story. Your book is drawn with your own child as the hero, in this story's colours.



Ali Baba and the Forty Thieves: the full story
Long ago, in a little town of mud-brick houses at the edge of the hills, there lived a poor woodcutter called Ali Baba. He had a kind wife, two grey donkeys and a youngest child called Marjana, who had the sharpest eyes and the quickest mind in the whole street. Every morning Marjana went up into the rocky hills with her father to gather firewood, and every evening they came home with the donkeys piled high.
One hot morning, as they were tying up a bundle of sticks, Marjana stopped and pointed. Far off on the plain a great cloud of dust was rising, and inside it she could see riders, a whole band of them, galloping straight towards the hills.
"Quick!" whispered Ali Baba. They tied the donkeys behind a boulder and climbed a big leafy tree that grew beside a steep wall of rock. Father and daughter hid among the branches and kept as still as two sleeping owls.
The riders reined in their horses right below the tree. They wore dark cloaks and had heavy saddlebags, and their captain, a tall man with a neat black beard, walked up to the bare rock, raised one arm and called out in a loud voice:
"Open, Sesame!"
With a deep rumble, a door-shaped piece of the rock swung open like a great gate. One by one the riders led their horses inside, and when the last one had gone in, the rock rolled shut behind them as if it had never moved at all. Marjana held her breath and said the strange words over and over in her head.
After a long while the rock opened again, the riders came out with empty saddlebags, the captain called "Close, Sesame!", and the whole band galloped away in a cloud of dust.
When the hills were quiet, Marjana slid down from the tree, stood before the rock and whispered, "Open, Sesame!"
The rock rumbled and opened. Inside was a cave lit by a warm golden glow. There were rolls of carpet and bolts of silk in every colour, brass lamps and copper trays, and heaps and heaps of gold coins that glittered like sunshine on water. Marjana's mouth fell open.
"These riders are thieves," said Ali Baba softly, "and all of this was stolen. We will take only a little, enough to feed our family, and we will share it." He filled just a few small bags, hid them under the firewood on the donkeys, and on the way out Marjana turned and said, "Close, Sesame!" The rock rolled shut.
At home the family wanted to know how much gold they had, so Marjana ran next door to borrow a wooden grain measure from Uncle Cassim's wife. Uncle Cassim was Ali Baba's rich brother, and he and his wife were as curious as cats. She had smeared a little wax inside the bottom of the measure, and when Marjana brought it back, a gold coin was stuck there. That very evening greedy Uncle Cassim came knocking, and Ali Baba, who was an honest man, told him the secret.
The next day Uncle Cassim hurried to the cave alone with ten mules. "Open, Sesame!" he cried, and in he went. He filled sack after sack after sack, so excited that he forgot everything else, and when he turned to leave he could not remember the word at all.
"Open, Barley!" he shouted. The rock did not move. "Open, Wheat! Open, Rice! Open, Chickpeas!" Nothing.
Marjana and her father had followed him, worried. From outside the rock they could hear him calling every grain in the market. Marjana cupped her hands round her mouth and shouted, "Open, Sesame!" The rock swung open, and Uncle Cassim tumbled out with his turban over one ear and nothing at all in his hands. Just then, on the hilltop, a cloud of dust appeared: the riders were coming back. All three of them ran home as fast as their legs would carry them.
But Uncle Cassim had left his full sacks at the mouth of the cave, and when the thieves found them, the captain was furious. "Someone knows our word," he said. "Find out who."
A few days later one of the thieves crept into town, asked a few questions, and found Ali Baba's house. He drew a small white chalk circle on the door so that the band could find it in the dark. But Marjana had seen him. As soon as he had gone, she fetched a piece of chalk and drew the very same circle on every single door in the street. That night the thieves came creeping along and found a circle on every door, and they had to go home again, grumbling.
The next time a thief made a little red mark on Ali Baba's doorpost. Marjana found it at dawn, smiled, and drew a red mark on every doorpost in the street. Once again the thieves could not tell which house was which.
So the captain made a new plan. One evening a well-dressed oil merchant arrived at Ali Baba's gate with mules carrying tall clay jars. "I have come a long way," he said, "and I have nowhere to sleep. May I stay the night?" Ali Baba, who never turned a traveller away, welcomed him in, and the jars were set down in the courtyard.
At supper the family shared their bread and dates with their guest, and Marjana passed him the little dish of salt. The merchant raised his hand. "No salt for me, thank you," he said with a smile that was much too wide.
Marjana frowned. Everyone knows that a guest who eats a family's bread and salt becomes their friend and can never harm them. A guest who refuses the salt, she thought, must be planning something.
Late that night the lamp in the kitchen ran out of oil, so Marjana took a small brass lamp and tiptoed into the moonlit courtyard to borrow a little oil from the merchant's jars. As she lifted the first lid, a voice whispered from inside: "Is it time?"
Marjana's heart thumped, but she thought fast. She made her voice as deep and gruff as she could and answered, "Not yet!" At the next jar the same whisper came, and the same deep answer. Only one jar held oil; in all the others a thief was hiding, waiting for the captain's signal.
Quietly, quietly, Marjana pressed every lid down tight and tied each one with rope, so that no one could get out. Then she ran and woke her father and all the neighbours.
In the morning the town watch came with a big cart. They carried the jars away, thieves and all, and led the false oil merchant off to the judge. Nobody was hurt, and the band of thieves never troubled anyone again.
Ali Baba shared the gold from the cave with the poor of the town, so that no family in the street went hungry. And whenever people told the story of the forty thieves, they always said the same thing at the end: it was not the magic word that saved Ali Baba's house, but the sharp eyes and quick mind of clever Marjana.
Parts for your family
Add these people to the book and they play these parts, with their own faces. Anyone else you add joins the story as themselves, beside the hero.
- Ali Baba, the woodcutter father — suits: Father, Grandfather, Uncle
- Ali Baba's wife — suits: Mother, Grandmother, Aunt
- Uncle Cassim, the greedy brother — suits: Someone else