They are pronounced the same in speech, so no differences there. But in writing, you will only see OK in unproffessional settings. Text, emails to close associates/ friends, etc. Otherwise, default to okay to be safe.
OK was the original BTW (by the way) before the internet and texting began abbreviating everything