npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dominusnode/ai-tools

v1.2.0

Published

Vercel AI SDK tools for Dominus Node rotating proxy service

Downloads

495

Readme

@dominusnode/ai-tools

Vercel AI SDK tools for the Dominus Node rotating proxy-as-a-service platform. Gives AI agents the ability to make proxied HTTP requests, check wallet balance, monitor usage, and manage proxy sessions.

Installation

npm install @dominusnode/ai-tools ai zod @dominusnode/sdk

Quick Start

Next.js Route Handler

// app/api/chat/route.ts
import { streamText } from "ai";
import { openai } from "@ai-sdk/openai";
import { createDominusNodeTools } from "@dominusnode/ai-tools";

export async function POST(req: Request) {
  const { messages } = await req.json();

  const tools = await createDominusNodeTools({
    apiKey: process.env.DOMINUSNODE_API_KEY!,
    baseUrl: process.env.DOMINUSNODE_BASE_URL, // optional
  });

  const result = streamText({
    model: openai("gpt-4o"),
    messages,
    tools,
    maxSteps: 5,
  });

  return result.toDataStreamResponse();
}

Standalone with generateText

import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
import { createDominusNodeTools } from "@dominusnode/ai-tools";

const tools = await createDominusNodeTools({
  apiKey: "dn_live_your_api_key_here",
});

const { text } = await generateText({
  model: openai("gpt-4o"),
  tools,
  maxSteps: 10,
  prompt: "Fetch https://httpbin.org/ip through a US datacenter proxy and tell me the IP",
});

console.log(text);

Tools

proxiedFetch

Make HTTP requests through Dominus Node's rotating proxy network with geo-targeting support.

| Parameter | Type | Required | Description | |-------------|-----------------------------------------|----------|----------------------------------------------| | url | string (URL) | Yes | The URL to fetch through the proxy | | method | "GET" \| "POST" \| "PUT" \| "DELETE" | No | HTTP method (default: GET) | | country | string (2-letter ISO) | No | Country code for geo-targeting | | proxyType | "dc" \| "residential" | No | Proxy type (default: dc) | | headers | Record<string, string> | No | Additional HTTP headers | | body | string | No | Request body for POST/PUT |

Returns: { status, statusText, headers, body, proxyType, country }

Security: URLs are validated to prevent SSRF attacks. Blocked targets include localhost, private IP ranges (10.x, 172.16-31.x, 192.168.x), link-local (169.254.x), IPv6 loopback/ULA, and non-HTTP protocols. Response bodies are truncated to 4,000 characters. API keys are scrubbed from error messages.

checkBalance

Check the current Dominus Node wallet balance.

Parameters: None

Returns: { balanceCents, balanceUsd, currency, lastToppedUp }

checkUsage

Check proxy usage statistics for a given time period.

| Parameter | Type | Required | Description | |-----------|---------------------------------|----------|--------------------------| | period | "day" \| "week" \| "month" | No | Time window for stats |

Returns: { summary: { totalBytes, totalGB, totalCostCents, totalCostUsd, requestCount }, period, recordCount }

getProxyConfig

Get proxy endpoint configuration and supported countries.

Parameters: None

Returns: { endpoints: { http, socks5 }, supportedCountries, blockedCountries, geoTargeting }

listSessions

List all active proxy sessions.

Parameters: None

Returns: { sessions: [{ id, startedAt, status }], count }

Advanced Usage

Using an Existing Client

If you already manage a DominusNodeClient instance:

import { DominusNodeClient } from "@dominusnode/sdk";
import { createDominusNodeToolsFromClient } from "@dominusnode/ai-tools";

const client = new DominusNodeClient({ baseUrl: "http://localhost:3000" });
await client.connectWithKey("dn_live_your_key");

const tools = createDominusNodeToolsFromClient(client, "dn_live_your_key");

Using Individual Tool Creators

For fine-grained control, import individual tool factory functions:

import {
  createProxiedFetchTool,
  createCheckBalanceTool,
} from "@dominusnode/ai-tools";
import { DominusNodeClient } from "@dominusnode/sdk";

const client = new DominusNodeClient();
await client.connectWithKey("dn_live_your_key");

// Only expose the tools you need
const tools = {
  proxiedFetch: createProxiedFetchTool(client, "dn_live_your_key"),
  checkBalance: createCheckBalanceTool(client),
};

With Anthropic Claude

import { generateText } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
import { createDominusNodeTools } from "@dominusnode/ai-tools";

const tools = await createDominusNodeTools({
  apiKey: process.env.DOMINUSNODE_API_KEY!,
});

const { text } = await generateText({
  model: anthropic("claude-sonnet-4-20250514"),
  tools,
  maxSteps: 5,
  prompt: "Check my balance, then fetch https://example.com through a German proxy",
});

Environment Variables

| Variable | Description | Default | |-------------------------|---------------------------------------|---------------------------------| | DOMINUSNODE_API_KEY | Dominus Node API key | Required | | DOMINUSNODE_BASE_URL | Dominus Node API base URL | https://api.dominusnode.com |

Pricing

Proxy usage is billed from your Dominus Node wallet:

  • Datacenter (dc): $3.00/GB
  • Residential: $5.00/GB

Check your balance with the checkBalance tool before heavy usage.

License

MIT