ChatGPT API Pricing Comparison

Ivan Campos
Sopmac Labs
4 min readMar 1, 2023

--

The ChatGPT API (gpt-3.5-turbo) has been launched by OpenAI at a cost that is 10x cheaper than their flagship language model (text-davinci-003).

The introduction of the ChatGPT API by OpenAI has led to significant cost savings for developers looking for advanced language models. With a price that is 10x cheaper (90% lower cost) than the text-davinci-003 model, developers must now evaluate the benefits of switching their workloads and prompts to the ChatGPT API.

The lower cost will make it more accessible for developers looking to incorporate natural language processing into their applications without breaking the bank.

However, the decision to shift to the ChatGPT API cannot be based on cost alone. Developers must evaluate whether the API can deliver comparable responses to their specific use cases. While the ChatGPT API is significantly cheaper, it may not offer the same level of performance/capabilities as the text-davinci-003 model. Therefore, developers must carefully assess their requirements and compare the features of each model before making a decision.

Nevertheless, the lower cost of the ChatGPT API is a compelling reason for many developers to explore its capabilities and consider it as a viable alternative to the more expensive language models.

ChatGPT Plus

While the ChatGPT API is an attractive option for developers looking for a more affordable language model, the elephant in the room is ChatGPT Plus pricing.

At $20 USD per month, it is significantly more expensive than the ChatGPT API. This raises questions about whether this pricing creates an arbitrage opportunity for developers.

It is uncertain if OpenAI will maintain the current pricing for ChatGPT Plus. In my opinion, it is likely that the pricing will be revised soon to narrow the gap between ChatGPT API and ChatGPT Plus. This move could help OpenAI to attract more customers while providing greater flexibility to developers who need advanced natural language processing capabilities. However, only time will tell how OpenAI chooses to position its pricing strategy in response to the market demand and competitive landscape.

For $20 worth of the ChatGPT API, you can process about 7.5 Million words — or the length of ~10 King James Bibles.

ChatGPT API Completion Differences

ChatML

When prompting with the ChatGPT API, your prompts must be submitted in the form of messages with a role (either ‘system’, ‘user’, or ‘assistant’) and the content of the message.

messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the super bowl in 1973?"},
{"role": "assistant", "content": "The Miami Dolphins won the Super Bowl in 1973."},
{"role": "user", "content": "Where was it played?"}
]

This new structured structured format is called Chat Markup Language (ChatML).

ChatGPT API Python Notebook

This code is using the OpenAI API to generate a chat completion. It creates a new chat completion session with the “gpt-3.5-turbo” language model, which is a variant of the GPT-3 model that is optimized for generating chatbot responses.

The “messages” parameter is a list of messages exchanged between the user and the chatbot. Each message is represented by a dictionary with two keys: “role”, which indicates whether the message was sent by the user or the chatbot, and “content”, which contains the text of the message. In this case, the user has asked two questions about the Super Bowl, and the chatbot has provided answers to both questions.

Once the session is created, the API will generate a response to the last message in the list (“Where was it played?”) based on the context of the conversation so far. The response will be returned as a new message in the same format as the messages in the input list.

For text completions, we parse the response text out of response[‘choices’][0][‘text'] ;however, in chat completions, we now parse response[‘choices’][0][‘message’][‘content’].

Conclusion

In short, the ChatGPT API is disrupting ChatGPT Plus. This strategic maneuver is critical to maintaining first mover advantage as many large competitors are expected to enter the LLM market in the coming months.

With lower prices for developers, we can expect a flood of new and exciting products that will be infused with commoditized Artificial Intelligence. Get ready for an explosion of innovation that will transform the technology landscape and bring AI within reach for even more businesses and individuals. This is an exciting time to be in the world of tech, as the possibilities are endless and the potential for growth is immense. Let’s see what the future holds for this rapidly evolving field and get ready to ride the wave of change that is coming our way.

References

--

--

Ivan Campos
Sopmac Labs

Exploring the potential of AI to revolutionize the way we live and work. Join me in discovering the future of tech