GPT-4.1 Nano
Sign in to try GPT-4.1 Nano
Sign in with your Google account and top up credits to get started.
Sign in with GoogleUse via API
Base URL: https://adverraai.com/hub/api/v1 · Authenticate with Authorization: Bearer YOUR_API_KEY
curl https://adverraai.com/hub/api/v1/chat/completions \
-H "Authorization: Bearer $ADVERRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4.1-nano",
"messages": [{"role": "user", "content": "Hello"}],
"stream": false
}'
# pip install openai
from openai import OpenAI
client = OpenAI(base_url="https://adverraai.com/hub/api/v1", api_key="YOUR_API_KEY")
r = client.chat.completions.create(
model="openai/gpt-4.1-nano",
messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)
const r = await fetch("https://adverraai.com/hub/api/v1/chat/completions", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ model: "openai/gpt-4.1-nano", messages: [{ role: "user", content: "Hello" }] })
});
const data = await r.json();
console.log(data.choices[0].message.content, data.usage.credits);
Fully compatible with OpenAI Chat Completions: stream, temperature, max_tokens, tools, image messages, etc. The response includes usage.credits showing the credits used.
Parameters for this model
Send as JSON in the request body. Fields marked * are required.
| Parameter | Type | Allowed values | Default | Description |
|---|---|---|---|---|
model * |
string | – | – | ID of the model to call — openai/gpt-4.1-nano |
messages * |
array | – | – | Conversation messages, each with role (system / user / assistant) and content |
max_tokens |
integer | – | – | Maximum tokens in the answer |
temperature |
number | 0 – 2 | 1 | Randomness of the answer; lower is steadier |
top_p |
number | 0 – 1 | 1 | Nucleus sampling threshold |
stream |
boolean | true, false | false | Stream the answer back in chunks (SSE) |
stop |
string | array | – | – | Sequences where generation stops |
tools |
array | – | – | Tools (functions) the model may call |
tool_choice |
string | object | – | – | Controls how tools are chosen |
response_format |
object | – | – | Forces an answer format such as JSON |
🤖 ต่อกับ AI Agent
คัดลอกข้อความนี้ไปวางให้ AI Agent (เช่น Claude, ChatGPT, Gemini, Cursor, Codex) แล้วมันจะเรียกใช้โมเดลนี้ผ่านระบบของเราได้ทันที · ในข้อความมีวิธีเชื่อมต่อ พารามิเตอร์ และวิธีรับผลงานครบ · เลือกคีย์ด้านบนเพื่อใส่ในข้อความที่จะคัดลอก
# Adverra AI Hub — GPT-4.1 Nano (`openai/gpt-4.1-nano`)
You can use this AI model through the Adverra AI Hub REST API. Follow these instructions exactly.
## Connection
- Base URL: https://adverraai.com/hub/api/v1
- Header: `Authorization: Bearer <ADVERRA_API_KEY>` (read the credential from the ADVERRA_API_KEY environment variable). Never print the key.
- Header: `Content-Type: application/json`
- Endpoint: `POST https://adverraai.com/hub/api/v1/chat/completions`
- Credits are deducted from the user's Adverra balance (check with `GET https://adverraai.com/hub/api/v1/me`).
## Example request body
```json
{
"model": "openai/gpt-4.1-nano",
"messages": [
{
"role": "user",
"content": "สวัสดี"
}
]
}
```
## Parameters
- `model` (string, required) — ID of the model to call — openai/gpt-4.1-nano
- `messages` (array, required) — Conversation messages, each with role (system / user / assistant) and content
- `max_tokens` (integer, optional) — Maximum tokens in the answer
- `temperature` (number, optional) — Randomness of the answer; lower is steadier · allowed: 0 – 2 · default: 1
- `top_p` (number, optional) — Nucleus sampling threshold · allowed: 0 – 1 · default: 1
- `stream` (boolean, optional) — Stream the answer back in chunks (SSE) · allowed: true, false · default: false
- `stop` (string | array, optional) — Sequences where generation stops
- `tools` (array, optional) — Tools (functions) the model may call
- `tool_choice` (string | object, optional) — Controls how tools are chosen
- `response_format` (object, optional) — Forces an answer format such as JSON
## Result
OpenAI-compatible chat completion response. Set `"stream": true` for server-sent events.
## Errors
- 401 = invalid API key · 402 = not enough credits (tell the user to top up at https://adverraai.com/hub/topup.php) · 429 = too many requests (wait and retry) · 5xx = temporary error (credits are refunded automatically).
## MCP (optional)
Agents that support MCP can connect to `https://adverraai.com/hub/mcp.php` instead (setup guide: https://adverraai.com/hub/connect.php).
About this model
GPT-4.1 Nano is a Chat & Text model by Adverra AI Hub
GPT-4.1 Nano is a compact and highly efficient language model designed for speed and performance within the GPT-4.1 series. Developed for tasks requiring low latency, it offers exceptional capabilities despite its smaller size. This model is ideal for applications where quick responses and efficient processing are paramount. It supports a variety of inputs including text, images, and files.
Key features
- Fastest model in the GPT-4.1 series
- Optimized for low-latency applications
- Exceptional performance at a small size
- Supports text, image, and file inputs
- Large context window of 1,047,576 tokens
What you can do
- Real-time conversational AI
- Quick content generation and summarization
- Efficient data extraction from various file types
- Rapid image analysis and description
- Interactive virtual assistants
- High-throughput text processing tasks
Specs
- Context window: 1,047,576 tokens
- Input types: Text, Image, File
Prompt tips
- For speed-critical tasks, clearly state the need for a concise and direct response.
- When processing files or images, specify the key information you want extracted or analyzed.
- Break down complex requests into smaller, sequential prompts to leverage its efficiency.
- Provide clear examples for desired output formats to ensure accuracy and speed.
- Utilize the large context window by providing comprehensive background information when necessary.