Wilhelm I of Prussia dies of something in 1868 (and so never becomes Kaiser Wilhelm I). He is succeeded by his son Friedrich, who has ambitions to consolidate Germany and become Kaiser. However, Friedrich dislikes Bismarck. It is politically awkward for Friedrich to sack Bismarck, but their relations are at arm's-length.
In 1870, Bismarck attempts to engineer war with France over the Hohenzollern candidacy for the throne of Spain. As in OTL, he does some creative editing of diplomatic reports to inflame passions on both sides. He then has the presumption to announce that Friedrich has been intolerably insulted by the French reaction, and responds for him in terms that would insure war.
But Friedrich isn't having it. He notes that ministers do not tell princes what they think or put words in their masters' mouths. He sacks Bismarck, and issues a message to France that is, though not apologetic, conciliatory. The crisis passes.
Friedrich now seeks the formation of the German Empire on a "liberal" basis, with no more of Bismarck's "eisen und blut" ("iron and blood"). But France is still opposed. Finally, in 1876, he conceives a "brilliant strategem". He arranges the marriage of his eldest daughter Charlotte to the Prince Imperial of France - the son of Napoleon III (also Napoleon), who has lived a few years longer without the stress of OTL.
This is a "win-win": the Bonapartes get into the royal establishment of Europe, and in return, France supports the creation of the German Empire. The union even gets the approval of Britain, or at least of Queen Victoria, Charlotte's grandmother (who OTL proposed the marriage of her youngest daughter Beatrice to the Prince).
The alliance was famously celebrated in the 1895 photographic portrait of "Three Empresses": the Queen, the Kaiserin, and the Imperatrice.