naïve
Back to Primitives

2 actions · from about $0.0001 / pick

Model routing

NaiveTool

List the AI models Naive can route to, with prices and context sizes, and let Naive pick the best of a few candidates for each request from a one-line brief per model. Picking is billed at cost, a fraction of a cent.

Part of AI models

Actions

Every action: POST /v1/tools/runs { "tool": "<name>", "input": { … } }

  • Model routing

    List models

    models.list

    The models Naive routes to, with prices and context sizes.

    Parameters
    ParameterDescription
    search
    string
    Words to match in a model's id or name.
    window
    string
    Rank by usage over this window, e.g. "day" or "week".
    Example response
    {
      "object": "list",
      "data": [
        {
          "id": "anthropic/claude-sonnet-4.5",
          "name": "Claude Sonnet 4.5",
          "context_length": 200000
        }
      ]
    }
    Free
  • Model routing

    Pick a model

    models.auto_select

    The best of your candidate models for one request.

    Parameters
    ParameterDescription
    options
    object · required
    2 to 16 candidates: model id → a one-line brief of what it is good at.
    messages
    object[] · required
    The request as chat messages, each {role: user|assistant, content}.
    default
    string
    The option to fall back to when no pick is confident enough.
    min_confidence
    number
    0-1: below this, answer the default (needs default).
    Example response
    {
      "object": "model_selection",
      "model": "openai/gpt-5-mini",
      "confidence": 0.91,
      "defaulted": false,
      "spent_micro_usd": 100
    }
    about $0.0001 / pick

Pricing

from about $0.0001 / pick

Billed per call to one prepaid balance. No vendor accounts, no subscription.

Code

import { createNaive } from "@usenaive-sdk/naive"; const naive = createNaive(); // reads NAIVE_API_KEYconst run = await naive.tools.run("models.list", {"search":"claude"}, { wait: true });console.log(run.output);

Related tools

  • Naive

    Search the web and get page text back.

    $0.00015
    per call
    1 action
  • Naive

    Text to image and image editing, up to 4K.

    from $0.004
    per image
    2 actions
  • Naive

    Text or image to video with sound, 5–15 s.

    $0.05
    per second
    1 action