Back to Models
openai logoOpenAI
gpt-4.1-nano

GPT-4.1 Nano

For tasks that demand low latency, GPT‑4.1 nano is the fastest and cheapest model in the GPT-4.1 series. It delivers exceptional performance at a small size with its 1 million token context window, and scores 80.1% on MMLU, 50.3% on GPQA, and 9.8% on Aider polyglot coding – even higher than GPT‑4o mini. It’s ideal for tasks like classification or autocompletion.

4/14/2025
1,047,576 tokens
Input: $0.11/M
Output: $0.44/M

Specifications

Modalities

Input
image
text
file
Output
text

Supported Parameters

max_tokens
response_format
seed
structured_outputs
temperature
tool_choice
tools
top_p

Max Output Tokens

32,768

Data policy

Prompt retention
May be retained
Training
Not used for training

Whether a provider trains on prompts is a declared value from our terms with them. Retention is determined from the upstream listing for every host this model can reach. Neither is guessed.

Measured performance

Time to first response (p50)741ms
Throughput (p50)220 tokens/s

    Measured through FastMetal's own gateway over the last 30 days (661 first-response samples).

    Throughput is sampled once a day: the median of 27 observations over the last 30 days.

    Time to first response is measured to the first streamed chunk; throughput counts all output tokens, including reasoning tokens. These are observations, not a performance guarantee.

    Code Examples

    curl https://api.fastmetal.ai/v1/chat/completions \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d '{
        "model": "gpt-4.1-nano",
        "messages": [{"role": "user", "content": "Hello!"}]
      }'

    How GPT-4.1 Nano actually answers

    Real responses to our standard prompts, recorded on FastMetal.

    Count the number of 'r's in 'strawberry'

    Count the number of 'r's in 'strawberry'. Explain your reasoning step by step.

    Let's analyze the word "strawberry" step by step to count the number of 'r's. 1. Write down the word: **strawberry** 2. Examine each letter one by one: - s: no - t: no - r: yes (first 'r') - a: no - w: no - b: no - e: no - r: yes (second 'r') - r: yes (third 'r') - y: no 3. Counting the 'r's found: - First 'r' (at position 3) - Second 'r' (at position 8) - Third 'r' (at position 9) So, there are **3** 'r's in "strawberry." **Final answer: 3**
    2.0s response183 output tokens

    Debug This Error

    I'm getting the following error in my Node.js application: TypeError: Cannot read properties of undefined (reading 'map') at UserList (/app/components/UserList.js:12:25) at renderWithHooks (/app/node_modules/rea…

    The error: ``` TypeError: Cannot read properties of undefined (reading 'map') ``` indicates that `users` is `undefined` at the time your `UserList` component is rendering, and you're trying to call `map` on it. ### Why is this happening? In React, if a prop (`users` in this case) is not provided or is undefined, trying to do `users.map(...)` causes this error. This can happen if: - The parent component does not pass `users`. - `users` might be `null` or `undefined` initially, especially if data fetching is involved. ### How to fix it **Option 1: Provide a default value for `users`** Ensure that `users` defaults to an empty array if it is not provided: ```jsx function UserList({ users…
    4.3s response514 output tokens

    Code Review

    Please review the following Python function and suggest improvements for readability, performance, and best practices: def get_data(url, retries=3): import requests import time for i in range(retries):…

    Here's a review and an improved version of your function: ### Key improvements: 1. **Move imports to the top**: Imports should generally be at the top of the file, not inside functions. 2. **Specify exception types**: Catch specific exceptions rather than a generic `except`. 3. **Use context managers if needed**: Not necessary here, but good to consider. 4. **Avoid repeated code**: The sleep statement is the same whether there is a request exception or a non-200 status. 5. **Simplify filtering**: Use list comprehensions for clarity. 6. **Improve variable names**: For readability. 7. **Add optional headers or parameters** if needed (not required here). 8. **Optional:** Add more descriptive e…
    3.4s response391 output tokens

    Compare these answers side by side with other models →

    Frequently asked questions

    How much does the GPT-4.1 Nano API cost?
    On FastMetal, GPT-4.1 Nano is billed per token: $0.11 per 1M input tokens and $0.44 per 1M output tokens on a US-dollar account, before tax. Usage is drawn from a prepaid balance; there is no subscription or monthly fee.
    Can I call GPT-4.1 Nano with the OpenAI SDK?
    Yes. Point base_url at https://api.fastmetal.ai/v1 and pass "gpt-4.1-nano" as the model; existing OpenAI-style code works unchanged, including streaming, tool calls and structured output.
    What is the context window of GPT-4.1 Nano?
    1,047,576 tokens, shared between the prompt and the response.
    What do I need to try GPT-4.1 Nano?
    Create an account and add credit; the model is then available both in the browser chat and over the API. There is no contract or minimum spend.

    Try GPT-4.1 Nano right now

    GPT-4.1 Nano is available on FastMetal through one API key. Start in the browser, or call it from the OpenAI SDK.