GPT-5-nano is the smallest and most affordable model in the GPT-5 family. It favors speed and low cost over the higher accuracy available from GPT-5-mini or GPT-5, making it useful for fast language-processing tasks. section 2.1.2 section 1.7
Use GPT-5-nano when the application benefits from economical, responsive generation:
- Call it through the OpenAI Chat Completions API with system and user messages. section 2.1.2
- Use it for fast summarization or as one model within a workflow that assigns harder tasks to larger models. section 1.7
- Expect lower accuracy for some tasks; choose GPT-5-mini or GPT-5 when accuracy matters more than cost and latency. section 2.1.2
Minimal API call
Create an OpenAI client with a securely entered API key, then send a system instruction and a phishing-awareness prompt using model="gpt-5-nano". The returned assistant message contains a concise reminder to verify senders, inspect links, avoid suspicious attachments, and report concerns. section 2.1.2
prompt_input = """Write a concise message to remind
users to be vigilant about phishing attacks."""
response = client.chat.completions.create(
model="gpt-5-nano",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt_input}
]
)
print(response)
Shows the complete minimal Python request, including the model name, conversational message roles, prompt, and response object. section 2.1.2
Figure 6.5 RAG architecture, including ChromaDB and the GPT-5-nano model
Illustrates GPT-5-nano inside a retrieval-augmented generation pipeline where ChromaDB supplies content before answer generation. section 6.3
