GPT-4.1
Approved Data Classifications
Description
OpenAI's GPT-4.1 model, released on April 14, 2025, represents a significant advancement in AI capabilities, building upon the foundation laid by GPT-4o. This flagship model features a substantial increase in context window size, supporting up to 1 million tokens, which enhances its ability to process and generate extensive text sequences effectively. It also demonstrates a 21% improvement in coding tasks compared to GPT-4o and a 27% improvement over GPT-4.5, highlighting its enhanced proficiency in programming-related applications. Furthermore, GPT-4.1 is multimodal, capable of processing both text and image inputs, making it versatile for a wide range of applications.
Capabilities
Model | Training Data | Input | Output | Context Length | Cost (per 1 million tokens) |
---|---|---|---|---|---|
gpt-4.1 | July 2024 | Image , Text , Audio , Video | Text | 1,000,000 | $2.00/1M input $8.00/1M output |
1M
represents 1 Million Tokens- All prices listed are based on 1 Million Tokens
Availability
Cloud Provider
Usage
- curl
- python
- javascript
curl -X POST https://api.ai.it.ufl.edu/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_TOKEN>" \
-d '{
"model": "gpt-4.1",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Write a haiku about an Alligator."
}
]
}'
from openai import OpenAI
client = OpenAI(
api_key="your_api_key",
base_url="https://api.ai.it.ufl.edu/v1"
)
response = client.chat.completions.create(
model="gpt-4.1", # model to send to the proxy
messages = [
{ role: "system", content: "You are a helpful assistant." },
{
"role": "user",
"content": "Write a haiku about an Alligator."
}
]
)
print(response.choices[0].message)
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: 'your_api_key',
baseURL: 'https://api.ai.it.ufl.edu/v1'
});
const completion = await openai.chat.completions.create({
model: "gpt-4.1",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{
role: "user",
content: "Write a haiku about an Alligator.",
},
],
});
print(completion.choices[0].message)
When to use
You might choose to use GPT-4.1 when you require a state-of-the-art AI model that excels in handling extensive context, advanced coding tasks, and nuanced instruction following. With its expanded context window of up to 1 million tokens, GPT-4.1 is particularly well-suited for applications involving large datasets, complex documents, or intricate conversational threads. Its 21% improvement over GPT-4o in coding tasks makes it an excellent choice for developers seeking enhanced code generation, debugging, and optimization capabilities. Additionally, GPT-4.1's multimodal capabilities allow it to process and generate content across text, images, audio, and video, enabling more interactive and dynamic user experiences. Its cost-effective pricing—26% lower than GPT-4o—makes it an attractive option for businesses and developers aiming to leverage advanced AI technology without incurring significant expenses. Whether you're building sophisticated AI agents, developing educational tools, or creating content-rich applications, GPT-4.1 offers the performance and versatility needed to meet diverse needs effectively.