---
title: OpenAI: O4 Mini API | Text Generation | ModelsLab
description: Build with OpenAI: O4 Mini API by Openai. Text generation, chat, code, and reasoning. Pay-per-use. Free tier.
url: https://modelslab.com/models/openai/openai-o4-mini.md
canonical: https://modelslab.com/models/openai/openai-o4-mini.md
type: product
component: Playground/LLM/Index
generated_at: 2026-04-15T00:38:11.713284Z
---

OpenAI: o4 Mini
---

 [LLMs.txt](https://modelslab.com/models/open_router/openai-o4-mini/llms.txt) [.md](https://modelslab.com/models/openai/openai-o4-mini.md)

openai-o4-mini openai Closed Source Model $2.750000 / call

OpenAI: o4 Mini
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### OpenAI: o4 Mini

openai openai-o4-mini

Copy model ID

PricingInput $1.10 / 1M tokens

Output $4.40 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab.com/models?feature=llmaster)

[AC](https://modelslab.com/models/open_router/anthropic-claude-opus-4.6-fast)[Open Router](https://modelslab.com/models/open_router)

 [Anthropic: Claude Opus 4.6 (Fast)

Closed Source Model](https://modelslab.com/models/open_router/anthropic-claude-opus-4.6-fast)

[ZG](https://modelslab.com/models/open_router/z-ai-glm-5)[Open Router](https://modelslab.com/models/open_router)

 [Z.ai: GLM 5

Closed Source Model](https://modelslab.com/models/open_router/z-ai-glm-5)

[G5](https://modelslab.com/models/together_ai/zai-org-GLM-5-FP4)[Together AI](https://modelslab.com/models/together_ai)

 [GLM 5 Fp4

Closed Source Model](https://modelslab.com/models/together_ai/zai-org-GLM-5-FP4)

[G3](https://modelslab.com/models/together_ai/google-gemma-3-270m-it)[Together AI](https://modelslab.com/models/together_ai)

 [Gemma 3 270M It

Closed Source Model](https://modelslab.com/models/together_ai/google-gemma-3-270m-it)

[![Arcee AI: Virtuoso Large](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/9a2e71d3-3c00-4738-a62c-be4c7eb02beb.png)](https://modelslab.com/models/open_router/arcee-ai-virtuoso-large)[Open Router](https://modelslab.com/models/open_router)

 [Arcee AI: Virtuoso Large

Closed Source Model](https://modelslab.com/models/open_router/arcee-ai-virtuoso-large)

[DR](https://modelslab.com/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Llama-70B)[Together AI](https://modelslab.com/models/together_ai)

 [DeepSeek R1 Distill Llama 70B

Closed Source Model](https://modelslab.com/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Llama-70B)

[BE](https://modelslab.com/models/open_router/baidu-ernie-4.5-vl-28b-a3b)[Open Router](https://modelslab.com/models/open_router)

 [Baidu: ERNIE 4.5 VL 28B A3B

Closed Source Model](https://modelslab.com/models/open_router/baidu-ernie-4.5-vl-28b-a3b)

[GL](https://modelslab.com/models/open_router/google-lyria-3-pro-preview)[Open Router](https://modelslab.com/models/open_router)

 [Google: Lyria 3 Pro Preview

Closed Source Model](https://modelslab.com/models/open_router/google-lyria-3-pro-preview)

[OG](https://modelslab.com/models/open_router/openai-gpt-audio)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: GPT Audio

Closed Source Model](https://modelslab.com/models/open_router/openai-gpt-audio)

[QQ](https://modelslab.com/models/open_router/qwen-qwen3-max)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen3 Max

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen3-max)

[Q7](https://modelslab.com/models/together_ai/Qwen-Qwen2.5-72B-Instruct-Turbo)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen2.5 72B Instruct Turbo

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen2.5-72B-Instruct-Turbo)

[QN](https://modelslab.com/models/together_ai/Qwen-Qwen3-Next-80B-A3B-Instruct)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen3 Next 80B A3b Instruct

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen3-Next-80B-A3B-Instruct)

[MM](https://modelslab.com/models/open_router/morph-morph-v3-fast)[Open Router](https://modelslab.com/models/open_router)

 [Morph: Morph V3 Fast

Closed Source Model](https://modelslab.com/models/open_router/morph-morph-v3-fast)

[GN](https://modelslab.com/models/open_router/google-gemini-3.1-flash-image-preview)[Open Router](https://modelslab.com/models/open_router)

 [Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)

Closed Source Model](https://modelslab.com/models/open_router/google-gemini-3.1-flash-image-preview)

[OG](https://modelslab.com/models/open_router/openai-gpt-5.1-codex-mini)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: GPT-5.1-Codex-Mini

Closed Source Model](https://modelslab.com/models/open_router/openai-gpt-5.1-codex-mini)

[OO](https://modelslab.com/models/open_router/openai-o3-deep-research)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: o3 Deep Research

Closed Source Model](https://modelslab.com/models/open_router/openai-o3-deep-research)

[QQ](https://modelslab.com/models/open_router/qwen-qwen3.5-flash-02-23)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen3.5-Flash

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen3.5-flash-02-23)

[MM](https://modelslab.com/models/open_router/minimax-minimax-m2)[Open Router](https://modelslab.com/models/open_router)

 [MiniMax: MiniMax M2

Closed Source Model](https://modelslab.com/models/open_router/minimax-minimax-m2)

About OpenAI: O4 Mini
---

OpenAI o4-mini is a compact reasoning model in the o-series, optimized for fast, cost-efficient performance while retaining strong multimodal and agentic capabilities. It supports tool use and demonstrates competitive reasoning...

### Technical Specifications

Model IDopenai-o4-miniCategoryLLM ModelsTaskText GenerationPrice$2.750000 per million tokensAddedFebruary 20, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate OpenAI: O4 Mini into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "openai-o4-mini",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

View the [full API documentation](https://modelslab.com/models/openai/openai-o4-mini/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

OpenAI: O4 Mini API costs $2.750000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab.com/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from Openai](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

OpenAI: O4 Mini FAQ
---

### What is OpenAI: O4 Mini?

OpenAI o4-mini is a compact reasoning model in the o-series, optimized for fast, cost-efficient performance while retaining strong multimodal and agentic capabilities. It supports tool use and demonstrates competitive reasoning...

### How do I use the OpenAI: O4 Mini API?

You can integrate OpenAI: O4 Mini into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "openai-o4-mini" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does OpenAI: O4 Mini cost?

OpenAI: O4 Mini costs $2.750000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the OpenAI: O4 Mini model ID?

The model ID for OpenAI: O4 Mini is "openai-o4-mini". Use this ID in your API requests to specify this model.

### Does OpenAI: O4 Mini have a free tier?

Yes, ModelsLab offers a free tier that lets you try OpenAI: O4 Mini and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-04-15*