Cost
Token & cost calculator
Estimate what a design costs before you build it. Token counts here are an approximation — the usage field on a real response is the authority.
Prompt · paste your real one
300 chars · ≈72 tokens
| Model | Per call | Per day | Per month |
|---|---|---|---|
node-reason-70b$0.60 in · $0.80 out / 1M | $0.000363 | $0.3632 | $10.9 |
node-fast-8b$0.05 in · $0.08 out / 1M | $0.000036 | $0.0356 | $1.07 |
Routing is worth 10×
At this shape,
node-fast-8b costs 10.2× less per call than node-reason-70b — $9.83 a month at 1,000 calls/day. Send the easy majority to the small model and escalate only what needs it; that's usually the single largest saving available.Check the real numbers
Every completion returns exact token counts, and GET /usage reports metered spend per model. Costs come back in USD micros as well as dollars — store the integer.
measure.ts
const completion = await nd.inference.create({ model, messages, max_tokens: 400 });console.log(completion.usage);// { prompt_tokens: 214, completion_tokens: 38, total_tokens: 252 } const usage = await nd.account.usage({ days: 30 });console.log(usage.summary.cost_usd, usage.summary.cost_micros);for (const m of usage.by_model) console.log(m.model, m.calls, m.cost_usd);Four ways to spend less
- 1Route by difficulty. Classification and extraction rarely need the flagship model.
- 2Always set max_tokens. It's the only hard ceiling on a runaway generation.
- 3Cache identical prompts. At temperature 0 the result is deterministic enough to reuse.
- 4Trim context. Input tokens are billed too — a 50k prompt for a yes/no answer is pure waste.
Token estimates blend a characters-per-token heuristic with a word count, which lands within roughly 10–15% for English prose and is less accurate for code or non-Latin scripts. Prices are the published catalog rates; fetch nd.inference.models() for the live values before billing anyone.