The Manchester City boss blamed a lack of concentration after watching his side fall to defeat in Wales and admitted that the hosts made it hard for his men
Pellegrini's men – who started the season in style with a 4-0 thrashing of Newcastle United on Monday – were brought back down to earth in Wales by a fired-up Cardiff side.
Edin Dzeko put City in front in the 52nd minute, but Aron Gunnarsson levelled eight minutes later for Cardiff before Fraizer Campbell headed in two corners to seal a 3-2 victory, despite Alvaro Negredo's late consolation.
When quizzed if his defence could have done better, Pellegrini told Sky Sports: "Of course. Nobody believes they can score two goals against us in a set-piece.
"You must be concentrating on those sort of plays. We scored two goals but the game was decided by two corners."
Pellegrini did acknowledge Cardiff made life tough for his side, but felt the visitors were too subdued in the first half before their defensive mishaps after the break.
"I think we played against a very difficult team," he said. "Cardiff had 10 players near their own box and it was very difficult for us to score.
"I think we didn't play well. We played a little slowly in the first half. When we scored our first goal, I think we could do better after that."
Pellegrini also rejected suggestions he would rush into the transfer window to bolster his defensive options.
Manchester City are currently without captain Vincent Kompany, who is set to miss the next four weeks with a groin injury but Pellegrini refused to Javi Garcia, who replaced the Belgian, for the surprise loss.
"No, no, no. I don't think that [Garcia] was the problem," he added.
"Cardiff is a very difficult team, playing [on the] counter attack. It was just two corners that decided the game."