Tutorial

ChatGPT API tutorial

OpenAI released the new APIs for ChatGPT and Whisper models. This article is a tutorial to ChatGPT API and its Chat Markup Language (ChatML).

Teemu Maatta
5 min readMar 1, 2023

--

Photo by Christina @ wocintechchat.com on Unsplash

Introduction

ChatGPT¹ API is finally available. This tutorial will help you to get started. In case you want to check as well the Whisper API — I prepared as well a Whisper API tutorial.

The API is richer, than I expected — I believe it will transform the way of working in many industries.

The new API is priced:

  • $0.002 / 1K tokens.

Therefore, I consider it attractive price for many applications to replace the prior Completion model being 10x cheaper.

Traditional language models, like GPT-3, process sequence of text. Model takes this text as tokens.

ChatGPT processes instead sequence of text with metadata.

OpenAI has given this a name: Chat Markup Language (ChatML).

I will explain this more in detail in the next chapters.

ChatGPT API uses ”gpt-3.5-turbo”-model, which is most capable OpenAI model. It comes with 4096 token context window – 96…

--

--

Teemu Maatta
Teemu Maatta

Written by Teemu Maatta

Author (+200k views) in Artificial General Intelligence. Autonomous Agents. Robotics. Madrid.

Responses (3)