Yes, ChatGPT has an API provided by OpenAI. Similarly, GPT-4 has an API version that you can sign up to the waitlist for.