---
title: GPT 5 Nano API | Text Generation | ModelsLab
description: Lightweight LLM delivering ultra-fast, cost-efficient multimodal AI with a massive 400K token context window and optimized transformer architecture for.
url: https://modelslab.com/models/openai/gpt-5-nano/api.md
canonical: https://modelslab.com/models/openai/gpt-5-nano/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-04-24T23:32:48.544525Z
---

GPT-5-nano
---

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

gpt-5-nano openai Closed Source Model $0.225000 / call

GPT-5-nano
---

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

### GPT-5-nano

openai gpt-5-nano

Copy model ID

PricingInput $0.05 / 1M tokens

Output $0.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)

[LG](https://modelslab.com/models/open_router/meta-llama-llama-guard-3-8b)[Open Router](https://modelslab.com/models/open_router)

 [Llama Guard 3 8B

Closed Source Model](https://modelslab.com/models/open_router/meta-llama-llama-guard-3-8b)

[PS](https://modelslab.com/models/open_router/perplexity-sonar-deep-research)[Open Router](https://modelslab.com/models/open_router)

 [Perplexity: Sonar Deep Research

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

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

 [OpenAI: GPT-5 Mini

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

[NL](https://modelslab.com/models/open_router/nvidia-llama-3.1-nemotron-70b-instruct)[Open Router](https://modelslab.com/models/open_router)

 [NVIDIA: Llama 3.1 Nemotron 70B Instruct

Closed Source Model](https://modelslab.com/models/open_router/nvidia-llama-3.1-nemotron-70b-instruct)

[OG](https://modelslab.com/models/open_router/openai-gpt-oss-safeguard-20b)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: gpt-oss-safeguard-20b

Closed Source Model](https://modelslab.com/models/open_router/openai-gpt-oss-safeguard-20b)

[DR](https://modelslab.com/models/deepseek/deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B)[ModelsLab](https://modelslab.com/models/deepseek)

 [DeepSeek R1 Distill Qwen 1.5B

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

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

 [OpenAI: GPT-4o-mini

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

[L4](https://modelslab.com/models/meta/meta-llama-Llama-4-Scout-17B-16E-Instruct)[ModelsLab](https://modelslab.com/models/meta)

 [Llama 4 Scout Instruct (17Bx16E)

Closed Source Model](https://modelslab.com/models/meta/meta-llama-Llama-4-Scout-17B-16E-Instruct)

[ER](https://modelslab.com/models/together_ai/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/essentialai-rnj-1-instruct)

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

 [Anthropic: Claude Opus 4

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

[AA](https://modelslab.com/models/open_router/aion-labs-aion-2.0)[Open Router](https://modelslab.com/models/open_router)

 [AionLabs: Aion-2.0

Closed Source Model](https://modelslab.com/models/open_router/aion-labs-aion-2.0)

[DV](https://modelslab.com/models/together_ai/deepseek-ai-DeepSeek-V3.1-Terminus)[Together AI](https://modelslab.com/models/together_ai)

 [Deepseek V3.1 Terminus

Closed Source Model](https://modelslab.com/models/together_ai/deepseek-ai-DeepSeek-V3.1-Terminus)

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

 [OpenAI: GPT-5 Pro

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

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

 [Qwen2.5 72B

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

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

 [OpenAI: GPT-5.5

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

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

 [Z.ai: GLM 4.5 Air

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

[G4](https://modelslab.com/models/together_ai/google-gemma-4-26B-A4B-it)[Together AI](https://modelslab.com/models/together_ai)

 [Gemma 4 26B A4b It

Closed Source Model](https://modelslab.com/models/together_ai/google-gemma-4-26B-A4B-it)

[![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)

About GPT-5-Nano
---

GPT-5 Nano is the fastest, lightest, and cheapest GPT-5 variant, built for real-time, high volume tasks. It trades deep reasoning for ultra-low latency and cost efficiency.

### Technical Specifications

Model IDgpt-5-nanoCategoryLLM ModelsTaskText GenerationPrice$0.225000 per million tokensAddedAugust 7, 2025

### 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 GPT-5-Nano 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": "gpt-5-nano",
        "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/gpt-5-nano/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

GPT-5-Nano API costs $0.225000 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 GPT-5-Nano](https://modelslab.com/gpt-5-nano) [Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from Openai](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

GPT-5-Nano FAQ
---

### What is GPT-5-Nano?

GPT-5 Nano is the fastest, lightest, and cheapest GPT-5 variant, built for real-time, high volume tasks. It trades deep reasoning for ultra-low latency and cost efficiency.

### How do I use the GPT-5-Nano API?

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

### How much does GPT-5-Nano cost?

GPT-5-Nano costs $0.225000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the GPT-5-Nano model ID?

The model ID for GPT-5-Nano is "gpt-5-nano". Use this ID in your API requests to specify this model.

### Does GPT-5-Nano have a free tier?

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