Kanye West I Gave Ray J a Heads Up I Rapped About Him Hitting Kim First

EXCLUSIVE

0210-kanye-kim-ray-tmz-01

Kanye West mocked Ray J during his album release concert Thursday -- about both of them having sex with Kim Kardashian -- but we've learned Kanye called Ray ahead of time to squash any beef.

In one of the tracks, Kanye rapped, "Me and Ray J would probably be friends if we wasn't in love with the same bitch ... you might have hit it first, but I'm rich, though."

The kinder, gentler Kanye must have realized Ray could have taken it badly and launched an attack, so Kim's hubby launched his preemptive strike.

We're told Kanye ran into Brandy and they talked face-to-face, he asked her to tell her brother he meant no harm or disrespect by the lyrics ... he said is was pure fun and he was not talking trash about Ray J's bank account.

In addition, Kanye's rep contacted Ray J's manager, David Weintraub, to reaffirm the message.

As for how Ray J received it, we're told he's cool with both Kanye and Kim and appreciates Kanye reaching out.  

Our Ray J sources say he also wants to make something very clear ... he's also very rich and currently has 4 TV shows on the air.