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-5.1-Codex-Mini

openai/gpt-5.1-codex-mini
TextInput: image · textToolsReasoning400KAdded Nov 13, 2025

Try OpenAI: GPT-5.1-Codex-Mini 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-5.1-Codex-Mini at a glance

  • Input price is 44% lower than the median of 434 Text models.
  • Context window of 400,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.
  • Supports reasoning effort control.
  • Accepts images as input (vision).
  • A typical request (1,000 input / 500 output tokens) costs about $0.00438.

About OpenAI: GPT-5.1-Codex-Mini

GPT-5.1-Codex-Mini is a text model from OpenAI, released on 13 November 2025. It is a smaller and faster version of GPT-5.1-Codex, positioned within the GPT-5.1 family of coding-focused models. The provider description frames it as the lighter sibling of the full Codex model, which is the main thing to keep in mind when deciding between the two.

The model accepts image and text input and returns text output. It has a context window of 400,000 tokens and a maximum output of 128,000 tokens, so it can hold very large inputs (long source files, multiple files, or extended transcripts) while still producing substantial responses. Supported request parameters include reasoning controls (reasoning, reasoning_effort, include_reasoning), max_completion_tokens, response_format, structured_outputs, seed, tool_choice, tools, and verbosity.

Those capabilities point to code-centric work: reading and reasoning over large repositories or long files, generating or refactoring code, answering questions about an existing codebase, and handling tasks where an image is part of the input, such as a screenshot of an interface, a diagram, or an error. Because tools and tool_choice are supported, it can also drive function calling and agent-style workflows, and structured_outputs plus response_format make it suitable when you need responses in a fixed schema rather than free text. The reasoning parameters let you trade latency for more deliberate problem solving on harder tasks.

You call it through api14's OpenAI-compatible API using the model id "openai/gpt-5.1-codex-mini". Because the endpoint follows the OpenAI chat completions format, existing OpenAI SDKs and clients work with only a base URL and key change. In the request you can set any of the supported parameters listed above, including tools and tool_choice for function calling, response_format or structured_outputs for schema-constrained output, seed for more reproducible sampling, and reasoning_effort or verbosity to steer how much internal reasoning and how much output detail you get.

The main trade-off is that this is the mini variant: it is built to be smaller and faster than GPT-5.1-Codex, so for the most demanding coding or reasoning tasks the full model may be the better fit, while the mini version suits high-volume or latency-sensitive work. It is also text-output only, so if you need generated images or audio, this model is not the right choice.

How to call the OpenAI: GPT-5.1-Codex-Mini 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-5.1-codex-mini".
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-5.1-codex-mini",
  "messages": [
    {
      "role": "user",
      "content": "Explain vector databases in two sentences."
    }
  ]
});
console.log(result.choices[0].message.content);

Supported parameters

include_reasoningmax_completion_tokensreasoningreasoning_effortresponse_formatseedstructured_outputstool_choicetoolsverbosity

Specifications

Context length
400,000
Max output
128,000
Input
image, text
Output
text

Requests on api14 · last 7 days

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

OpenAI: GPT-5.1-Codex-Mini: frequently asked questions

How much does the OpenAI: GPT-5.1-Codex-Mini API cost?
OpenAI: GPT-5.1-Codex-Mini costs Input $0.88 / 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-5.1-Codex-Mini?
OpenAI: GPT-5.1-Codex-Mini reads up to 400,000 tokens per request: prompt, history and documents together. It writes up to 128,000 output tokens per response.
What can OpenAI: GPT-5.1-Codex-Mini do?
OpenAI: GPT-5.1-Codex-Mini accepts image, text and returns text. It supports tool calling, structured JSON output, reasoning effort control.
How do I call OpenAI: GPT-5.1-Codex-Mini from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-5.1-codex-mini". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to OpenAI: GPT-5.1-Codex-Mini?
Comparable Text models at a similar price: Google: Gemini 3.8 Flash (batch), Google: Gemini 3.7 Flash (batch), Google: Gemini 3.6 Flash (batch). Each runs through the same API key, so switching is one string.

OpenAI: GPT-5.1-Codex-Mini community

New topic

This community has no topics yet. Open the first one about OpenAI: GPT-5.1-Codex-Mini.