gpt-4.1-mini
OpenAI logo

GPT 4.1 Mini

gpt-4.1-mini
OpenAI
Lightweight, high-performance model with million-token context and near-flagship-level encoding and image understanding capabilities, while reducing costs by 83%. It is suitable for rapid development and small to medium-sized applications. The automatic caching mechanism provides a 75% cost reduction on cache hits.

Pricing

PricingCache ReadImage GenerationWeb Search
$0.400$1.600
$0.1/M tokens-$0.025/request

Input Modalities

  • Text
  • Vision

Output Modalities

  • Text

Capabilities

  • Tools
  • Tool calling
  • Structured outputs
  • Long context

Try this model

Python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AIHUBMIX_API_KEY"],
    base_url="https://aihubmix.com/v1",
)

response = client.chat.completions.create(
    model="gpt-4.1-mini",
    messages=[
      {
        "role": "user",
        "content": "Hello, how are you?"
      }
    ],
    max_tokens=1024,
    stream=False,
)

print(response.choices[0].message.content)

Frequently asked questions

What is gpt-4.1-mini?

Lightweight, high-performance model with million-token context and near-flagship-level encoding and image understanding capabilities, while reducing costs by 83%. It is suitable for rapid development and small to medium-sized applications. The automatic caching mechanism provides a 75% cost reduction on cache hits.