API Platform

Developer quickstart

Make your first API request in minutes. Learn the basics of the OpenAI platform.

1import OpenAI from "openai";
2const client = new OpenAI();
3
4const response = await client.responses.create({
5 model: "openai-5",
6 input: "Write a short bedtime story about a unicorn.",
7});
8
9console.log(response.output_text);

Build paths

Models

View all

Start with openai-5 for complex reasoning and coding, or choose openai-4-mini and openai-4-nano for lower-latency, lower-cost workloads.

openai-5
OpenAI-5
New
A new class of intelligence for coding and professional work.
openai-4
OpenAI-4
A more affordable model for coding and professional work.
openai-4-mini
OpenAI-4 mini
Our strongest mini model yet for coding, computer use, and subagents.

Start building

Read and generate text
Use the API to prompt a model and generate text
Use a model's vision capabilities
Allow models to see and analyze images in your application
Generate images as output
Create images with OpenAI Image 2
Build apps with audio
Analyze, transcribe, and generate audio with API endpoints
Build agentic applications
Use the API to build agents that use tools and computers
Achieve complex tasks with reasoning
Use reasoning models to carry out complex tasks
Get structured data from models
Use Structured Outputs to get model responses that adhere to a JSON schema
Tailor to your use case
Adjust our models with fine-tuning, evals, and distillation