---
title: OpenAI: GPT 5 Mini API | Text Generation | ModelsLab
description: Cost-effective reasoning model with 272K context, 128K output, multimodal support, and $0.25/$2 pricing—ideal for high-volume, low-latency tasks.
url: https://modelslab.com/models/openai/openai-gpt-5-mini/api.md
canonical: https://modelslab.com/models/openai/openai-gpt-5-mini/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-04-29T23:53:12.537429Z
---

OpenAI: GPT-5 Mini
---

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

openai-gpt-5-mini openai Closed Source Model $1.125000 / call

OpenAI: GPT-5 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: GPT-5 Mini

openai openai-gpt-5-mini

Copy model ID

PricingInput $0.25 / 1M tokens

Output $2.00 / 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)

[MM](https://modelslab.com/models/open_router/mistralai-ministral-14b-2512)[Open Router](https://modelslab.com/models/open_router)

 [Mistral: Ministral 3 14B 2512

Closed Source Model](https://modelslab.com/models/open_router/mistralai-ministral-14b-2512)

[AA](https://modelslab.com/models/open_router/arcee-ai-coder-large)[Open Router](https://modelslab.com/models/open_router)

 [Arcee AI: Coder Large

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

[ML](https://modelslab.com/models/together_ai/meta-llama-Llama-3.2-1B-Instruct)[Together AI](https://modelslab.com/models/together_ai)

 [Meta Llama 3.2 1B Instruct

Closed Source Model](https://modelslab.com/models/together_ai/meta-llama-Llama-3.2-1B-Instruct)

[MV](https://modelslab.com/models/open_router/anthracite-org-magnum-v4-72b)[Open Router](https://modelslab.com/models/open_router)

 [Magnum v4 72B

Closed Source Model](https://modelslab.com/models/open_router/anthracite-org-magnum-v4-72b)

[DD](https://modelslab.com/models/open_router/deepseek-deepseek-v3.2)[Open Router](https://modelslab.com/models/open_router)

 [DeepSeek: DeepSeek V3.2

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

[ML](https://modelslab.com/models/meta/meta-llama-Meta-Llama-3.1-70B-Instruct-Turbo)[ModelsLab](https://modelslab.com/models/meta)

 [Meta Llama 3.1 70B Instruct Turbo

Closed Source Model](https://modelslab.com/models/meta/meta-llama-Meta-Llama-3.1-70B-Instruct-Turbo)

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

 [Qwen2.5-VL (72B) Instruct

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

[QQ](https://modelslab.com/models/open_router/qwen-qwen3.6-35b-a3b)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen3.6 35B A3B

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen3.6-35b-a3b)

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

 [Anthropic: Claude Sonnet 4.6

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

[ER](https://modelslab.com/models/together_ai/togethercomputer-EssentialAI-RNJ-1-Instruct)[Together AI](https://modelslab.com/models/together_ai)

 [EssentialAI Rnj-1 Instruct

Closed Source Model](https://modelslab.com/models/together_ai/togethercomputer-EssentialAI-RNJ-1-Instruct)

[AA](https://modelslab.com/models/arcee_ai/arcee-ai-coder-large)[ModelsLab](https://modelslab.com/models/arcee_ai)

 [Arcee AI Coder-Large

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

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

 [OpenAI: GPT-5.5 Pro

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

[ML](https://modelslab.com/models/together_ai/meta-llama-Meta-Llama-3-70B-Instruct-Turbo)[Together AI](https://modelslab.com/models/together_ai)

 [Meta Llama 3 70B Instruct Turbo

Closed Source Model](https://modelslab.com/models/together_ai/meta-llama-Meta-Llama-3-70B-Instruct-Turbo)

[![Gemini 2.5 Pro](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/ede9a278-de62-47fb-a53d-99ee4c7b7abc.png)](https://modelslab.com/models/google/gemini-2.5-pro)[Google](https://modelslab.com/models/google)

 [Gemini 2.5 Pro

Closed Source Model](https://modelslab.com/models/google/gemini-2.5-pro)

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

 [Baidu: ERNIE 4.5 21B A3B

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

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

 [OpenAI: GPT-4 Turbo (older v1106)

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

[XG](https://modelslab.com/models/open_router/x-ai-grok-3)[Open Router](https://modelslab.com/models/open_router)

 [xAI: Grok 3

Closed Source Model](https://modelslab.com/models/open_router/x-ai-grok-3)

[MM](https://modelslab.com/models/open_router/mistralai-ministral-3b-2512)[Open Router](https://modelslab.com/models/open_router)

 [Mistral: Ministral 3 3B 2512

Closed Source Model](https://modelslab.com/models/open_router/mistralai-ministral-3b-2512)

About OpenAI: GPT-5 Mini
---

GPT-5 Mini is a compact version of GPT-5, designed to handle lighter-weight reasoning tasks. It provides the same instruction-following and safety-tuning benefits as GPT-5, but with reduced latency and cost....

### Technical Specifications

Model IDopenai-gpt-5-miniCategoryLLM ModelsTaskText GenerationPrice$1.125000 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: GPT-5 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-gpt-5-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-gpt-5-mini/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

OpenAI: GPT-5 Mini API costs $1.125000 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

[Learn more about OpenAI: GPT-5 Mini](https://modelslab.com/openai-gpt-5-mini) [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: GPT-5 Mini FAQ
---

### What is OpenAI: GPT-5 Mini?

GPT-5 Mini is a compact version of GPT-5, designed to handle lighter-weight reasoning tasks. It provides the same instruction-following and safety-tuning benefits as GPT-5, but with reduced latency and cost....

### How do I use the OpenAI: GPT-5 Mini API?

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

### How much does OpenAI: GPT-5 Mini cost?

OpenAI: GPT-5 Mini costs $1.125000 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: GPT-5 Mini model ID?

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

### Does OpenAI: GPT-5 Mini have a free tier?

Yes, ModelsLab offers a free tier that lets you try OpenAI: GPT-5 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-30*