Advanced Calculator for GPT API Usage

To use the URL AI Summarizer integration with Google Sheets or the GPT API Integration for Google Sheets, you’ll need your own API.

Let’s calculate how much your project will cost you.

GPT 3.5 Turbo
GPT 4

How many articles?

How many words per article?

How many prompts per article?

Complexity of your prompts?

 

How to use the GPT API calculator

  1. Begin by selecting your preferred AI model. Click on the checkbox that corresponds to either GPT 3.5 Turbo or GPT 4.
  2. Enter the number of articles you’ll need. You can do this by simply typing it into the designated field. If you want to calculate the price per article, just enter 1.
  3. Identify and select your preferred word count per article. Click on the dropdown menu and choose from
    Thin: 500 words,
    Medium: 1000 words
    Long: 2000 words
    Very long: 3500 words
  4. Select the number of prompts used per article. On the dropdown menu, select from 1, 3, 5, 7, 10, or 15.
    How many prompts do you use per article to craft your articles? This could also correspond to how many sections are there in your articles,
  5. Choose the complexity of your prompts. Choose what best describes your prompts from ‘Simple,’ ‘Normal,’ or ‘Complex.’ This corresponds to input tokens of 40, 125, and 200 respectively.
    Simple is one or two sentences and one short data point.
    Normal is several sentences and one to two data points.
    Complex is several sentences and a long data point.
  6. After selecting all parameters, click on the ‘Submit’ button. The calculator will begin to process based on the provided information.
  7. Wait for the calculator to return your estimate. It will display two numbers: The total expected cost for your project ($x in total), and the estimated cost per article ($x per article).

How the GPT API calculator works

This calculator’s algorithm works by first taking into account the per-token cost of the selected AI model. It then multiplies the number of prompts you selected by the complexity of your prompts to determine input costs. For the output costs, it multiplies the number of articles you entered by the selected word count per article. Finally, it calculates and displays the total price for your project.

How words are priced

Words are actually not priced. It’s tokens that are.

Tokens in a text or language processing context are essentially pieces or units of a given text that an API processes. A token can be thought of as a word, but it’s not always exactly equal to one distinct word. Tokens can range from sub-words to whole phrases, including trailing spaces, and differ based on the language.

The division of text into tokens depends on a few factors:

  1. The specific language of the text.
  2. The context in which a word or phrase is used.
  3. The structure of the text.
  4. The particular natural language processing model being used.

Tokens are counted in a multitude of ways, but here are some rough estimations for understanding:

  • 1 token is about 4 characters in English.
  • 100 tokens are approximately equal to 75 words.
  • 1 token is about equal to ¾ of a word

In more exact terms:

  • A sentence of 1-2 phrases is about 30 tokens.
  • A paragraph is generally around 100 tokens.
  • A text of 1,500 words consists of approximately 2048 tokens.

Some real-life example:

  • Wayne Gretzky’s quote “You miss 100% of the shots you don’t take” contains 11 tokens.

When using GPT API or any AI API for that matter, be aware of token limits. For instance, requests can use up to 4097 tokens shared between prompt and completion. The number of tokens you use can also affect the cost because API requests are typically priced per token, with prices depending on the model used.