VERINODE|API

Verinode Developer

Client libraries

There is no published package yet. Generate a client, or call the API directly.

Verinode does not publish an npm or PyPI package today. Anything you find under those names is not ours. Two supported ways to get a client, both working right now:

#Generate one from the spec

The full OpenAPI 3.1 contract is public at https://docs.verinode.ai/openapi and is the same file the API is built against. Point any generator at it:

# TypeScript types
npx openapi-typescript https://docs.verinode.ai/openapi -o verinode.d.ts

# A full client, most languages
npx @openapitools/openapi-generator-cli generate \
  -i https://docs.verinode.ai/openapi \
  -g typescript-fetch -o ./verinode-client

Regenerate when the contract changes. The spec is versioned with the API.

#Or just call it

The API is bearer auth over JSON with no handshake and no envelope, so a client is a few lines. This is the whole thing:

const KEY = process.env.VERINODE_API_KEY;
const vn = (path, init) =>
  fetch(`https://api.verinode.ai/v1${path}`, {
    ...init,
    headers: { authorization: `Bearer ${KEY}`, ...init?.headers },
  }).then(async (r) => {
    const body = await r.json();
    if (!r.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
    return body;
  });

await vn("/ping");

// Page through jobs: follow next_cursor until has_more is false.
let cursor = null;
do {
  const page = await vn(`/jobs?limit=100${cursor ? `&cursor=${cursor}` : ""}`);
  for (const job of page.data) console.log(job.client_name);
  cursor = page.next_cursor;
  var hasMore = page.has_more;
} while (hasMore);
import json, os, urllib.request

KEY = os.environ["VERINODE_API_KEY"]

def vn(path, data=None):
    req = urllib.request.Request(
        f"https://api.verinode.ai/v1{path}",
        headers={"authorization": f"Bearer {KEY}", "content-type": "application/json"},
        data=json.dumps(data).encode() if data else None,
    )
    with urllib.request.urlopen(req) as r:
        return json.load(r)

print(vn("/ping"))

cursor, more = None, True
while more:
    page = vn(f"/jobs?limit=100" + (f"&cursor={cursor}" if cursor else ""))
    for job in page["data"]:
        print(job["client_name"])
    cursor, more = page["next_cursor"], page["has_more"]

Server-side only. The API sends no CORS headers, so a browser fetch cannot call it, and an API key in frontend code is a leaked credential regardless. Call it from your backend.

Storing the last synced_through to pull only what changed is covered in Reading data.