Nodedistro API Docs
Docs Usage Help Open Chat
API platform

Build with Nodedistro

Access leading AI models through one API, one key, and one prepaid developer balance.

Quickstart
curl https://ai.nodedistro.com/api/developer/chat \
  -H "Authorization: Bearer $NODEDISTRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Hello!"}]}'

Project overview

Developer API activity for the current billing month.

Default project
Credit balance$0.00Required for Developer API
Requests0This billing month
Tokens00 input / 0 output
Active keys00 total keys
Developer balance $0.00

Buy a pack or enter a custom amount (min $5).

Get started

Go from key to first response in minutes.

3 steps

API keys

Recently created credentials.

API endpoint

Use this base URL from your server.

Bearer API key required

Default project

API keys

Create and manage secret keys for this project.
Your secret API keys are listed below. Never expose a key in browser or client-side code.
NameKeyLifetime usageLast usedStatusActions

Default project

Playground

Prototype prompts and inspect live API responses.

Configuration

POST

Response

Ready
Run a request to see the model response, latency, tokens, and cost.

API reference

API Platform

Build with the Nodedistro AI Chat API. One authenticated endpoint for model routing, optional web search, and account-level usage metering.

Developer quickstart

Make your first API request in minutes. Create a key, send chat messages, and read the assistant response.

Chat API

Send messages to /api/developer/chat with provider routing and optional web search.

View endpoint

API playground

Test the same request shape your application will call before shipping.

Authentication

The Nodedistro AI API uses API keys for authentication. Create and manage keys in the developer console. Keys begin with ndsk_.

Remember that your API key is a secret. Do not share it or embed it in client-side code. Store it only on your server and send it in the Authorization header.

Authorization: Bearer ndsk_your_key
Developer API access requires prepaid credits. Key revocations take effect on subsequent requests.

Prepaid credits

Calls to POST /api/developer/chat spend from your prepaid developer credit balance. Workspace chat continues to use your plan’s monthly included budget.

  • Shared wallet — one balance covers OpenAI (openai), Anthropic (anthropic), and Google (gemini).
  • Required balance — each request needs enough credits to cover the projected cost before the provider is called.
  • Add credits — purchase one-time packs ($10 / $25 / $50 / $100) or a custom amount (minimum $5) from the developer console Overview. Choose which vendor account Nodedistro should fund; your spendable balance stays shared.
  • Empty balance — the API returns 402 with code: "CREDITS_REQUIRED" and the remaining creditBalanceUsd.
in the developer console before integrating the API in production.

Chat > Completions

Create chat completion

Given a list of messages comprising a conversation, the model returns an assistant response.

POST /api/developer/chat
Base URL /api/developer/chat Content-Type application/json

Request body

All fields are JSON. Only messages is required.

messagesarrayRequired

Ordered chat turns. Each item needs role (system, user, or assistant) and content.

providerstring

Provider ID such as openai, anthropic, or gemini. Unavailable providers are rejected.

modelstring

Model ID for the selected provider. Use auto only when that provider supports automatic routing.

webSearchboolean

When true, the API may search the web before generating a response, subject to provider policy.

webBrowseboolean

URLs in the latest user message are read automatically. Follow-ups use a matching page name from recent user links, or the most recent link when no page is named. Set false to disable page reading, or true to also read a search result when no URL is supplied. This works independently of webSearch.

temperaturenumber

Controls randomness. Prefer lower values for deterministic application behavior.

Returns

Returns a chat completion object with assistant text and metering fields.

contentstring

Assistant response text.

providerstring

Provider used for the response.

modelstring

Model used for the response.

usageobject

Input, output, and total tokens plus estimated cost for this request.

monthlyUsageobject

Current billing-month usage and request totals for the account.

developerCreditBalanceUsdnumber

Remaining prepaid balance after this Developer API request.

webSearchobject | null

Search provider, results, page status, and errors when search ran.

Error codes

Errors return JSON with an error string. Some responses also include a machine-readable code.

400Invalid request — missing messages, unknown provider, or unsupported model.
401Unauthorized — missing, invalid, or revoked API key.
402Credits required — prepaid developer credit balance is too low (CREDITS_REQUIRED). Add credits in the developer console.
403Blocked — account suspended or request blocked by policy.
503Unavailable — selected provider is unavailable or not configured.

Usage and limits

Developer API spend deducts prepaid credits. Workspace chat usage is tracked separately against your plan budget and refreshes at 12:00 AM UTC on the first day of each month.

  • Developer credits — prepaid wallet required for /api/developer/chat; returned as developerCreditBalanceUsd.
  • Included budget — plan allowance for workspace chat, returned as budgetUsd.
  • Key hygiene — revoke unused keys and rotate credentials after exposure.

Add developer credits

One-time Stripe payment. Credits are shared across OpenAI, Anthropic, and Google on the Developer API.

Fund which provider account

Your wallet stays shared. This choice tells ops which vendor billing account to top up.

Create API key

Name the environment or application that will use this key.

Save your API key

This is the only time the complete key will be shown.

Store it securely. You cannot recover this key after closing this window.