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-mini (2024-07-18)

openai/gpt-4o-mini-2024-07-18
TextInput: text · image · fileTools128KAdded Jul 18, 2024

Try OpenAI: GPT-4o-mini (2024-07-18) now

Runs on your balance at the prices above. New accounts start with free usage.

One API. Every model.

5 of 5 free messages left today. A free account adds free usage and an API key.Create free accountSign in

Session cost $0.00

OpenAI: GPT-4o-mini (2024-07-18) at a glance

  • Input price is 67% lower 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.00158.

About OpenAI: GPT-4o-mini (2024-07-18)

GPT-4o-mini (2024-07-18) is a text generation model from OpenAI, released on 18 July 2024. It sits in OpenAI's small model line, positioned by the provider as its most advanced small model and the successor to GPT-4 Omni in that tier. The versioned model id pins the snapshot to 2024-07-18, so behaviour stays consistent across calls rather than shifting with a floating alias.

The model accepts text, images and files as input and returns text only. It has a context window of 128,000 tokens and can produce up to 16,384 output tokens in a single response. Its knowledge cutoff is 31 October 2023, so anything after that date has to come from the prompt, from files you supply, or from a search tool. Because image input is supported, you can pass screenshots, scanned pages or diagrams alongside text instructions and get a text answer back.

Those capabilities suit a range of everyday developer tasks. Document and file input works well for summarisation, extraction and question answering over contracts, reports or PDFs, while image input covers reading charts, receipts, UI screenshots and photographed text. The 128k context lets you send long transcripts, codebases or multi-document bundles without chunking them first. Tool calling and structured outputs make it a reasonable choice for agents, function routing and pipelines that need JSON shaped to a schema, and the seed, temperature and penalty parameters give you control over how deterministic or varied the output is.

You call it through api14's OpenAI-compatible API using the model id "openai/gpt-4o-mini-2024-07-18". Because the interface follows the OpenAI chat completions shape, existing OpenAI SDKs and clients work with a base URL change. The request parameters it supports are frequency_penalty, logit_bias, logprobs, max_tokens, prediction, presence_penalty, response_format, seed, stop, structured_outputs, temperature, tool_choice, tools, top_logprobs, top_p and web_search_options. That covers sampling controls, token limits, stop sequences, log probability inspection, JSON and schema-constrained output, tool definitions and forced tool selection, and web search options.

Two constraints are worth noting before you commit. Output is text only, so if you need generated images, audio or embeddings, this model is not the fit. The knowledge cutoff of 31 October 2023 means time-sensitive questions need retrieval, file input or web search options rather than relying on the model's own knowledge. And the 16,384 token output ceiling bounds how long a single response can be, which matters for long-form generation tasks.

How to call the OpenAI: GPT-4o-mini (2024-07-18) API

  1. Create an API key in your dashboard.
  2. Install the official openai SDK for your language.
  3. Set baseURL to https://api14.com/api/v1 and model to "openai/gpt-4o-mini-2024-07-18".
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-mini-2024-07-18",
  "messages": [
    {
      "role": "user",
      "content": "Explain vector databases in two sentences."
    }
  ]
});
console.log(result.choices[0].message.content);

Supported parameters

frequency_penaltylogit_biaslogprobsmax_tokenspredictionpresence_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_logprobstop_pweb_search_options

Specifications

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

10-1710-1810-1910-2010-2110-2210-23

OpenAI: GPT-4o-mini (2024-07-18): frequently asked questions

How much does the OpenAI: GPT-4o-mini (2024-07-18) API cost?
OpenAI: GPT-4o-mini (2024-07-18) costs Input $0.52 / 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-mini (2024-07-18)?
OpenAI: GPT-4o-mini (2024-07-18) 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-mini (2024-07-18) do?
OpenAI: GPT-4o-mini (2024-07-18) accepts text, image, file and returns text. It supports tool calling, structured JSON output.
How do I call OpenAI: GPT-4o-mini (2024-07-18) from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-4o-mini-2024-07-18". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to OpenAI: GPT-4o-mini (2024-07-18)?
Comparable Text models at a similar price: MiniMax: MiniMax M3.1 Flash, DeepSeek: DeepSeek V4.1 Flash 1017, LiquidAI: LFM2.5-24B-A2B. Each runs through the same API key, so switching is one string.

OpenAI: GPT-4o-mini (2024-07-18) community

New topic

This community has no topics yet. Open the first one about OpenAI: GPT-4o-mini (2024-07-18).