OpenAI
OpenAI

GPT 4.1

openai/gpt-4.1

GPT 4.1 is OpenAI's flagship model for complex tasks. It is well suited for problem solving across domains.

Capability

Vision Support

Tools

Function Calling

Context Window

1,047,576

Max Output Tokens

32,768

Using GPT 4.1 with Python API

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