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-4.1 Nano

openai/gpt-4.1-nano
TextInput: image · text · fileTools1MAdded Apr 14, 2025

Try OpenAI: GPT-4.1 Nano 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-4.1 Nano at a glance

  • Input price is 78% lower than the median of 434 Text models.
  • Context window of 1,047,576 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.00105.

About OpenAI: GPT-4.1 Nano

GPT-4.1 Nano is a text model from OpenAI, part of the GPT-4.1 series. OpenAI positions it as the smallest and fastest member of that family, aimed at tasks where low latency matters. It was released by the provider on 14 April 2025, and its knowledge cutoff is 30 June 2024, so anything after that date is outside what it learned during training.

The model accepts text, images and files as input, and returns text only. Its context window is 1,047,576 tokens, which is large enough to hold very long documents, whole codebases or extended conversation histories in a single request. Output is capped at 32,768 tokens per response. Because input can include images and files alongside text, you can send a mix of formats in one call rather than converting everything to plain text first.

Those capabilities point to a fairly specific set of uses. Long-context work such as summarising or querying large documents, searching across a big corpus, and extracting structured data from mixed text and image inputs all fit within the window and the supported input types. The model also supports tool calling, so it can drive function calls and simple agent loops. Its low latency makes it a reasonable choice for interactive features where a user is waiting on the response, and for high-volume background jobs where you want fast turnaround on each item.

You call it through api14's OpenAI-compatible API using the model id "openai/gpt-4.1-nano", which means existing OpenAI SDKs and clients work with only a base URL and key change. The request parameters it supports are max_completion_tokens, max_tokens, response_format, seed, structured_outputs, temperature, tool_choice, tools and top_p. In practice that covers output length control, deterministic sampling via seed, JSON and structured output modes, sampling controls, and tool or function calling with a choice of how tools are selected.

Two limits are worth keeping in mind when you decide. Output stops at 32,768 tokens, so tasks that need a very long single response may not fit, and the knowledge cutoff of 30 June 2024 means the model has no built-in awareness of later events. If your work depends on either of those, a different model in the series may suit you better.

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

Supported parameters

max_completion_tokensmax_tokensresponse_formatseedstructured_outputstemperaturetool_choicetoolstop_p

Specifications

Context length
1,047,576
Max output
32,768
Input
image, text, file
Output
text
Knowledge cutoff
2024-06-30

Requests on api14 · last 7 days

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

OpenAI: GPT-4.1 Nano: frequently asked questions

How much does the OpenAI: GPT-4.1 Nano API cost?
OpenAI: GPT-4.1 Nano costs Input $0.35 / 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-4.1 Nano?
OpenAI: GPT-4.1 Nano reads up to 1,047,576 tokens per request: prompt, history and documents together. It writes up to 32,768 output tokens per response.
What can OpenAI: GPT-4.1 Nano do?
OpenAI: GPT-4.1 Nano accepts image, text, file and returns text. It supports tool calling, structured JSON output.
How do I call OpenAI: GPT-4.1 Nano from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-4.1-nano". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to OpenAI: GPT-4.1 Nano?
Comparable Text models at a similar price: ByteDance Seed: Seed-2.0-Mini, Google: Gemini 2.5 Flash Lite, Z.ai: GLM 4.7 Flash. Each runs through the same API key, so switching is one string.

OpenAI: GPT-4.1 Nano community

New topic

This community has no topics yet. Open the first one about OpenAI: GPT-4.1 Nano.