# OpenAI: gpt-4o

- Model ID: `gpt-4o`
- Provider: OpenAI
- Web version: https://www.moleapi.com/en/models/openai/gpt-4o
- Content status: verified

## Model introduction

GPT-4o is OpenAI's general-purpose model. It accepts text and image input and produces text output. Its official documentation lists function calling and structured outputs.

## Model capabilities

- OpenAI compatible
- Responses API
- Prompt cache

### Verified specifications

- Input / output: Text, image / Text
- Context window: 128,000 tokens
- Maximum output: 16,384 tokens
- Verified capabilities: Function calling; structured outputs

## Model pricing and access

Pricing is supplied dynamically by the MoleAPI console API.

### Standard (default, x1)

- Input: $2.5 / 1M tokens
- Output: $10 / 1M tokens
- Cache read: $1.25 / 1M tokens

### Access protocols

| Protocol | Method | Endpoint |
| --- | --- | --- |
| openai | POST | /v1/chat/completions |
| openai-response | POST | /v1/responses |

- Live pricing source: https://home.moleapi.com/api/pricing

## About gpt-4o

GPT-4o is OpenAI's general-purpose model. It accepts text and image input and produces text output. Its official documentation lists function calling and structured outputs.

### Best for

General applications that combine text and image input with tool calling or dependable structured results.

### Core strengths

- Text and image input share one general-purpose request flow.
- Official support for function calling and structured outputs fits production integrations.
- A mature ecosystem makes it a useful compatibility baseline.

### Limitations

- Its 128K context and 16K output ceiling trail newer long-context models.
- It is not the newest specialist for long-running agents or maximum-effort reasoning.

### Selection and production evaluation

Start a gpt-4o evaluation by mapping its official positioning to real work: General applications that combine text and image input with tool calling or dependable structured results. The first pass should exercise both its main strength, "Text and image input share one general-purpose request flow.", and its known limitation, "Its 128K context and 16K output ceiling trail newer long-context models.", instead of relying on a single subjective general-chat comparison.

For access, MoleAPI currently lists openai, openai-response protocols and the Standard billing groups for this OpenAI model; the default price summary is Input $2.5 / 1M tokens · Output $10 / 1M tokens. Pricing, protocols, and groups come from the live catalog, so production planning should still price representative requests using real context length, output size, and cache-hit assumptions.

No independent ranking is shown unless it matches this exact model ID and reasoning profile, so nearby variants are not used as a proxy. Before launch, pin the model ID, prompt, and sample set, then compare task accuracy, structured-output validity, tool-call success, and timeout rates under the same conditions.

The model material on this page was last checked on 2026-07-23. When upstream model cards, context limits, or tool support change, update the cited bilingual facts before changing the recommendation; live MoleAPI price changes remain separate and update from the catalog automatically.

### Sources

- [OpenAI GPT-4o model documentation](https://developers.openai.com/api/docs/models/gpt-4o) — OpenAI
- Last verified: 2026-07-23

## Code examples

### cURL

```bash
curl https://api.moleapi.com/v1/responses \
  -H "Authorization: Bearer $MOLEAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o","input":"Explain this problem step by step."}'
```

### Python

```python
from openai import OpenAI

client = OpenAI(base_url="https://api.moleapi.com/v1", api_key="YOUR_MOLEAPI_API_KEY")
response = client.responses.create(model="gpt-4o", input="Explain this problem step by step.")
print(response.output_text)
```

### TypeScript

```typescript
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.moleapi.com/v1", apiKey: process.env.MOLEAPI_API_KEY });
const response = await client.responses.create({ model: "gpt-4o", input: "Explain this problem step by step." });
console.log(response.output_text);
```

## More related models

- [gpt-5.6-luna](https://www.moleapi.com/en/models/openai/gpt-5.6-luna) — OpenAI
- [gpt-5.6-sol](https://www.moleapi.com/en/models/openai/gpt-5.6-sol) — OpenAI
- [gpt-5.6-terra](https://www.moleapi.com/en/models/openai/gpt-5.6-terra) — OpenAI

## Frequently asked questions

### How is gpt-4o priced?

Prices are read from the MoleAPI console API and update with model prices, context tiers, and account groups.

### How can I access gpt-4o?

The catalog currently lists openai, openai-response.

### How do I switch an existing project to gpt-4o?

Keep the MoleAPI API address and key, replace the model parameter, and check protocol-specific parameters.

### Where do the gpt-4o details come from?

Capabilities and limitations are checked against OpenAI and the other cited pages; pricing and protocols come from the MoleAPI console.
