---
title: 'GPT-4.1 API: Model ID, 1M Context and Tool Calling | RunAPI'
description: Call gpt-4.1 through RunAPI's OpenAI-compatible Chat Completions API. OpenAI's non-reasoning model with a 1M-token context, 32K output, image input and tools.
url: https://runapi.ai/models/gpt/4.1.md
canonical: https://runapi.ai/models/gpt/4.1
locale: en
site: RunAPI
image: https://runapi.ai/assets/opengraph-bfaaa0f0.png
alternates:
  en: https://runapi.ai/models/gpt/4.1
  zh-CN: https://runapi.ai/zh-CN/models/gpt/4.1
  es: https://runapi.ai/es/models/gpt/4.1
  ja: https://runapi.ai/ja/models/gpt/4.1
  de: https://runapi.ai/de/models/gpt/4.1
  fr: https://runapi.ai/fr/models/gpt/4.1
  pt-BR: https://runapi.ai/pt-BR/models/gpt/4.1
  ko: https://runapi.ai/ko/models/gpt/4.1
  it: https://runapi.ai/it/models/gpt/4.1
  nl: https://runapi.ai/nl/models/gpt/4.1
  pl: https://runapi.ai/pl/models/gpt/4.1
  tr: https://runapi.ai/tr/models/gpt/4.1
  zh-TW: https://runapi.ai/zh-TW/models/gpt/4.1
  zh-HK: https://runapi.ai/zh-HK/models/gpt/4.1
  ar: https://runapi.ai/ar/models/gpt/4.1
  x-default: https://runapi.ai/models/gpt/4.1
model: GPT
provider: OpenAI
variant_id: gpt-4.1
sdk_model_id: gpt-4.1
modality: text
billing_unit: 1K tokens
status: active
---

> HTML version: https://runapi.ai/models/gpt/4.1
> Site index for agents: https://runapi.ai/llms.txt


# gpt-4.1 API

Call gpt-4.1 from the GPT family through RunAPI. Billing is per token with no subscription, and a request that fails before its response starts is not charged.

**OpenAI / [GPT](https://runapi.ai/models/gpt.md)**
**Operational · text · Commercial OK**

## What GPT-4.1 is built for

GPT-4.1 is the flagship of OpenAI's GPT-4.1 family, released on April 14, 2025 as the snapshot gpt-4.1-2025-04-14. OpenAI calls it its smartest non-reasoning model: it answers without a reasoning step and is positioned for instruction following and tool calling at low latency.

The context window is 1,047,576 tokens and output goes up to 32,768 tokens. It accepts text and image input, and OpenAI supports function calling and structured outputs on the model.

On RunAPI, call gpt-4.1 through the OpenAI-compatible Chat Completions endpoint (/v1/chat/completions). To move existing Chat Completions code, set the OpenAI SDK base URL to https://runapi.ai/v1, use your RunAPI API key, and keep model set to gpt-4.1. OpenAI recommends GPT-5 models for complex tasks, and RunAPI lists the newer GPT models under the same key.

**Model ID:** gpt-4.1
**Released:** April 14, 2025
**Context window:** 1,047,576 tokens
**Max output:** 32,768 tokens
**Input:** Text and images
**Reasoning:** None (non-reasoning model)
**Endpoint on RunAPI:** OpenAI Chat Completions



<!-- catalog-model-detail-slot: model-playground -->

## Try GPT-4.1

Pick any model and generate in seconds.


**Model:**
- **Chat completion** — `chat_completion` · `gpt-4.1` · Input $2.00 / 1M tokens | Output $8.00 / 1M tokens

**Prompt:** Describe what you want to create...

**Estimated:** Input $2.00 / 1M tokens | Output $8.00 / 1M tokens

- [Generate](https://runapi.ai/login)
Sign in to generate with RunAPI.
<!-- /catalog-model-detail-slot: model-playground -->

### Switch variant

- [codex-auto-review](https://runapi.ai/models/gpt/codex-auto-review.md)
- **gpt-4.1** (current)
- [gpt-4.1-mini](https://runapi.ai/models/gpt/4.1-mini.md)
- [gpt-4o-mini](https://runapi.ai/models/gpt/4o-mini.md)
- [gpt-5-pro](https://runapi.ai/models/gpt/5-pro.md)
- [gpt-5.2](https://runapi.ai/models/gpt/5.2.md)
- [gpt-5.2-pro](https://runapi.ai/models/gpt/5.2-pro.md)
- [gpt-5.3-codex](https://runapi.ai/models/gpt/5.3-codex.md)
- [gpt-5.3-codex-spark](https://runapi.ai/models/gpt/5.3-codex-spark.md)
- [gpt-5.4](https://runapi.ai/models/gpt/5.4.md)
- [gpt-5.4-mini](https://runapi.ai/models/gpt/5.4-mini.md)
- [gpt-5.4-nano](https://runapi.ai/models/gpt/5.4-nano.md)
- [gpt-5.4-pro](https://runapi.ai/models/gpt/5.4-pro.md)
- [gpt-5.5](https://runapi.ai/models/gpt/5.5.md)
- [gpt-5.5-pro](https://runapi.ai/models/gpt/5.5-pro.md)
- [gpt-5.6-luna](https://runapi.ai/models/gpt/5.6-luna.md)
- [gpt-5.6-sol](https://runapi.ai/models/gpt/5.6-sol.md)
- [gpt-5.6-terra](https://runapi.ai/models/gpt/5.6-terra.md)
- [gpt-6-astra](https://runapi.ai/models/gpt/6-astra.md)
- [gpt-6-luna](https://runapi.ai/models/gpt/6-luna.md)
- [gpt-6-sol](https://runapi.ai/models/gpt/6-sol.md)
- [gpt-6.1-sol](https://runapi.ai/models/gpt/6.1-sol.md)
- [gpt-live-1](https://runapi.ai/models/gpt/live-1.md)

23 versions available





gpt-4.1 is one of the GPT models on RunAPI. It uses the same API key as every other model, and you switch to it by changing the model ID in your request. Each call is synchronous and billed in USD by input, output, and cache tokens, with no subscription or minimum spend. A request that fails before the response starts is not charged; once a response is streaming, the tokens already generated are billed, even if the client disconnects.

- Per-token billing in USD with no subscription
- No charge when a request fails before its response starts
- Token-by-token streaming
- Switch models by changing one model ID
- One API key and one bill for every model and provider

## Usage metrics

- **API Calls / Day:** 23
- **Success Rate:** 52.2%
- **Avg Generation:** 10.9s

Verified customer feedback is not available for this model yet.



## Technical details

| Field | Value |
|---|---|
| Provider | OpenAI |
| Model ID | gpt-4.1 |
| Modality | Text |
| Task types | Synchronous |
| API endpoint | `/v1/chat/completions` |
|  | `/v1/responses` |
|  | `/v1/messages` |
|  | `/v1beta/models/gpt-4.1:generateContent` |
|  | `/v1beta/models/gpt-4.1:streamGenerateContent` |
| Billing unit | 1K tokens |
| Catalog status | Operational |



**HOW IT WORKS**

## Use This Model in 3 Steps

1. **Get Your Key** - Sign up for free and create an API key for gpt-4.1 from the dashboard.
2. **Send a Request** - POST to /v1/chat/completions with the gpt-4.1 model slug and your parameters.
3. **Get Results** - Read the completed gpt-4.1 response directly from the endpoint.



<!-- catalog-model-detail-slot: feature-cards -->

## What this model offers

- **Endpoint coverage** — Exposes 1 public endpoint(s): chat_completion.
- **Usage-based billing** — Metered by 1K tokens with no subscription requirement.
<!-- /catalog-model-detail-slot: feature-cards -->



## GPT-4.1 Pricing

| Endpoint | Price |
|---|---|
| `chat_completion` | Input: $2.00 / 1M tokens<br>Output: $8.00 / 1M tokens<br>Cache read: $0.50 / 1M tokens |



**API REFERENCE**

## Endpoint Specification

| Field | Value |
|---|---|
| Endpoint | `POST /v1/chat/completions` |
| Model ID | `gpt-4.1` |
| Task Types | `chat_completion` |


<!-- catalog-model-detail-slot: request-parameters -->

## Request parameters

No request parameters are published for this endpoint.
<!-- /catalog-model-detail-slot: request-parameters -->

**Request example**

```json
{
  "model": "gpt-4.1",
  "messages": [
    {
      "role": "user",
      "content": "Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations."
    }
  ]
}
```

### Model skill — gpt-4.1

Install the skill once, then use the variant ID from this page while building.

Base URL: `https://runapi.ai`

| Endpoint | Protocol |
|---|---|
| `POST /v1/chat/completions` | OpenAI compatible |
| `POST /v1/responses` | OpenAI Responses |
| `POST /v1/messages` | Anthropic compatible |
| `POST /v1beta/models/gpt-4.1:generateContent` | Gemini generateContent |
| `POST /v1beta/models/gpt-4.1:streamGenerateContent` | Gemini streamGenerateContent |

Use the OpenAI / Anthropic / Google Gen AI SDK with your RunAPI API key and `model: "gpt-4.1"`.

### Use gpt-4.1 with a model skill

1. **Install** — Install the model skill for the GPT line. It loads docs, request formats, and pricing notes into your coding workspace.
2. **Configure** — Point your SDK at https://runapi.ai and set your RunAPI API key. The same key works for every model and provider.
3. **Call** — Send a request in an API format this model supports, with the model field set to the model ID on this page. RunAPI forwards it to the provider.
4. **Receive** — Read the response from the same call, or stream it as it is generated. The usage field shows the tokens you are billed for.

### What's different about gpt-4.1

- **VS CODEX-AUTO-REVIEW: OpenAI's non-reasoning GPT-4.1; 1M context, image input and tools via OpenAI-compatible API** — codex-auto-review
- **VS GPT-4.1-MINI: OpenAI's non-reasoning GPT-4.1; 1M context, image input and tools via OpenAI-compatible API** — Smaller GPT-4.1 model; 1M context, image input and tools via OpenAI-compatible API
- **VS GPT-4O-MINI: OpenAI's non-reasoning GPT-4.1; 1M context, image input and tools via OpenAI-compatible API** — Fast, affordable GPT-4o model for everyday text tasks

## USE CASES

**Customer support**

Answer customer questions from a private knowledge base, reducing ticket volume.

**Document analysis**

Draft contract summaries and flag key clauses for attorney review.

**Code generation**

Auto-generate unit tests, code reviews, and refactoring suggestions in CI.



## Frequently asked questions about GPT-4.1

### Is GPT-4.1 a reasoning model?

No. OpenAI describes it as its smartest non-reasoning model. It does not generate a reasoning step before the answer, and OpenAI positions it for low-latency instruction following and tool calling. For complex multi-step problems, OpenAI recommends GPT-5.

### What is the difference between gpt-4.1 and gpt-4.1-mini?

Both have a 1,047,576-token context window, 32,768 output tokens, text and image input, and function calling. gpt-4.1 is the larger model for harder instruction-following work, and gpt-4.1-mini is the smaller model for fast, high-volume requests.

### Can I call GPT-4.1 with the OpenAI SDK on RunAPI?

Yes. Set the base URL to https://runapi.ai/v1, use your RunAPI API key, and send Chat Completions requests with model set to gpt-4.1. Images go in image_url parts, and tools use the standard OpenAI tools format.

### Is GPT-4.1 being retired?

No. As of October 2026, OpenAI lists gpt-4.1 as active and has announced no shutdown date for it.

### How do I select gpt-4.1?

Pass the model ID shown in the quickstart.

### What's the rate limit on this variant?

Per-key rate limits scale with your usage tier. The pricing page shows current limits. If you need higher throughput, contact support to discuss tier upgrades.

### Can I switch variants later?

Yes. Variant is a parameter in the request. Switch by changing the model ID — no code changes, no re-authentication, no separate billing setup. All variants share the same API key and request shape.

### Does it stream?

Where streaming is available, RunAPI streams end-to-end. LLM models support token-level streaming. Media models use async task polling or webhook callbacks for result delivery.

### Where do I report quality issues?

Open an issue on the public GitHub repo or email support at contact@runapi.ai. Include the task ID and model ID so the team can investigate the specific generation.

### Do I need a separate provider account?

No. Your RunAPI API key is enough to access this variant and every other model in the catalog. You do not need accounts with the underlying provider.


### RELATED

- [gpt-6-luna](https://runapi.ai/models/gpt/6-luna.md) — by OpenAI · Input $0.08-$0.16 / 1M tokens | Output $0.40-$0.60 / 1M tokens
- [gpt-4o-mini](https://runapi.ai/models/gpt/4o-mini.md) — by OpenAI · Input $0.12 / 1M tokens | Output $0.48 / 1M tokens
- [codex-auto-review](https://runapi.ai/models/gpt/codex-auto-review.md) — by OpenAI · Input $0.16-$0.32 / 1M tokens | Output $0.96-$1.44 / 1M tokens
- [gpt-5.4-nano](https://runapi.ai/models/gpt/5.4-nano.md) — by OpenAI · Input $0.16 / 1M tokens | Output $1.00 / 1M tokens

### Start building with GPT.

- [Create free account](https://runapi.ai/login)
- [Read the quickstart →](https://runapi.ai/docs/api/openai/chat-completions)
## Building with a team?

We're here to help with enterprise setup, integrations, and technical questions.

[Contact Us](https://runapi.ai/contact.md)



---

## More from RunAPI

- [Home](https://runapi.ai/.md)
### Product
- [Model Catalog](https://runapi.ai/models.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Providers](https://runapi.ai/models#all-models)
### Developers
- [Documentation](https://runapi.ai/docs/guides)
- [SDKs](https://runapi.ai/sdk.md)
- [CLI](https://runapi.ai/cli.md)
- [MCP Server](https://runapi.ai/mcp.md)
- [x402](https://runapi.ai/x402.md)
### Guides
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Cursor API Setup](https://runapi.ai/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/openrouter-alternative.md)
### Company
- [Enterprise](https://runapi.ai/contact.md)
- [Contact](https://runapi.ai/contact.md)
### Legal
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "SoftwareApplication",
    "name": "GPT gpt-4.1",
    "applicationCategory": "DeveloperApplication"
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://runapi.ai/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Models",
        "item": "https://runapi.ai/models"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "GPT",
        "item": "https://runapi.ai/models/gpt"
      },
      {
        "@type": "ListItem",
        "position": 4,
        "name": "gpt-4.1",
        "item": "https://runapi.ai/models/gpt/4.1"
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "HowTo",
    "name": "Use gpt-4.1 with a model skill",
    "description": "Call gpt-4.1 from the GPT family through RunAPI: per-token pricing, model ID, supported API formats, and setup guide.",
    "totalTime": "PT5M",
    "step": [
      {
        "@type": "HowToStep",
        "position": 1,
        "name": "Install",
        "text": "Install the model skill for the GPT line. It loads docs, request formats, and pricing notes into your coding workspace.",
        "url": "https://runapi.ai/models/gpt/4.1#how-step-1"
      },
      {
        "@type": "HowToStep",
        "position": 2,
        "name": "Configure",
        "text": "Point your SDK at https://runapi.ai and set your RunAPI API key. The same key works for every model and provider.",
        "url": "https://runapi.ai/models/gpt/4.1#how-step-2"
      },
      {
        "@type": "HowToStep",
        "position": 3,
        "name": "Call",
        "text": "Send a request in an API format this model supports, with the model field set to the model ID on this page. RunAPI forwards it to the provider.",
        "url": "https://runapi.ai/models/gpt/4.1#how-step-3"
      },
      {
        "@type": "HowToStep",
        "position": 4,
        "name": "Receive",
        "text": "Read the response from the same call, or stream it as it is generated. The usage field shows the tokens you are billed for.",
        "url": "https://runapi.ai/models/gpt/4.1#how-step-4"
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "Is GPT-4.1 a reasoning model?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "No. OpenAI describes it as its smartest non-reasoning model. It does not generate a reasoning step before the answer, and OpenAI positions it for low-latency instruction following and tool calling. For complex multi-step problems, OpenAI recommends GPT-5."
        }
      },
      {
        "@type": "Question",
        "name": "What is the difference between gpt-4.1 and gpt-4.1-mini?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Both have a 1,047,576-token context window, 32,768 output tokens, text and image input, and function calling. gpt-4.1 is the larger model for harder instruction-following work, and gpt-4.1-mini is the smaller model for fast, high-volume requests."
        }
      },
      {
        "@type": "Question",
        "name": "Can I call GPT-4.1 with the OpenAI SDK on RunAPI?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Yes. Set the base URL to https://runapi.ai/v1, use your RunAPI API key, and send Chat Completions requests with model set to gpt-4.1. Images go in image_url parts, and tools use the standard OpenAI tools format."
        }
      },
      {
        "@type": "Question",
        "name": "Is GPT-4.1 being retired?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "No. As of October 2026, OpenAI lists gpt-4.1 as active and has announced no shutdown date for it."
        }
      },
      {
        "@type": "Question",
        "name": "How do I select gpt-4.1?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Pass the model ID shown in the quickstart."
        }
      },
      {
        "@type": "Question",
        "name": "What's the rate limit on this variant?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Per-key rate limits scale with your usage tier. The pricing page shows current limits. If you need higher throughput, contact support to discuss tier upgrades."
        }
      },
      {
        "@type": "Question",
        "name": "Can I switch variants later?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Yes. Variant is a parameter in the request. Switch by changing the model ID — no code changes, no re-authentication, no separate billing setup. All variants share the same API key and request shape."
        }
      },
      {
        "@type": "Question",
        "name": "Does it stream?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Where streaming is available, RunAPI streams end-to-end. LLM models support token-level streaming. Media models use async task polling or webhook callbacks for result delivery."
        }
      },
      {
        "@type": "Question",
        "name": "Where do I report quality issues?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Open an issue on the public GitHub repo or email support at contact@runapi.ai. Include the task ID and model ID so the team can investigate the specific generation."
        }
      },
      {
        "@type": "Question",
        "name": "Do I need a separate provider account?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "No. Your RunAPI API key is enough to access this variant and every other model in the catalog. You do not need accounts with the underlying provider."
        }
      }
    ]
  }
]
```
