Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nano-gpt.com/llms.txt

Use this file to discover all available pages before exploring further.

Personalized Models API

Curated, OpenAI‑compatible model listing scoped to each account’s preferences. This endpoint returns only the text models you have marked as “visible” in Settings → Models, regardless of whether they are subscription or paid models.
  • GET /api/personalized/v1/models
See also:
  • Canonical models list: GET /api/v1/models
  • Subscription‑only list: GET /api/subscription/v1/models
  • Paid‑only list: GET /api/paid/v1/models

Compatibility & Response Shape

The response mirrors OpenAI’s Models API:
{
  "object": "list",
  "data": [ { /* model */ }, ... ]
}
Each model contains at least:
{
  "id": "openai/gpt-5.2",
  "object": "model",
  "created": 1736966400,
  "owned_by": "openai"
}
Use ?detailed=true to include additional fields like name, description, context_length, capabilities, pricing, icon_url, and cost_estimate.

Authentication

An API key is required.
  • Authorization: Bearer <api_key>
  • or x-api-key: <api_key>
If the key is missing or invalid, the endpoint returns 401.

Personalization Rules

  • The list is filtered by your account’s visible text models (configured in the NanoGPT web app under Settings → Models → “Visible Text Models”).
  • This endpoint ignores the user preference “Also show paid models.” If you marked paid models as visible, they appear here even if you generally hide paid models elsewhere.
  • If you have not set any preferences, the endpoint falls back to NanoGPT defaults (visible === true in our model registry).

Examples

Basic list:
curl -H "Authorization: Bearer $NANOGPT_API_KEY" \
  https://nano-gpt.com/api/personalized/v1/models
Detailed list with pricing/capabilities:
curl -H "x-api-key: $NANOGPT_API_KEY" \
  "https://nano-gpt.com/api/personalized/v1/models?detailed=true"
Sample detailed item:
{
  "id": "openai/gpt-5.2",
  "object": "model",
  "created": 1736966400,
  "owned_by": "openai",
  "name": "GPT-5.2",
  "description": "OpenAI flagship general-purpose model",
  "context_length": 128000,
  "capabilities": { "vision": false },
  "pricing": {
    "prompt": 2.50,
    "completion": 10.00,
    "currency": "USD",
    "unit": "per_million_tokens"
  },
  "icon_url": "/icons/OpenAI.svg",
  "cost_estimate": {
    "cheap": false
  }
}

Managing Your Visible Models

The recommended way to customize your personalized list is via the NanoGPT web UI:
  • Open Settings → Models → “Visible Text Models”.
  • Toggle visibility and categories as needed; changes are saved to your account.
Advanced (web session only):
  • GET /api/user/model-visibility — returns your saved preferences as { modelPreferences: { visibleTextModels, modelCategories } }.
  • POST /api/user/model-visibility — upserts preferences. Cookie‑based session auth is required (not API‑key auth).
Payload shape:
{
  "visibleTextModels": {
    "openai/gpt-5.2": true,
    "anthropic/claude-opus-4.5": false
  },
  "modelCategories": {
    "openai/gpt-5.2": "General"
  }
}
Keys outside NanoGPT’s known model ids are ignored.

Notes

  • This route is explicitly dynamic (no shared caching across keys).
  • Model ids and metadata evolve as providers update their catalogs; keep consumers resilient to new fields.
  • Personalized results may include paid models even if /api/v1/models hides them for your account (by design).