Openai: gpt-4.1-mini
gpt-4.1-mini
Start building free
gpt-4.1-mini is an OpenAI language model in the GPT-4.1 family, designed as a lightweight, lower-cost, and faster variant compared with the larger GPT-4.1 models. It aims to deliver strong general-purpose capabilities—such as conversation, code assistance, content generation, and basic reasoning—while being optimized for high throughput and low latency in production applications. This tier is typically well-suited for chatbots, simple agents, tooling integration, and everyday developer use where responsiveness and cost efficiency matter more than maximum raw capability. It is generally positioned as a good default for many workloads that don’t require the full power of the largest frontier models.
Pricing
Current price per 1,000,000 tokens. Every request is billed automatically from its exact usage.
Included in plans
Statistics
Live performance and usage of this model, aggregated across all users.
Detailed statistics appear here as soon as this model starts receiving requests.
API
Call this model from any OpenAI-compatible client using your API token.
curl https://apiex.cloud/api/v1/chat/completions \
-H "Authorization: Bearer $NEW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1-mini",
"messages": [
{
"role": "user",
"content": "Explain quantum entanglement in one paragraph."
}
],
"temperature": 0.7
}'
Authentication
Every request must include an Authorization: Bearer <TOKEN> header. Generate a token from your account's API Keys page — its access to models is set automatically from your active plans and redeemed codes, and you can set its rate limit and IP restrictions.
| Parameter | Type | Description |
|---|---|---|
model | string, required | This model's ID, exactly as shown above. |
messages | array, required | Conversation history as role/content objects (system, user, assistant). |
temperature | number, optional | Sampling randomness, typically 0–2. |
max_tokens | integer, optional | Upper limit on tokens generated in the reply. |
top_p | number, optional | Nucleus-sampling threshold, as an alternative to temperature. |
stream | boolean, ignored | Responses are always returned in full so the exact cost can be billed; streaming is not available. |
Replace YOUR_API_KEY with a token from your account, then see the full API reference for every parameter.
Frequently asked questions
What is gpt-4.1-mini?
gpt-4.1-mini is an OpenAI language model in the GPT-4.1 family, designed as a lightweight, lower-cost, and faster variant compared with the larger GPT-4.1 models. It aims to deliver strong general-purpose capabilities—such as conversation, code assistance, content generation, and basic reasoning—while being optimized for high throughput and low latency in production applications. This tier is typically well-suited for chatbots, simple agents, tooling integration, and everyday developer use where responsiveness and cost efficiency matter more than maximum raw capability. It is generally positioned as a good default for many workloads that don’t require the full power of the largest frontier models.
How much does gpt-4.1-mini cost?
Input tokens are priced at $0,48 per 1,000,000 tokens and output tokens at $1,92 per 1,000,000 tokens. Pricing is billed automatically per request; no separate plan is required.
What is the context length of gpt-4.1-mini?
gpt-4.1-mini supports a context window of up to 1,047,576 tokens.
Does gpt-4.1-mini support image input?
Yes, gpt-4.1-mini accepts image input in addition to text.
Which provider is gpt-4.1-mini from?
gpt-4.1-mini is developed by Openai and made available on this gateway through our routing infrastructure.
When was gpt-4.1-mini added to this gateway?
gpt-4.1-mini has been available on this gateway since September 23, 2026.
Is gpt-4.1-mini currently available?
Yes, gpt-4.1-mini is active and can be used right now through this gateway.