Brentford failed to capitalise on a stunning start against the Championship's form team as they were well beaten by a talented Cardiff side.
The Bees came out brightly and should have scored inside 20 seconds but Neil Maupay drilled his shot straight at Neil Etheridge.
The French striker made amends when he beat Cardiff's offside trap to slot in after being put through by Sergi Canos in the fifth minute.
Dean Smith's men were in the ascendancy with Maupay and Ollie Watkins having shots blocked in the box in the ninth minute.
The Bluebirds then started to exert pressure of their own and Dan Bentley saved well to deny Callum Paterson and Junior Hoilett.
Cardiff were not to be denied for much longer - on 25 minutes, Sol Bamba hit a 20-yard stunner that gave Bentley no chance.
Neil Warnock's men snatched another when Paterson converted a low Hoilett cross from the left flank, after an error from Josh Clarke, in first half stoppage time.
Brentford came out fighting in the second half and had a penalty shout denied by the ref when Bamba appeared to check the run of Maupay.
But it was Cardiff who struck again through Kenneth Zohore, who took advantage of sleepy Bees defending to poke home on 58 minutes.
The Bluebirds nearly grabbed another in the 65th minute when Zohore's looping header forced Bentley into an acrobatic save.
Brentford had chances to reduce the deficit but let Cardiff off the hook in the 83rd minute when John Egan fired wide from five yards and that was all she wrote.
Below is how the Brentford players rated
Dan Bentley - Consistently denied Cardiff with good saves throughout but there was not much he could do about their goals. 7
Josh Clarke - Lost out to a charging Hoilett for Cardiff's second goal but offered a threat out wide. 5
John Egan - Put under real pressure by waves of Cardiff attacks and guilty of missing a real chance in the late stages. 6
Chris Mepham - The most assured defender for the Bees and also got himself forward into some decent positions. 7
Yoann Barbet - Struggled against Cardiff's aggressive pressing and spurned a good chance to shoot while in space late on. 5
Ryan Woods - Battled well to mix it with Cardiff's midfield and can feel aggrieved at some rough treatment. 6
Nico Yennaris - Did not have much impact on the game before being subbed off in the second half. 5
Romaine Sawyers - Cultured performance in the middle of the park but couldn't inspire his team to victory. 7
Ollie Watkins - Marked well by Cardiff and couldn't provide the attacking spark to lift Brentford. 6
Neal Maupay - Finished with one goal, perhaps should have grabbed another but well-marshalled by the likes of Bamba. 6
Sergi Canos - Frequently found space in the first half but quiet in the second before being subbed. 6
Lewis Macleod - Came on with the game already lost and did not have enough time to influence proceedings. 6
Emiliano Marcondes - Brought on to bolster attacking options but dealt with well by Cardiff. 6
Alan Judge - Late sub that had no time to change matters. 6