OpenAI
OpenAI

GPT 4.1 Nano

openai/gpt-4.1-nano

GPT-4.1 nano is the fastest, most cost-effective GPT 4.1 model.

Capability

Vision Support

Tools

Function Calling

Context Window

1,047,576

Max Output Tokens

32,768

Using GPT 4.1 Nano with Python API

Using GPT 4.1 Nano 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-nano",
messages: [
  {
    role: 'user',
    content:
      'introduce your self',
    },
  ]
)
print(response)