OpenAI
Learn when to choose OpenAI, what capabilities it covers well, and how to set it up for text, image, speech, transcription, and embeddings.
OpenAI is one of the broadest general-purpose providers in the current AI ecosystem. It is often the simplest starting point when you want one provider that can cover chat, reasoning, vision, speech, transcription, embeddings, and image generation.
That breadth makes OpenAI especially useful for teams that want to move quickly without stitching together several providers on day one.

Why choose OpenAI
OpenAI is usually the default pick when teams want strong coverage across multiple AI capabilities, mature tooling, and a straightforward path from prototype to production.
Broad modality support
OpenAI is relevant across text generation, image generation, transcription, speech, embeddings, tool calling, and multimodal apps.
Strong fit for product teams
It is a practical choice when you want fewer moving parts and a single provider to support many product experiments.
Best companion pages
See Generating text, Image generation, Embeddings, Speech, and Transcription.
Setup
Getting started with OpenAI is straightforward. In most projects, setup is mainly about generating a key, storing it in your environment, and choosing the right model for each task.
Create an API key in the OpenAI API dashboard.
Add it to your environment:
OPENAI_API_KEY=your-api-keyUse the OpenAI provider through the AI SDK and choose the right model for the capability you are building.
Best fit
OpenAI is most compelling when you want one provider that can support multiple product surfaces without switching ecosystems every time the feature changes.
Chat and text generation
Strong fit for assistants, copilots, drafting, summarization, structured output, and many tool-using workflows.
Embeddings and retrieval
A practical choice for RAG, semantic search, clustering, and relevance-based workflows.
Speech and transcription
Useful when you want text-to-speech or speech-to-text inside the same broader AI stack.
Image generation
Relevant when your product needs prompt-to-image flows in the same provider ecosystem as text and audio.
AI SDK example
This example shows the simplest OpenAI text-generation shape through the AI SDK. The same provider can then extend into images, embeddings, or audio depending on the feature.
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
const { text } = await generateText({
model: openai("gpt-5"),
prompt: "Write a short product description for an AI meeting assistant.",
});The main lesson is not the exact model name. It is that OpenAI is often chosen when a team wants one provider to support several product directions.
Related documentation
OpenAI appears across several capability pages because it spans more than one mode of interaction. These are the best follow-up pages if you want to explore actual product patterns.
Chat
A natural place to use OpenAI for general-purpose text generation and tool-based workflows.
Image playground
See how image generation fits into a full prompt-to-image product flow.
Text to Speech
See where OpenAI-style speech generation sits alongside a dedicated audio provider strategy.
Voice
See how real-time voice experiences differ from simple text-to-speech or transcription.
When to compare alternatives
OpenAI is broad, but that does not mean it is always the best fit. In some products, a more specialized or cheaper provider may be the better starting point.
| If you care most about... | You may also want to compare |
|---|---|
| Claude-style writing and assistant behavior | Anthropic |
| Gemini and Google multimodal workflows | Google AI |
| Open-source image ecosystem access | Replicate |
| Dedicated voice and audio workflows | ElevenLabs |
Learn more
These are the most useful next references if you want to move from provider overview to implementation details.
How is this guide?
Last updated on
AI providers
Compare the main AI providers in the stack, understand what each is best at, and choose the right model platform for your product.
Google AI
Learn when Google AI is a strong fit, how Gemini fits into modern AI products, and where Google works especially well for multimodal and retrieval-heavy workflows.