We may earn compensation from some listings on this page. Learn More

OpenAI API Pricing Calculator

The page provides you with a pricing calculator for OpenAI GPT API. Select the Language Model, enter prompt length and Number of Words Per Answer you want.

A Context includes both the Prompt Length (Words) and Number of Words Per Answer.

OpenAI API Pricing Calculator

Table of Language Models with Price and Tokens

LANGUAGE MODELINPUT PROMPT PRICE PER 1K TOKENS (USD)OUTPUT RESPONSE PRICE PER 1K TOKENS (USD)
GPT-3.5-turbo 4K$0.0015$0.002
GPT-3.5-turbo 16K$0.003$0.004
GPT-4 8K$0.03$0.06
GPT-4 32K$0.06$0.12
Ada$0.0004$0.0004
Babbage$0.0005$0.0005
Curie$0.002$0.002
Davinci$0.02$0.02

How to Use the Calculator?

To determine the costs with the OpenAI API Pricing Calculator on the mlyearning platform, use these guidelines:

  1. Input the required information in the designated areas:
    • Prompt Word Count: Numbers of words in prompt:
    • Number of Words Per Answer you want as output
    • Chosen Language Model: Pick a suitable model from the given list, like GPT-3.5-turbo 4K or GPT-4 8K.
  2. Hit the “Calculate” option.

The tool will then provide a cost prediction for the OpenAI API based on the data you’ve entered.

What is Prompt Length?

Prompt length refers to the total count of words or characters used when feeding an initial input to the language model. This prompt sets the stage for the model, guiding it to yield relevant and structured replies. More detailed prompts can give clearer directions for the model’s response. However, a longer prompt means consuming more tokens, which can impact the cost when utilizing the API.

What are the Number of Words per Answer?

When we talk about the “Number of Words per Answer,” we mean the length or total words you want in the model’s generated response or answer. This allows users to decide the length of the reply from the API. Choosing for a greater word count will yield lengthier and more in-depth outputs. But remember, as the length grows, so does the token count and, consequently, the expense.

By making use of the OpenAI API Cost calculator, developers and enterprises can predict their API expenses. This tool considers prompt length, desired output length, and the chosen language model, facilitating efficient budget planning for OpenAI API integration.

FAQ

What is an OpenAI token?

A token is a unit of account for OpenAI.

What is an OpenAI execution?

When you send an invite to OpenAI and receive a reply from them, that’s called an OpenAI execution. For billing purposes, both the prompt and the response words are counted.

What is an OpenAI prompt?

A OpenAI prompt is essentially the question or set of instructions you send to OpenAI for a reply.

What is an OpenAI response?

In reaction to the prompt you sent, OpenAI gives a response.

For instance:

Prompt: “Write a tagline for an ice cream shop”
Response: “We serve up smiles with every scoop!”

Can I set an OpenAI billing limit?

To keep your expenses in check, you can adjust a billing threshold in the OpenAI billing settings.

How to monitor my OpenAI API usage and cost?

To check API usage, visit the OpenAI dashboard usage section. The OpenAI dashboard billing section allows you to effortlessly establish a spending cap.