OpenAI
GPT-4o API
GPT-4o ("omni") is OpenAI's flagship multimodal model. Strong text reasoning, native vision, fast inference, and excellent structured output / function calling support. The most widely-supported model in the OpenAI SDK ecosystem.
- Input
- $2.50
- Output
- $10.00
- Context
- 128K
- Vision
- Yes
/ 1M tokens
/ 1M tokens
tokens
Top use cases
- Multimodal apps (image + text input)
- Function calling and tool use
- Structured output / JSON mode
- General-purpose chat and assistants
- Drop-in replacement for older GPT-4
Use GPT-4o in 30 seconds
ModelServer is OpenAI-compatible. Point your existing OpenAI SDK at modelserver.dev/v1 and set the model name to gpt-4o.
gpt-4o.py
from openai import OpenAI
client = OpenAI(
api_key="sk-modelserver-...",
base_url="https://modelserver.dev/v1",
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "user", "content": "Hello, GPT-4o!"}
],
)
print(response.choices[0].message.content)Frequently asked questions
- How much does GPT-4o cost?
- GPT-4o is priced at $2.50 per 1M input tokens and $10.00 per 1M output tokens via ModelServer. ModelServer adds a flat 5.5% platform fee on top — no markups on individual tokens, no monthly minimum.
- What is the GPT-4o context window?
- GPT-4o supports a 128K token context window. You can put roughly 96,000 words in a single prompt.
- Is GPT-4o OpenAI-compatible via ModelServer?
- Yes. Point your OpenAI SDK base_url to https://modelserver.dev/v1 and set model="gpt-4o". Existing OpenAI-SDK code works without modification.
- Who is GPT-4o best for?
- Apps already built on the OpenAI SDK that need a strong default.
- Does GPT-4o support vision input?
- Yes. GPT-4o accepts image inputs alongside text. Pass images as base64 or URL in the OpenAI-compatible message format.