Fraizer Campbell scored two late headers from corners to earn Cardiff a famous victory and condemn Pellegrini to his first defeat in charge of Manchester City.
Pellegrini refused to blame the absence of Vincent Kompany and Matija Nastasic from his side's central defence as they failed to deal with Cardiff's threat from set-pieces.
"I think we played against a very difficult team - Cardiff had ten players near their own box it was very difficult for us to try and score but when we scored the first goal I thought we played a bit better after that," Pellegrini told Sky Sports 1 HD.
"Of course nobody can believe they can score two goals against us in set-pieces, but football is like that.
"You must be concentrating those kind of places and I think Cardiff won the match, but I think we played better."
Asked if City missed the presence of Kompany and Nastasic in central defence, Pellegrini said: "No I don't think that was the problem. I think the whole match Cardiff were a very difficult team playing on the counter attack and we didn't have any problem with that.
"It was just two balls in two corners that decided the game.
"I think we didn't play well, we play a little slowly in the first half. Cardiff had ten players near their box, we scored two goals and had other chances, but the game was decided by two corners."