Skip to main content
Before you begin, make sure you have an OpenAI account and have configured your API key.
Set your API key in the environment to authenticate requests:
Once in your account, click Playground in the top navigation to access the interface.

Playground Interface Overview

The Playground is organized into three main sections:
  • Getting Started panel (left): Usage guidelines, best practices, and limitations.
  • Presets toolbar (top): Quickly load common tasks like Classification, Chat, and more.
  • Editor & Controls (center and right): Write prompts and adjust parameters such as temperature and max_tokens.

Classification Preset: Company Category Labeling

Select the Classification preset to label items by category. By default, you’ll see examples like Apple, Facebook, and FedEx. Let’s classify “Apple”:
The image shows the OpenAI API Playground interface with a classification task, categorizing companies like Apple under "Technology."
It correctly labels Apple as a technology company. Below the editor, click View Code to examine the underlying API request in languages such as Python, Node.js, or raw JSON. For example, here’s the Python snippet:

Experimenting with Models & Parameters

Beyond presets, the Playground lets you switch between models—such as text-davinci-003 and gpt-3.5-turbo—and fine-tune parameters. Hover over any label to view its description and experiment to see how changes affect output.
Adjusting parameters like max_tokens and temperature directly impacts response quality, token usage, and billing. Monitor your usage in the OpenAI Dashboard.

Modes Overview

The Playground offers four modes to suit different tasks:

1. Complete Mode

In Complete mode, you get free-form text completions. For instance, ask for a tagline:
Click Submit, and you might see:
The Right Bike for Any Ride!
The image shows the OpenAI API Playground interface with a prompt to write a tagline for an online bicycle shop, resulting in the suggestion: "The Right Bike For Any Ride!"

2. Chat Mode

Switch to Chat to leverage conversational models like GPT-3.5 Turbo. For example, role-play a history professor:
  • System prompt: “You are an expert in world history.”
  • User prompt: “When did America become independent?”
Submit to receive a detailed response:
The image shows the OpenAI API Playground interface with a chat interaction about when America became independent. The assistant provides a detailed response about the Declaration of Independence and the Treaty of Paris.

3. Insert Mode

Use Insert mode to tell the model where to fill in text. Example:
Submit to generate a complete email section:
The image shows the OpenAI API Playground interface with a text completion task. The left side contains instructions, while the right side displays a text prompt and its AI-generated completion.

4. Edit Mode

In Edit mode, paste existing text and ask the model to improve or correct it:
After submission, you’ll receive a polished version:
The image shows the OpenAI API Playground interface with a text input about a movie theater visit, and a corrected version of the text on the right. The instruction given is to fix grammar mistakes.

You now have an overview of the OpenAI Playground’s presets, models, modes, and parameter controls. Continue experimenting to uncover best practices and optimize your prompts.

Further Reading

Watch Video