We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
OpenAI: GPT-4o
openai/gpt-4oTry OpenAI: GPT-4o now
Runs on your balance at the prices above. New accounts start with free usage.
One API. Every model.
Session cost $0.00
Settings
Advanced parameters
OpenAI: GPT-4o at a glance
- Input price is 456% higher than the median of 434 Text models.
- Context window of 128,000 tokens, enough for long documents and multi-turn conversations.
- Supports tool (function) calling for agents and integrations.
- Supports structured JSON output with a schema.
- Accepts images as input (vision).
- A typical request (1,000 input / 500 output tokens) costs about $0.03.
About OpenAI: GPT-4o
GPT-4o is a text generation model from OpenAI, identified on api14 as openai/gpt-4o. The name stands for "omni", reflecting that it accepts more than one kind of input. It was released by the provider on 13 May 2024 and sits in the text category, with a knowledge cutoff of 31 October 2023. If you have used GPT-4 Turbo, GPT-4o is positioned as maintaining that level of intelligence, so it is a reasonable default choice when you want a general purpose OpenAI model rather than a specialised one.
On input, the model accepts text, images and files, and it produces text only. That combination matters for tasks where the prompt is not just prose: a screenshot, a scanned page or an attached document can be sent alongside your instructions, and the model responds in text. The context window is 128,000 tokens, which is enough for long documents, multi turn conversations or large code files in a single request. Output is capped at 16,384 tokens per response, so very long generations need to be planned around that ceiling, for example by asking for sections in sequence.
The practical uses follow from those capabilities. Document question answering and summarisation work well when you attach a file or paste a long transcript and ask for specific answers. Image understanding supports tasks such as reading charts, describing screenshots, extracting text from photos or checking a UI mock against a specification. Because the model supports tools and structured outputs, it also fits agent style workflows and data extraction pipelines where the reply must conform to a schema. General chat, drafting, rewriting and code assistance are all within scope, and the long context makes it usable for repository level questions rather than single snippets.
You call it through api14's OpenAI-compatible API using the model id openai/gpt-4o, so existing OpenAI SDKs and clients work with only the base URL and key changed. The request parameters supported are frequency_penalty, logit_bias, logprobs, max_completion_tokens, max_tokens, prediction, presence_penalty, response_format, seed, stop, structured_outputs, temperature, tool_choice, tools, top_logprobs, top_p and web_search_options. In practice that covers sampling controls, deterministic-ish behaviour via seed, JSON and schema constrained output through response_format and structured_outputs, function calling through tools and tool_choice, token limits, and optional web search.
Two limits are worth keeping in mind when you choose. Output stops at 16,384 tokens, so if you need a single very long generation you may have to split the work or pick a model with a larger output allowance. The knowledge cutoff of 31 October 2023 means the model does not know later events on its own, which is where the web_search_options parameter or your own retrieved context becomes useful. If your task is purely text and does not benefit from image or file input, a smaller text only model may be cheaper and faster for the same job.
How to call the OpenAI: GPT-4o API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "openai/gpt-4o".
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "openai/gpt-4o",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
Supported parameters
frequency_penaltylogit_biaslogprobsmax_completion_tokensmax_tokenspredictionpresence_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_logprobstop_pweb_search_optionsSpecifications
- Context length
- 128,000
- Max output
- 16,384
- Input
- text, image, file
- Output
- text
- Knowledge cutoff
- 2023-10-31
Requests on api14 · last 7 days
OpenAI: GPT-4o: frequently asked questions
- How much does the OpenAI: GPT-4o API cost?
- OpenAI: GPT-4o costs Input $8.75 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of OpenAI: GPT-4o?
- OpenAI: GPT-4o reads up to 128,000 tokens per request: prompt, history and documents together. It writes up to 16,384 output tokens per response.
- What can OpenAI: GPT-4o do?
- OpenAI: GPT-4o accepts text, image, file and returns text. It supports tool calling, structured JSON output.
- How do I call OpenAI: GPT-4o from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-4o". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to OpenAI: GPT-4o?
- Comparable Text models at a similar price: Cohere: Command A, OpenAI: GPT-4o (2024-11-20), Cohere: Command R+ (08-2024). Each runs through the same API key, so switching is one string.
OpenAI: GPT-4o community
New topicThis community has no topics yet. Open the first one about OpenAI: GPT-4o.