OpenAI developer platform
Developer quickstart
Make your first API request in minutes. Learn the basics of the OpenAI platform.
5 min
javascript
1 import OpenAI from "openai";
2 const client = new OpenAI();
3
4 const completion = await client.chat.completions.create({
5 model: "gpt-4o",
6 messages: [{
7 role: "user",
8 content: "Write a one-sentence bedtime story about a unicorn.",
9 }],
10 });
11
12 console.log(completion.choices[0].message.content);
Browse models View all
GPT-4.5 Preview o3-mini GPT-4o
Largest and most capable GPT Fast, flexible, intelligent reasoning Fast, intelligent, flexibl
model model model
Start building
Read and generate text Use a model's vision feature
Use the API to prompt a model and Allow models to see and analyze
generate text images in your application
Generate images as output Build apps with audio
Create artistic or design Analyze, transcribe, and generate
applications with DALL·E audio with API endpoints
Build agentic applications Achieve complex tasks with
Use the API to build agents that use reasoning
tools and computers Use reasoning models to carry out
complex tasks
Get structured data from Tailor to your use case
models Adjust our models to perform
Use Structured Outputs to get specifically for your use case with
model responses that adhere to a fine-tuning, evals, and distillation
JSON schema
Help center Developer forum
Frequently asked account and billing Discuss topics with other developers
questions
Cookbook Status
Open-source collection of examples and Check the status of OpenAI services
guides