Description
GPT-4.1 is a flagship large language model optimized for advanced instruction following, real-world software engineering, and long-context reasoning. It supports a 1 million token context window and outperforms GPT-4o and GPT-4.5 across coding (54.6% SWE-bench Verified), instruction compliance (87.4% IFEval), and multimodal understanding benchmarks. It is tuned for precise code diffs, agent reliability, and high recall in large document contexts, making it ideal for agents, IDE tooling, and enterprise knowledge retrieval.
API Usage Examples
OpenAI Compatible Endpoint
Use this endpoint with any OpenAI-compatible library. Model: OpenAI: GPT-4.1 (openai/gpt-4.1)
curl https://api.ridvay.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '{
"model": "openai/gpt-4.1",
"messages": [
{
"role": "user",
"content": "Explain the capabilities of the OpenAI: GPT-4.1 model"
}
],
"temperature": 0.7,
"max_tokens": 1024
}'
Supported Modalities
- Text
- Images
API Pricing
- Input: 2$ / 1M tokens
- Output: 8$ / 1M tokens
Token Limits
- Max Output: 32,768 tokens
- Max Context: 1,047,576 tokens
Subscription Tiers
- free
- pro
- ultimate