The Swansea-based outfit led 16-6 at the interval thanks to James King’s early try and the boot of Matthew Morgan.
And they put the victory beyond doubt with further touchdowns from Richard Fussell and Morgan Allen.
Steve Tandy’s men dominated the opening exchanges and took the lead with Morgan’s first penalty.
Moments later they stretched their advantage as Joe Bearman and Kahn Fotuali’I combined to send King over in the corner.
Morgan added the extras and despite missing a second penalty he quickly made amends from the tee.
Sweeney hit back to reduce the deficit to 13-3 and exchanged further kicks at goal with Morgan.
Just two minutes into the second-half the Ospreys landed a decisive blow as Fussell collected Ross Jones’ kick ahead to score
Rhys Patchell slotted a pair of penalties as the Ospreys saw Sam Lewis sent to the sin-bin.
But the Blues also fell foul of the law and captain Josh Navidi was also shown yellow.
The Ospreys piled on the pressure in the closing stages and only a superb tackle from Lloyd Williams stopped Eli Walker from crossing the whitewash.
But the pressure eventually told and Allen powered over for a third try at the death.