Back to Models
GPT-4.1 Nano
openaiopenai/gpt-4.1-nano
API guide
Chat completion
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-4.1-nano","messages":[{"role":"user","content":"Hello"}]}'Streaming
Streaming works identically to the OpenAI SDK β set stream: true. Ideal for Nano's low-latency profile.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-4.1-nano","messages":[{"role":"user","content":"Hello"}],"stream":true}'Tool calling
GPT-4.1 Nano supports parallel tool calling via the OpenAI-compatible API β useful for fast tool-selection routing steps in agentic workflows.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-4.1-nano","messages":[{"role":"user","content":"What is the weather in Tokyo?"}],"tools":[{"type":"function","function":{"name":"get_weather","description":"Get current temperature","parameters":{"type":"object","properties":{"location":{"type":"string"}}}}}],"tool_choice":"auto"}'Structured outputs
Set response_format to JSON schema for guaranteed structured parsing. Nano's low cost makes it ideal for high-volume extraction pipelines.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-4.1-nano","messages":[{"role":"user","content":"Extract name and age from: John is 30"}],"response_format":{"type":"json_schema","json_schema":{"name":"person","strict":true,"schema":{"type":"object","properties":{"name":{"type":"string"},"age":{"type":"number"}},"additionalProperties":false}}}}'Vision
GPT-4.1 Nano accepts image inputs alongside text. Use it for cheap, fast image classification or OCR pre-processing.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-4.1-nano","messages":[{"role":"user","content":[{"type":"text","text":"What is in this image?"},{"type":"image_url","image_url":{"url":"https://therouter.ai/assets/vision-sample.png"}}]}]}'Fact ledger β every claim on this page traces here
| source | URL | retrieved | |
|---|---|---|---|
| Release date | openai.com β | 2026-05-28 | verified |
| Knowledge cutoff | openai.com β | 2026-05-28 | verified |
| Training cutoff | openai.com β | 2026-05-28 | verified |
| License | openai.com β | 2026-05-28 | verified |
| Model family position | openai.com β | 2026-05-28 | verified |
| MMLU | openai.com β | 2026-05-28 | verified |
| GPQA | openai.com β | 2026-05-28 | verified |
| Aider Polyglot | openai.com β | 2026-05-28 | verified |
| GPT-4.1 family launched with first-ever Nano model | openai.com β | 2026-05-28 | verified |
| How does GPT-4.1 Nano compare to GPT-4o Mini? | openai.com β | 2026-05-28 | to verify |
| What is GPT-4.1 Nano best used for? | openai.com β | 2026-05-28 | to verify |