Home/Models/OpenAI/GPT-4.1
O

GPT-4.1

Đầu vào:$1.6/M
Đầu ra:$6.4/M
Bối cảnh:1.0M
Đầu ra tối đa:1047K
GPT-4.1 là một mô hình trí tuệ nhân tạo do OpenAI cung cấp. gpt-4.1-nano: Có cửa sổ ngữ cảnh lớn hơn—hỗ trợ tới 1 triệu token ngữ cảnh và có khả năng tận dụng tốt hơn ngữ cảnh đó nhờ khả năng hiểu ngữ cảnh dài được cải thiện. Có mốc kiến thức được cập nhật đến tháng 6 năm 2024. Mô hình này hỗ trợ độ dài ngữ cảnh tối đa 1,047,576 token.
Mới
Sử dụng thương mại
Tổng quan
Tính năng
Giá cả
API
Phiên bản

The GPT-4.1 API is OpenAI's most advanced language model, featuring a 1 million token context window and enhanced capabilities in coding, instruction following, and long-context comprehension, making it ideal for complex applications requiring deep reasoning and extensive input processing.

GPT-4.1 API

Overview of GPT-4.1

OpenAI's GPT 4.1 represents a significant advancement in artificial intelligence, building upon the capabilities of its predecessors to offer enhanced performance, efficiency, and versatility. This model is designed to excel in complex tasks, including coding, instruction following, and processing extensive contexts, making it a valuable tool for a wide range of applications.

Key Features of GPT-4.1

Expanded Context Window

GPT 4.1 boasts a context window of up to 1 million tokens, a substantial increase from GPT-4o's 128,000-token limit. This enhancement allows the model to process and understand significantly larger datasets, facilitating deeper insights and more coherent outputs over extended interactions.

Enhanced Coding Capabilities

The model exhibits a 21% improvement in coding performance compared to GPT-4o and a 27% improvement over GPT-4.5, as measured by the SWE-Bench benchmark. This advancement underscores GPT-4.1's proficiency in handling complex coding tasks, including code generation, debugging, and repository exploration.

Improved Instruction Following

GPT 4.1 demonstrates superior adherence to user instructions, reducing the need for repeated prompts and enhancing the efficiency of interactions. This improvement is particularly beneficial in applications requiring precise and consistent responses.

Cost and Efficiency

GPT-4.1 is designed to be more efficient, offering a 26% cost reduction compared to GPT-4o. This efficiency gain makes the model more accessible for a broader range of applications, from enterprise solutions to individual developers.

Benchmark Performance of GPT-4.1

SWE-Bench Coding Benchmark

GPT 4.1 achieved 55% accuracy on the SWE-Bench benchmark, a significant improvement over GPT-4o's 33%. This performance indicates the model's enhanced ability to handle complex coding tasks, including understanding diffs, writing unit tests, and generating compilable code.

MMLU Reasoning Benchmark

In the Massive Multitask Language Understanding (MMLU) benchmark, GPT-4.1 set a new standard by surpassing the 90% accuracy threshold. This achievement reflects the model's advanced reasoning capabilities across a diverse set of tasks.

GPQA Diamond Tier

On the Graduate-Level Google-Proof Q&A (GPQA) benchmark, GPT-4.1 scored 66.3% on the Diamond tier, showcasing its proficiency in handling complex scientific queries.


Technical Specifications of GPT-4.1

Training Data and Knowledge Cutoff

GPT-4.1 was trained on data available up to June 2024, ensuring its responses are informed by recent developments and information.

Multimodal Functionality

GPT-4.1 represents a significant evolution from its predecessors, incorporating advancements in coding, context comprehension, and instruction adherence. The model's ability to process up to 1 million tokens marks a substantial leap from GPT-4o's 128,000-token limit, enabling more complex and nuanced understanding of inputs.


Application Scenarios of GPT-4.1

Software Development

GPT-4.1's enhanced coding capabilities make it an invaluable tool for software developers, assisting in code generation, debugging, and documentation.​

Data Analysis

With its expanded context window, GPT-4.1 can process large datasets, making it suitable for complex data analysis tasks, including trend identification and predictive modeling.​

Education and Training

The model's improved instruction following and reasoning abilities support educational applications, such as personalized tutoring, curriculum development, and language learning.​

Customer Support

GPT-4.1 can enhance customer service by providing accurate and contextually relevant responses, reducing response times, and improving user satisfaction.​


Conclusion

GPT-4.1 represents a significant milestone in the evolution of large language models, offering enhanced contextual understanding, improved coding proficiency, and greater efficiency. Its advancements over previous models position it as a versatile tool across various industries, from software development to education. As AI continues to evolve, GPT 4.1 sets a new standard for performance and accessibility in the field.

How to Use GPT-4.1 API from CometAPI

GPT-4.1 Pricing in CometAPI:

  • Input Tokens: $1.6 / M tokens
  • Output Tokens: $6.4/ M tokens

Required Steps

  • Log in to cometapi.com. If you are not our user yet, please register first
  • Get the access credential API key of the interface. Click "Add Token" at the API token in the personal center, get the token key: sk-xxxxx and submit.
  • Get the url of this site: https://api.cometapi.com/

Code Example

  1. Select the “gpt-4.1” endpoint to send the API request and set the request body. The request method and request body are obtained from our website API doc. Our website also provides Apifox test for your convenience.
  2. Replace <YOUR_API_KEY> with your actual CometAPI key from your account.
  3. Insert your question or request into the content field—this is what the model will respond to.
  4. . Process the API response to get the generated answer.

Tính năng cho GPT-4.1

Khám phá các tính năng chính của GPT-4.1, được thiết kế để nâng cao hiệu suất và khả năng sử dụng. Tìm hiểu cách các khả năng này có thể mang lại lợi ích cho dự án của bạn và cải thiện trải nghiệm người dùng.

Giá cả cho GPT-4.1

Khám phá mức giá cạnh tranh cho GPT-4.1, được thiết kế để phù hợp với nhiều ngân sách và nhu cầu sử dụng khác nhau. Các gói linh hoạt của chúng tôi đảm bảo bạn chỉ trả tiền cho những gì bạn sử dụng, giúp dễ dàng mở rộng quy mô khi yêu cầu của bạn tăng lên. Khám phá cách GPT-4.1 có thể nâng cao các dự án của bạn trong khi vẫn kiểm soát được chi phí.
Giá Comet (USD / M Tokens)Giá Chính Thức (USD / M Tokens)Giảm giá
Đầu vào:$1.6/M
Đầu ra:$6.4/M
Đầu vào:$2/M
Đầu ra:$8/M
-20%

Mã mẫu và API cho GPT-4.1

The GPT-4.1 API is OpenAI's most advanced language model, featuring a 1 million token context window and enhanced capabilities in coding, instruction following, and long-context comprehension, making it ideal for complex applications requiring deep reasoning and extensive input processing.
Python
JavaScript
Curl
from openai import OpenAI
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com/v1"

client = OpenAI(base_url=BASE_URL, api_key=COMETAPI_KEY)
response = client.responses.create(
    model="gpt-4.1", input="Tell me a three sentence bedtime story about a unicorn."
)

print(response)

Các phiên bản của GPT-4.1

Lý do GPT-4.1 có nhiều snapshot có thể bao gồm các yếu tố tiềm năng như: sự thay đổi đầu ra sau các bản cập nhật cần các snapshot cũ để đảm bảo tính nhất quán, cung cấp cho nhà phát triển thời gian chuyển tiếp để thích ứng và di chuyển, cũng như các snapshot khác nhau tương ứng với các endpoint toàn cầu hoặc khu vực nhằm tối ưu hóa trải nghiệm người dùng. Để biết chi tiết về sự khác biệt giữa các phiên bản, vui lòng tham khảo tài liệu chính thức.
version
gpt-4.1
gpt-4.1-2025-04-14
gpt-4.1-mini
gpt-4.1-mini-2025-04-14
gpt-4.1-nano
gpt-4.1-nano-2025-04-14

Thêm mô hình