Primary navigation

Legacy APIs

UI Kit Demo

UI Kit Demo

DocsTip

Use DocsTip for helpful callouts inside guides or references.

DocsMarkdownContent

DocsMarkdownContent

Use Markdown content here to validate styles and link handling.

  • Bullet one
  • Bullet two

Internal link and external link.

ContentModeSwitch

Responses sample
curl https://api.openai.com/v1/responses \
  -H "Authorization: Bearer $OPENAI_API_KEY"

CodeSample

Examples
1
2
3
4
5
6
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

const response = await client.responses.create({
  model: "gpt-4.1-mini",
  input: "Say hello",
});
Examples
1
2
3
4
5
6
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

const response = await client.responses.create({
  model: "gpt-4.1-mini",
  input: "Say hello",
});

hello

CodeSample

Examples
1
2
3
4
5
6
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

const response = await client.responses.create({
  model: "gpt-4.1-mini",
  input: "Say hello",
});
Examples
1
2
3
4
5
6
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

const response = await client.responses.create({
  model: "gpt-4.1-mini",
  input: "Say hello",
});

CodeComparison

Before
1
curl https://api.openai.com/v1/responses
After
1
curl https://api.openai.com/v1/responses

ContentSwitcher

Node SDK
1
2
3
import OpenAI from "openai";

const client = new OpenAI();

DeepDive

Deep dive
Why streaming matters

LatencyExample

Network
End user to API latency
Server
Time to process prompt tokens
Server
Time to sample/generate tokens
Network
API to end user latency

WaveformComponent

Expander

Image

OpenAI Open Graph

Icon

IconItem

Realtime quickstart
Launch a realtime session and inspect events.

GalleryDocs

Input 1Input 2Input 3Input 4
Result

CodeGallery

ImageGallery

VideoGallery