ChatGPT is not good with APIs he hasn't seen before but when you give it a working code snippet and tell him a rough idea you have in mind it gives good results. After that, it's just a friendly discussion telling him what went wrong.