OpenAI
OpenAI

GPT 4.1 Mini

openai/gpt-4.1-mini

GPT 4.1 mini provides a balance between intelligence, speed, and cost that makes it an attractive model for many use cases.

Capability

Vision Support

Tools

Function Calling

Context Window

1,047,576

Max Output Tokens

32,768

Using GPT 4.1 Mini with Python API

Using GPT 4.1 Mini with OpenAI compatible API

import openai

client = openai.Client(
  api_key= '{your_api_key}',
  base_url="https://api.model.box/v1",
)
response = client.chat.completions.create(
model="openai/gpt-4.1-mini",
messages: [
  {
    role: 'user',
    content:
      'introduce your self',
    },
  ]
)
print(response)