---
title: OpenAI: GPT 5 API | Text Generation | ModelsLab
description: Advanced LLM with 400K token context, multimodal input (text/image), superior reasoning/coding (88% benchmarks), multi-stage routing, and agentic.
url: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/openai/openai-gpt-5/api.md
canonical: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/openai/openai-gpt-5/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-05-13T10:32:45.195620Z
---

OpenAI: GPT-5
---

 [LLMs.txt](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5/llms.txt) [.md](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/openai/openai-gpt-5.md)

openai-gpt-5 openai Closed Source Model $5.625000 / call

OpenAI: GPT-5
---

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

openai openai-gpt-5

Copy model ID

PricingInput $1.25 / 1M tokens

Output $10.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-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster)

[G3](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/google-gemma-3-270m-it)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Gemma 3 270M It

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/google-gemma-3-270m-it)

[AC](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/anthropic-claude-opus-4.5)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Anthropic: Claude Opus 4.5

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/anthropic-claude-opus-4.5)

[PL](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/poolside-laguna-xs.2-free)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Poolside: Laguna XS.2 (free)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/poolside-laguna-xs.2-free)

[DR](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [DeepSeek R1 Distill Qwen 7B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Qwen-7B)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-audio-mini)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT Audio Mini

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-audio-mini)

[NN](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nvidia-NVIDIA-Nemotron-3-Super-120B-A12B-BF16)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Nvidia Nemotron 3 Super 120B A12b Bf16

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nvidia-NVIDIA-Nemotron-3-Super-120B-A12B-BF16)

[MK](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/moonshotai-kimi-k2.5)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [MoonshotAI: Kimi K2.5

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/moonshotai-kimi-k2.5)

[WP](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/writer-palmyra-x5)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Writer: Palmyra X5

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/writer-palmyra-x5)

[Q3](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-32B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen2.5 32B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-32B)

[BS](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/bytedance-seed-seed-2.0-lite)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [ByteDance Seed: Seed-2.0-Lite

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/bytedance-seed-seed-2.0-lite)

[MD](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-devstral-small)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Mistral: Devstral Small 1.1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-devstral-small)

[QC](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3-Coder-30B-A3B-Instruct)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen3 Coder 30B A3b Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3-Coder-30B-A3B-Instruct)

[ZG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/z-ai-glm-4.6)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Z.ai: GLM 4.6

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/z-ai-glm-4.6)

[DR](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Llama-70B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [DeepSeek R1 Distill Llama 70B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Llama-70B)

[Q1](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3.5-122B-A10B-FP8)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen3.5 122B A10b Fp8

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3.5-122B-A10B-FP8)

[BQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/baidu-cobuddy-free)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Baidu Qianfan: CoBuddy (free)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/baidu-cobuddy-free)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-4o-audio-preview)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-4o Audio

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-4o-audio-preview)

[NN](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/nvidia-nemotron-nano-9b-v2-free)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [NVIDIA: Nemotron Nano 9B V2 (free)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/nvidia-nemotron-nano-9b-v2-free)

About OpenAI: GPT-5
---

GPT-5 is OpenAI’s most advanced model, offering major improvements in reasoning, code quality, and user experience. It is optimized for complex tasks that require step-by-step reasoning, instruction following, and accuracy...

### Technical Specifications

Model IDopenai-gpt-5CategoryLLM ModelsTaskText GenerationPrice$5.625000 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 into your application with a single API call. Get your API key from the [pricing page](https://modelslab-frontend-v2-927501783998.us-east4.run.app/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",
        "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-frontend-v2-927501783998.us-east4.run.app/models/openai/openai-gpt-5/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

OpenAI: GPT-5 API costs $5.625000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab-frontend-v2-927501783998.us-east4.run.app/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](https://modelslab-frontend-v2-927501783998.us-east4.run.app/openai-gpt-5) [Browse LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster) [More from Openai](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router) [View Pricing](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

OpenAI: GPT-5 FAQ
---

### What is OpenAI: GPT-5?

GPT-5 is OpenAI’s most advanced model, offering major improvements in reasoning, code quality, and user experience. It is optimized for complex tasks that require step-by-step reasoning, instruction following, and accuracy...

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

You can integrate OpenAI: GPT-5 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" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

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

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

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

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

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