Quickstart

Your first request

Four steps. The only one that needs a browser is creating the key.

1. Create a key

Go to nodedata.ai/dashboard/api-keys, pick the scopes you need, and copy the key. You will see the full value exactly once — only a hash is stored, so a lost key is replaced rather than recovered.

Start with models:read. You can create a second, wider key later; that's cheaper than over-granting the first one.

2. Put it in the environment

.env.local
NODE_DATA_API_KEY=nd_live_your_key_here

Never prefix this with NEXT_PUBLIC_

In Next.js, the NEXT_PUBLIC_ prefix inlines a value into the browser bundle. A secret key there is readable by every visitor. Call the API from server code, or proxy through your own route handler.

3. Verify the key

terminal
curl https://www.nodedata.ai/api/v1/me \
-H "Authorization: Bearer $NODE_DATA_API_KEY"

4. Do something real

Read the marketplace. This needs models:read, returns a cursor-paginated page, and is safe to call as often as you like.

list.ts
1import { NodeData } from "@node-data/sdk";
2
3const nd = new NodeData({ apiKey: process.env.NODE_DATA_API_KEY });
4
5const page = await nd.models.list({ q: "manipulation", limit: 20 });
6
7for await (const asset of page) {
8 console.log(asset.slug, asset.price.amount / 100, asset.downloads);
9}

Iterating the page walks every subsequent page lazily. If you only want the first one, read page.items instead.

Installing the SDK

The client ships as a normal npm package with ESM and CommonJS entry points and bundled type declarations. It isn't on the public registry yet, so you install it from a URL rather than by name — everything else about it behaves like any dependency.

terminal
npm install https://www.nodedata.dev/node-data-sdk-latest.tgz

It installs under the real package name, so imports read @node-data/sdk and moving to the registry later is a one-line change.

app.ts
import { NodeData } from "@node-data/sdk";

Or skip it entirely

Every example on this page also works with plain fetch — the API is ordinary HTTP and JSON. The SDK saves you pagination, retries, error mapping, and webhook verification, not access.

What to read next