Text model API

GPT-4.1 Nano API

Fastest, most cost-effective GPT-4.1 model from OpenAI. Designed for tasks requiring low latency, such as classification and autocompletion, it offers a substantial 1 million token context window—matching its larger counterparts. Despite its compact size, GPT-4.1 Nano demonstrates impressive performance, achieving 80.1% on the MMLU benchmark and 50.3% on GPQA.

Model id
gpt-4-1-nano
Takes
Text (required)
Makes
Text
Endpoint
POST /api/v1/chat/completions
Made by
OpenAI
Mode
Synchronous

Call GPT-4.1 Nano

Base URL https://payload.rentprompts.com/api/v1. Replace the placeholder with your key.

Model gpt-4-1-nano

POST /api/v1/chat/completions

curl https://payload.rentprompts.com/api/v1/chat/completions \
  -H "Authorization: Bearer rp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-4-1-nano",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about APIs."
    }
  ],
  "max_tokens": 256
}'

Replace rp_live_YOUR_KEY with your key, ideally via the RENTPROMPTS_API_KEY environment variable. Keys are shown only once, so they are never filled in here. Get your API key →

What a typical call costs

Worked out from GPT-4.1 Nano's published price (0.01 J in · 0.04 J out / 1K tokens). You pay only for successful results, from your Joule balance.
  • 1,000 input + 500 output tokens0.03 Joules
  • 10,000 input + 2,000 output tokens0.18 Joules

Send requests to POST /api/v1/chat/completions. GPT-4.1 Nano answers synchronously: the result comes back in the response to the same request. Token counts come from the model's own usage report, so a real call may use more or fewer tokens than this example.

Settings

Optional parameters this model accepts (pass them in settings on /v1/run, or as top-level fields where OpenAI defines them).
NameTypeDefaultRange / options
max_completion_tokensinteger40961 – 32768
temperatureinteger10 – 2
top_pfloat10 – 1
GPT-4.1 Nano API — Pricing & Code Examples | RentPrompts