"Among the Borbo'ns, being king is a career," Spain's Juan Carlos once said.

Tonight, Juan Carlos de Borbo'n y Borbo'n showed how much of a career he's made since ascending the throne in 1975 as he and Queen Sofia welcomed President and Nancy Reagan to a state dinner in the royal palace.

Reagan, in his after-dinner toast, commended Juan Carlos, saying "the Spanish crown played a significant role in the historic turning point" of moving Spain to a democratic form of government.

The king in his toast said Spain's 1978 constitution was inspired by ideas from the American Revolution.

The Reagans and the royal couple, accompanied by Princesses Elena and Cristina, received about 130 of Spain's leading figures in politics, government and the nobility. The couples stood in the throne room, but nobody sat on the gold and red throne. There was, however, a lot of curtsying and hand-kissing as befits royal personages and first couples.

The queen and Mrs. Reagan both wore glittering designer gowns. Nancy Reagan's dress was more heavily beaded -- but, then, the queen had the tiara. President Reagan was in white tie with diamond studs sparkling on his shirtfront, and the 47-year-old king wore a blue military uniform with jeweled medals on his chest, a blue sash and a red cummerbund.

The dining room of the palace -- where state functions are held but where no one actually lives -- is an ornate room of marble, gold leaf, frescoes, huge chandeliers and priceless tapestries. It would give even Buckingham Palace an inferiority complex.

The four-course dinner of hot white asparagus, broiled salmon with crab sauce, medallions of fresh duck liver and strawberry souffle' was served by waiters in livery. After the dinner was over, the Reagans went back to spend their second night in Pardo Palace, the 18th-century residence of kings, which Francisco Franco took over when he became dictator and lived in until he died in 1975.

Wednesday, the Reagans fly to Strasbourg where the president will address the European Parliament, and after that they head for Lisbon to wind up their 10-day European tour with a state visit to Portugal. They return to Washington on Friday.