Home » OpenAI’s GPT-4 Is Now Accessible To All Paying API Customers | by Jim Clyde Monge | Jul, 2023

OpenAI’s GPT-4 Is Now Accessible To All Paying API Customers | by Jim Clyde Monge | Jul, 2023

by Narnia
0 comment
ChatGPT Photo by Mojahid Mottakin on Unsplash. Medium article cover by Jim Clyde Monge
Photo by Mojahid Mottakin on Unsplash

Today all present API builders with a historical past of profitable funds can entry the GPT-4 API with 8K context. — OpenAI

This implies that the hundreds of thousands of builders who’ve signed up for the GPT-4 API, myself included, are gaining entry beginning in the present day. OpenAI has additionally said in a current weblog put up that new builders will probably be granted entry by the tip of July 2023.

What is GPT-4 API?

GPT-4 stands as essentially the most highly effective giant language mannequin (LLM) developed by OpenAI to this point.

Unlike its predecessor, GPT-3.5, which solely accepted textual content, GPT-4 can generate textual content, together with code, and settle for each picture and textual content inputs. It performs at a “human stage” on varied skilled and educational benchmarks.

OpenAI models
OpenAI fashions

As with earlier GPT fashions from OpenAI, GPT-4 was educated utilizing publicly accessible knowledge, together with knowledge from public internet pages, and knowledge licensed by OpenAI.

How To Try GPT-4

If you’re a paying buyer of the OpenAI APIs, you need to now see a brand new possibility for “gpt-4” below the listing of Models in Chat Mode.

OpenAI Playground
OpenAI Playground

You also can name the API inside your code. Here’s an instance:

import openai

openai.ChatCompletion.create(
mannequin="gpt-4-32k",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "How do I get started with GPT-4?"},
{"role": "assistant", "content": "You can get started with GPT-4 by signing up for an OpenAI account and requesting an API key. Once you have an API key, you can use the GPT-4 API to generate text, translate languages, and answer questions."},
{"role": "user", "content": "Thanks for the help! I'll check it out."}
]
)

This API name will use the GPT-4 32K mannequin to generate a chat dialog between a person and a useful assistant.

  • The dialog will begin with the assistant greeting the person after which asking how they can assist.
  • The person will then ask learn how to get began with GPT-4, and the assistant will present directions on how to take action.
  • The dialog will finish with the person thanking the assistant for his or her assist.

To execute these API calls, it’s essential create an OpenAI account and request an API key. Once you’ve gotten an API key, you may set up the OpenAI Python library and run the aforementioned code.

Note: There are a number of GPT-4 fashions that you may select from

At current, there are 4 GPT-4 fashions accessible. Here’s a comparability chart:

OpenAI model max tokens
OpenAI mannequin max tokens

If you’re eager about studying learn how to arrange a improvement atmosphere, hyperlink your OpenAI keys, and use the OpenAI APIs, let me know within the feedback. I’d be completely satisfied to create a complete information.

GPT-4 API Pricing

The pricing is dependent upon the variety of tokens used each within the enter and output of the AI mannequin.

GPT-4 API pricing
GPT-4 API pricing

Tokens may be regarded as the constructing blocks of phrases used for pure language processing. In English textual content, one token approximates 4 characters or 0.75 phrases.

For occasion, the collected works of Shakespeare include round 900,000 phrases or 1.2 million tokens.

You may also like

Leave a Comment