GPT-4.1

Model details

GPT-4.1

Model
openai/gpt-4.1
Provider
vercel-ai-gateway
API
anthropic-messages
Base URL
https://ai-gateway.vercel.sh
Input
text, image
Reasoning
No
Context window
1,047,576
Max tokens
32,768
Cost / million input
$2
Cost / million output
$8
Cost / million cache read
$0.5
Cost / million cache write
$0
Model config JSON
{
  "providers": {
    "vercel-ai-gateway": {
      "apiKey": "YOUR_API_KEY",
      "models": [
        {
          "id": "openai/gpt-4.1",
          "name": "GPT-4.1",
          "reasoning": false,
          "input": [
            "text",
            "image"
          ],
          "contextWindow": 1047576,
          "maxTokens": 32768,
          "cost": {
            "input": 2,
            "output": 8,
            "cacheRead": 0.5,
            "cacheWrite": 0
          }
        }
      ],
      "api": "anthropic-messages",
      "baseUrl": "https://ai-gateway.vercel.sh"
    }
  }
}