OpenAI: GPT 4.1 Mini

gpt-4.1-mini

GPT 4.1 Mini costs $0.520 per million input tokens and $2.08 per million output tokens, supports 1.05M context, and is available through the OpenAI-compatible API.

Mid-sized GPT 4.1, comparable to GPT4o with a far higher context window, at lower cost and with higher speed.

Modalities

Text + Image → Text

Input / output price

$0.520 / $2.08 per 1M

Context

1.05M · max output 33K

Capabilities

VisionLong context

Pricing

Billed per token actually used and deducted from your credits.

ItemUSD per 1M tokens
Input$0.520
Output$2.08
Cached input$0.130

Calculator

Drag the sliders to estimate what this model will cost.

Per request
$0.00322
Per day
$1.61
Per month (30 days)
$48.36

GPT 4.1 Mini: input $0.52/M · output $2.08/M · cached input $0.13/M

Request with these settings
curl https://api.geniusrelaygpt.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4.1-mini", "max_tokens": 800,
       "messages": [{"role": "user", "content": "…"}]}'

Code samples

OpenAI-compatible. Set the base URL to https://api.geniusrelaygpt.com/v1 and the model to gpt-4.1-mini.

curl https://api.geniusrelaygpt.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4.1-mini",
    "stream": true,
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Use it in a client: Cursor · Cline · SillyTavern · Codex

Parameters

Common OpenAI parameters can be passed as-is.

temperaturetop_pmax_tokensstreamstoppresence_penaltyfrequency_penaltyseed

FAQ

How is GPT 4.1 Mini billed?
Input is $0.520 and output is $2.08 per million tokens; cached input is $0.130. The charge for every request is listed in Usage Logs in the console.
How long is the context window?
1.05M tokens. In a long conversation every turn is billed for the full input, so keep the history under control.
Does it support streaming?
Yes. Add "stream": true to the request to receive server-sent events in the OpenAI format.
GPT 4.1 Mini API pricing · GeniusRelay