Skip to main content

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": "deepseek/deepseek-chat-v3-0324",
  "object": "model",
  "created": 1736966400,
  "owned_by": "deepseek"
}
Use ?detailed=true to include additional fields like name, description, context_length, capabilities.vision, 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": "deepseek/deepseek-chat-v3-0324",
  "object": "model",
  "created": 1736966400,
  "owned_by": "deepseek",
  "name": "DeepSeek V3 (0324)",
  "description": "General-purpose chat model with strong reasoning",
  "context_length": 128000,
  "capabilities": { "vision": false },
  "pricing": {
    "prompt": 2500,
    "completion": 10000,
    "currency": "USD",
    "unit": "per_million_tokens"
  },
  "icon_url": "/icons/DeepSeek.svg",
  "cost_estimate": {
    "cheap": true
  }
}

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": {
    "deepseek/deepseek-chat-v3-0324": true,
    "claude-3-haiku": false
  },
  "modelCategories": {
    "deepseek/deepseek-chat-v3-0324": "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).