So, you're in Prison. Or, at least, a jail cell. Or an implausibly oversized birdcage. Your enemies have caught you and, having better things to do than murder you right away, have thrown you behind bars for safe keeping. Or maybe your allies have handcuffed you to a radiator to get you out of the way. But who's not locked up? That animal on the other side of the room... right next to the big ring of keys on the wall.
Now the task is to get the animal to bring the keys (or some other useful escape tool) over to you. If it's your Non-Human Sidekick, this could be as simple as a meaningful wink or special signal. But if it's a critter you're not necessarily on the best of terms with or don't know—or, heavens forbid, one belonging to the enemies who was given the keys for safe-keeping—well, you could be screwed.
A common variation is for the sidekick to have to steal then keys off The Jailer's person.
This often facilitates Cardboard Prison. Sister-trope to Conveniently Placed Sharp Thing and Hooking the Keys. Related to Within Arm's Reach, when an item is conveniently close to the protagonist during a fight scene. Compare Bring Help Back for when there aren't any keys around. See also Jail Bake and Passive Rescue for other ways of getting keys to prisoners, though this is more likely to occur on the spur of the moment than to be a part of a Great Escape. If the imprisoned character is a villain, this is a subtrope of Breaking Out the Boss. May involve a Cool Key or a Dangerous Key Fumble.
- In Dragon Quest: The Adventure of Dai, Maam, after being put in jail as a hostage to lure the other heroes back, is able to escape her confinement because Gome, after revealing itself as having been hiding between Maam's busts, fetches her weapons so she can break out of it herself.
- In Secret of Cerulean Sand, Marsenay, Chambellan and Sabri manage to have Comet (who's very attracted to bright items) bring them the key of their cells in Neo-City.
- Played with in Aladdin. Al is shackled in a dungeon for "kidnapping" Princess Jasmine. His monkey Abu comes to pick open the shackle locks, but that doesn't free him from the dungeon — a disguised Jafar does, as part of his plan to get the magic lamp.
- A variant occurs in Brave; after being locked in her room while her father goes out to hunt a bear that's actually his wife (long story), Merida sees her triplet brothers walk up to her door, now also transformed into bears. She simply tells them "Get the key" and they promptly go after the maid who has it.
- Cinderella: After Lady Tremaine locks Cinderella in her room during the Duke's visit, the mice Jaq and Gus have to get the key from Tremaine's pocket and carry it up the stairs to free her.
- Kim Possible Movie: So the Drama: After Team Possible is captured by Drakken, Rufus retrieves Kim's laser lipstick to get them untied.
- The Rescuers Down Under: Cody is trapped by McLeach with some of the animals he's poached. One of them, Frank the frilled lizard, manages to free himself and tries to get the keys to Cody. Unfortunately, McLeach's pet goanna Joanna arrives to stop him.
- The Road to El Dorado: From their holding cell onboard ship, Miguel offers the captain's horse Altivo an apple if he will bring them a pry bar. Just as Tulio is ridiculing him for expecting a horse to understand the words "pry bar," Altivo shows up with the cell keys instead. Tulio promptly moves the goal posts by claiming that technically speaking, Altivo didn't get them a pry bar.
- 102 Dalmatians has Kevin getting busted out of a jail cell not by any of his three dogs (who are locked in with him), but his parrot.
- Aladdin: After Aladdin exposes Jafar as a traitor, the latter is put in a dungeon. His parrot sidekick Iago frees him by bringing the key.
- The Beastmaster: The Beastmaster's ferrets, who make a habit of getting him out of sticky situations, steal a key and slip under a door to get it to him when he is trapped in a cell.
- In Being John Malkovich, Craig locks Lotte into her chimpanzee's cage. She is later able to escape by getting the chimpanzee to reach the keys and unlock the cage.
- Cruella: While staging a break-in Horace, Jasper and Estella send Horace's dog Wink in through an opening too small for them to fetch the key from the door. Later, Estella sends Wink into the jail with a set of lock picks so Horace and Jasper can unlock their cell.
- A variant in Fantastic Beastsand Where To Find Them: while Newt's bowtruckle companion, Pickett, doesn't outright bring him a set of keys, he does repeatedly pick locks to get Newt out of handcuffs.
- Guardians of the Galaxy Vol. 2: When Yondu and Rocket are locked in the ship's hold, they catch Baby Groot's attention and tell him to bring Yondu's prototype head fin so they can break out. Unfortunately, Groot doesn't quite understand what they're talking about and brings back a series of increasingly hilarious objects — including a pair of underwear, a severed toe, and a desk — before a regretful mutineer helps him out.
- A variant in Hong Kong Godfather: Wei, the protagonist is a Kindhearted Animal Lover whose pets include two dogs, a large Doberman who's in a cage most of the time and a smaller pup. When Wei gets ambushed by a horde of thugs, he lets his smaller dog out of his mansion, where it instead releases the Doberman into helping Wei by mauling several mooks.
- In Herbie Goes Bananas, Herbie (a sentient car who behaves much like an animal sidekick) retrieves the key to Paco's cell by bending his antenna enough to hook the keyring.
- In The Mask, Stanley's dog Milo's ability to fetch his master's keys comes in handy when he has to climb the wall into jail and sneak the keys off the sleeping policeman to break Stanley out — though he at first misunderstands the command, going for the policeman's sandwich.
Stanley: Not the cheese, the keys!
- Pirates of the Caribbean:
- Pirates of the Caribbean: The Curse of the Black Pearl: Adapting the scene from the ride, Captain Jack Sparrow mocks the other prisoners for trying to coax the mangy dog into bringing them the keys. A cannon ball opens up part of their cell, allowing them to escape. Once they leave, Sparrow starts whistling for the dog, too, but when the cursed pirates appear, the dog runs away with the keys, leaving him completely trapped.
- Pirates of the Caribbean: Dead Man's Chest: Another group of prisoners are whistling and hooting to call someone over... but in this case, they're cat-calling Elizabeth, sitting in the next cell after being wrongfully imprisoned. Later, when Governor Swann comes to get her out, he looks around and remarks "Now, where's that dog with the keys?" In a Brick Joke, we later see Pintel and Ragetti in a rowboat having escaped their cell, and then we see the dog (keys still in mouth) is in the boat with them.
- Concluded in Pirates of the Caribbean: At World's End: The Brethren Court bring out the (locked) book containing the Pirate's code, and the dog turns up carrying these keys as well.
- Swashbuckler: When they storm the fortress to rescue Sir James, the pirates find the door to the lower level of the dungeons locked, and the jailer passed out drunk on the stairs, too far from the door to reach. The street performers send their pet monkey through the bars of the door to retrieve the keys from the jailer's belt.
- A technological variation in the fifth Artemis Fowl book. When Holly is imprisoned, her Mission Control remote-activates her helmet in the other room to bounce over and break her out with its laser. She is considerably weirded out to find it bouncing up and down outside her cell like a little animal.
- Defied by Fred Colon of the Discworld book Thud!. He is described as being a particularly good jailor for, among other reasons, keeping the keys to his cells "in a tin box in the bottom drawer of his desk, a long way out of reach of any stick, hand, dog, cunningly thrown belt or trained Klatchian monkey spider." A footnote mentions this makes him possibly unique in the annals of jail history.
- In Emperor Mage, part of The Immortals series, Friend to All Living Things Daine is imprisoned by the corrupt emperor, but rescued by the marmoset Zek, who compares her situation to his previous experience of zoos and brings her the key to her cell.
- The Goodies: In "Daylight Robbery on the Orient Express", the Goodies escape their bondage by the getting the goat they happen to have with them on the train to eat the ropes tying them up.
- In the second episode of The Suite Life on Deck the main cast is entrapped in the same cell on Parrot Island. They escape when a feral pig Bailey befriended earlier gets them the keys, and was in the process of getting London a latte.
- The Westerner: Subverted in "School Days": When Dave wakes up and finds himself bound hand and foot, he calls his dog Brown in and tries to get him to undo the ropes. Brown just licks the ropes and then goes to help himself to uneaten food on the table, leaving Dave to figure his own way out of the ropes.
- Before its destruction in a fire in 2018, Europa-Park's "Piraten in Batavia" had the same scene as below, only it was in the Dutch East Indies and the pet was a monkey.
- Pirates of the Caribbean: While the ride is taking you through the attack on Port Royal, you can see and hear several prisoners trying to coax a mangy dog into bringing them the keys to their cell. The dog has the keys in its mouth, but doesn't seem certain about going to the cell door.
- Inverted in Persona 5. When the protagonist and Ryuji meet Morgana locked up in Kamoshida's Palace, they have to let him out in order for him to help them escape.
- Monkey Island 2: LeChuck's Revenge: Guybrush is arrested as soon as he puts his feet on Phatt Island. The guard gives the keys to his beagle Walt, telling the protagonist that the dog will tear Guy to pieces if he tries to escape. However, Guybrush easily convinces Walt to give him the keys by offering him a bone from a skeleton that is in the cell. Obs: the game was released in 1991, a decade before the first movie of Pirates of the Caribbean.
- Wild ARMs does this in Pandemonium. The protagonists are locked in separate parts of the dungeon but there's (conveniently) a hole in the wall in Jack's cell, enabling Hanpan to wander around the vents in order to find a way to undo the magic keeping them locked up.
- Invoked at one point in Latchkey Kingdom. With a twist the dog with the keys is a sentient Hound fully capable of talking and object manipulation. Though, Hounds normally walk on fours and carry objects (like the key ring) in their mouths. For added irony, he's the marshal, the kingdom's one-dog police force, whom the captured teens should've contacted from the start instead of breaking into the mad doctor's mansion.
- In the Action League NOW! episode, "Hey! Who Stole My Face?", a blender accident leaves Bill the Lab Guy to put The Chief and The Mayor back together. Bill does so, but accidentally switches their faces. The Mayor with The Chief's face takes advantage of this, and tricks the police into arresting The Chief with The Mayor's face. Because Justice, The Chief's pet dog is the only one who can tell The Chief and The Mayor apart even with their faces switched, he rescues The Chief with The Mayor's face by bringing him the keys to his jail cell.
- Josie And The Pussy Cats are trapped in prison capsules on the sea floor. Team Pet Sebastian the cat retrieves the keys from Captain Nemo's submarine, then plunks a Fishbowl Helmet on his head before descending to the sea floor to free them. Thanks to Toon Physics, this actually works.
- An orangutan at Omaha's Henry Doorly Zoo found a piece of metal on the floor of his cage. He was so smart that he was able to bend the metal piece and use it to pick the lock of his cage. Zoo staff were wondering who was letting the orangutans out, and it took them awhile to discover that it was one of the animals themselves. The orangutan was so smart that he evaded detection for some time by hiding the metal piece in his mouth along the gumline.