Austria-Hungary was a real union between Empire of Austria and Kingdom of Hungary, founded in 1867 as result of Austro-Hungarian compromise. It existed until 1920, when it was dissolved and split between nation-states.
Austria-Hungary was created in 1867.
Great War and dissolution
The Great War
Austria-Hungary fought in war alongside Germany and Italy, against Entente (which consisted of Russia, UK and France). Austria-Hungary came out victorious, but left devastated and incredibly unstable.
Dissolution of Austria-Hungary
As a result of war, Austrian economy was in shambles, poverty was soaring and hunger became increasingly common amongst poor people. Political consciousness of middle and lower classes was growing and increasingly large numbers of people demanded true democracy. Early 20th century saw increase in nationalism of other nations besides that of Germans and Hungarians. The monarch promised liberalisation of Constitution and even larger autonomy for other nations, seeking to create United States of Danube. His attempts eventually failed and constituent nations started to fight for independence. Austria was saved from civil war by German socialist interventionist forces which entered on January 1921 and promised peaceful partition.
Partition of Austria-Hungary
Austria lost large part of its terriotory. It was allowed to maintain Österreich, Steiermark (including disputed city of Marburg), Kärnten, Salzburg, Vorarlberg. It was forced to cede Bozen, Trieste and small territory of Istria, in exchange for recognizing socialist government of Germany as legitimate. It also received border territory of Eisenstadt and Ödenburg (hun. Sopron) form Hungary. It also took large chunk of Bohemia (including cities Budweis and Pilsen) and Moravia (Olomütz, Brünn and Troppau). A plebiscite was conducted in Austria regarding joining Germany and 77% percent of Austrians were in favour.
From remaining parts of Bohemia, Moravia and Austrian Lower Silesia, Czech Republic was created, which soon federated with Slovakia, created from northernmost Hungarian territory, its eastern border with Ruthenia was located near city of Kosice.
Most of Transylvania and Banat were ceded to Romania, after being forced to turn socialist. Hungarians, though, received Szekely Land and a small land connection between it and main Hungary. Bukovina was also given to Romania.
Most of Voivodina was ceded to Serbia, but Hungary kept northwestern part, including Zombor and Szabadka. Remaining territory of Slvoenia, Serbia, Croatia and Bosnia was, under German auspices faderated into Yugoslavia.
Austria lost entirety of West Gallicia, to Poland and West Ukrainian People's Republic, which was soon annexed into Ukrainian SSR.