ChatGPT API will soon have an API (sign up for the waitlist to try it early). So far people are resorting to using GPT-3 API from OpenAI Playground - the model works similarly good but is slightly different.