Models and credits
List the AI models a Nodaro instance offers with client.models, read your credit balance, and look up the price of a model before you run it.
client.models returns the catalog of AI models a Nodaro instance offers, and client.credits returns your credit balance and the price of any model. Use them together to show users which models they can pick and what each run costs. The methods call the same endpoints as the Credits REST API. Prices and balances exist on Nodaro Cloud; self-hosted Community and Business installs have no credit system. See Credits.
Methods
| Method | What it does |
|---|---|
models.list(opts?) | List the models, grouped by kind and maker |
credits.balance() | Read your credit balance and tier |
credits.modelCosts(ids) | Look up the credit price of up to 50 models or variants |
client.models
models.list(opts?)
Returns the model catalog (GET /v1/models), grouped by kind (image, video, audio) and by maker. Each model has its capabilities, its credit prices on Nodaro Cloud, and short prompt tips. The endpoint is public, and the server caches the answer for 5 minutes. The MCP list_models tool returns the same data.
list(opts?: {
kind?: "image" | "video" | "audio"
mode?: string
family?: string
featuredOnly?: boolean
}): Promise<ModelsListResult>Prop
Type
const catalog = await client.models.list({ kind: "video", mode: "i2v" })
for (const section of catalog.sections) {
for (const family of section.families) {
for (const model of family.models) {
console.log(family.family, model.id, model.durations, model.pricing?.[0]?.credits)
}
}
}The result has sections, one per kind, each with families of models; recommendations, lists of model ids for common jobs; and totalModels. Each model has these fields:
| Field | Type | Description |
|---|---|---|
id | string | The model id, for the provider parameter of a node run. |
label, description | string | The display name and a short description. |
modes | string[] | What the model does, such as t2i, i2i, t2v or i2v. |
useCases | string[] | Jobs the model suits. |
aspectRatios, resolutions, qualities, durations | arrays | The values the model accepts, where they apply. |
features | string[] | Extra capabilities. |
pricing | { identifier, credits, note? }[] | The credit price of each variant. Nodaro Cloud only. |
featured | boolean | Whether the model is featured. |
promptTips | string[] | Short prompting advice for the model. |
doctrineCovered | boolean | true only when Nodaro has sourced prompting guidance for the model's family. Show a "maker guidance" badge only when it is true. |
The same catalog is on the Models pages. For advice on which model to use, read Choosing a model.
client.credits
credits.balance()
Returns your credit balance and tier (GET /v1/user/credits). Throws UnauthorizedError when no user is signed in.
balance(): Promise<UserBalance>const balance = await client.credits.balance()
console.log(`${balance.total} credits (${balance.effectiveTier})`)| Field | Type | Description |
|---|---|---|
total | number | The credits you can spend now. |
subscription | number | Credits from the current subscription period. |
topup | number | Credits you bought separately. |
dailySpent | number | Credits spent today. |
dailyLimit | number | null | The daily spending limit, or null for none. |
monthlyAllocation | number | Credits granted per billing period. |
tier | string | The stored subscription tier, such as "free" or "pro". |
effectiveTier | string | The tier actually applied. "payg" means pay-as-you-go: no subscription, but bought credits, with every model, no watermark and no daily limit. |
features | Record<string, unknown> | The features of the tier. |
periodEnd | string | null | The end of the billing period, as an ISO 8601 date. |
appCreditsAllowance | number | Credits earned by running apps, on the free tier. |
externalWallet | { available: number | null } | Present when the deployment uses a shared external wallet. null means the amount is unavailable. Do not show total in its place. See External wallet. |
Prefer effectiveTier over tier when you decide what to show.
credits.modelCosts(ids)
Looks up the credit price of models and their variants in one call (POST /v1/credits/model-costs). It checks up to the first 50 identifiers.
modelCosts(ids: string[]): Promise<{
data: Record<string, number>
missing: string[]
errors: string[]
}>Prop
Type
const { data, missing } = await client.credits.modelCosts([
"nano-banana-pro",
"nano-banana-pro:4K",
"seedance-2-fast:8s:720p",
])
console.log(data["nano-banana-pro:4K"])
if (missing.length) console.warn("No price for:", missing)datamaps each priced identifier to its credit price.missinglists identifiers that have no price. Show a dash for them.errorslists identifiers whose lookup failed. The other prices still arrive.
The identifiers of each model are in the pricing field of models.list() and on each model's page. Settings such as quality, resolution and duration change the price, so name the variant the run will use. The price at run time is checked again when the run starts, so this call is a preview.
Show models with their prices
Build a model picker for one node, with the price next to each model:
const { data: node } = await client.nodes.get("generate-video")
const { data: prices } = await client.credits.modelCosts(node.providers ?? [])
const options = (node.providers ?? []).map((id) => ({
id,
price: prices[id] ?? null, // null: no price on this instance
}))Omit provider in a run to use the node's default model. When a user picks a model, send its id as provider to client.nodes.runAndWait().
Frequently asked questions
Related
Run nodes
Credits
Choosing a model
AI models in Nodaro
Credits
Last updated on
Copilot
client.copilot drives the Copilot assistant's threads and streamed turns. It works only inside a Nodaro app, with a signed-in user's own session.
Pickers, presets and prompts
Read every picker's valid options, fill pickers from a scene description, load node presets, and improve prompts with the Prompt Wizard from TypeScript.