Skip to main content

DominusNode for Google Gemini / Vertex AI

Gives agents the DominusNode AI-agent relay network: fetch public web pages through exit IPs contributed by other agents' nodes, pay per GB from a prepaid crypto wallet, and earn by contributing your own IP with the node agent. Built on the official DominusNode SDK v2; HTTP, SSRF/DNS-rebinding protection, OFAC refusal and credential scrubbing all come from the SDK.

Install

npm install @dominusnode/gemini-functions   # TypeScript
pip install dominusnode-gemini              # Python

Configuration

Variable Required Purpose
DOMINUSNODE_API_KEY yes Your dn_live_ API key. Read from the environment/config only; never a tool argument, never in tool output.
DOMINUSNODE_BASE_URL no API base URL (default https://api.dominusnode.com).
DOMINUSNODE_PROXY_HOST no Gateway host (default proxy.dominusnode.com).

Usage

This package has a TypeScript part (@dominusnode/gemini-functions, on @dominusnode/sdk v2) and a Python part (dominusnode-gemini, on the dominusnode SDK v2). Both expose the same 19 declarations, kept identical to functions.json by tests in each language. Declarations use Gemini's schema subset (uppercase types, enum with format: "enum").

TypeScript (@google/genai)

import { GoogleGenAI } from "@google/genai";
import { createDominusNodeFunctionHandler, functionDeclarations } from "@dominusnode/gemini-functions";

const ai = new GoogleGenAI({});
const handle = createDominusNodeFunctionHandler();          // key from DOMINUSNODE_API_KEY
const res = await ai.models.generateContent({
  model: "gemini-2.5-flash",
  contents: "Fetch https://example.com from a German exit",
  config: { tools: [{ functionDeclarations }] },
});
for (const call of res.functionCalls ?? []) {
  const result = await handle(call.name!, call.args ?? {});
  // reply with { functionResponse: { name: call.name, response: JSON.parse(result) } }
}

Python (google-genai)

from google import genai
from google.genai import types
from dominusnode_gemini import create_dominusnode_function_handler, function_declarations

handle = create_dominusnode_function_handler()      # key from DOMINUSNODE_API_KEY
tool = types.Tool(function_declarations=function_declarations())
resp = genai.Client().models.generate_content(
    model="gemini-2.5-flash", contents="What does residential relay traffic cost per GB?",
    config=types.GenerateContentConfig(tools=[tool]))
for call in resp.function_calls or []:
    result = handle(call.name, call.args or {})

Handlers return JSON strings; errors are {"error": "..."} with credentials scrubbed.

Tools (v2 standard set, 19)

# Tool What it does
1 dominusnode_fetch Fetch a public URL through the DominusNode relay network (GET or HEAD only, ports 80/443, no redirects followed, 10 MB cap, private/internal targets refused).
2 dominusnode_proxy_url Build a relay gateway proxy URL for use in other HTTP clients.
3 dominusnode_network_policy Relay network policy: allowed ports, plaintext (allowhttp) rules, blocked ranges, sanctioned countries and node attestation terms.
4 dominusnode_network_pricing Live per-GB prices by exit IP class (residential, dc, mobile) and node tier revenue shares.
5 dominusnode_network_stats Relay network statistics: online nodes, exit countries and IP classes.
6 dominusnode_balance Prepaid requester wallet balance (cents) used to pay for relayed traffic.
7 dominusnode_transactions Requester wallet transaction history (top-ups, usage debits, credit conversions).
8 dominusnode_topup_crypto Create a crypto invoice to top up the requester wallet ($10-$1,000).
9 dominusnode_check_payment Status of a crypto top-up invoice created by topup_crypto.
10 dominusnode_usage Relayed traffic usage summary (bytes and cost) for an optional ISO 8601 date range.
11 dominusnode_active_sessions Your currently active relay sessions (id, start time, status).
12 dominusnode_report_session Report a burned or bad exit for one of your relay sessions so the network can rotate it.
13 dominusnode_node_list Relay nodes you contribute (status, observed IP class, last seen).
14 dominusnode_node_tier Your node-operator tier, revenue share and progress toward the next tier (tenure, uptime, active IPs, reputation).
15 dominusnode_node_setup_guide Step-by-step instructions to earn by contributing an IP: run the DominusNode node agent, register a node, and how tiers and the self-dealing rule work.
16 dominusnode_credits_balance Node-operator earnings: pending and available credit (µUSD).
17 dominusnode_credits_convert Convert available node earnings into your own requester wallet balance (idempotent; returns the idempotency key).
18 dominusnode_payouts_list Your USDC payouts of node earnings with status and transaction hash.
19 dominusnode_x402_info x402 micropayment info: facilitators, networks and server-reported prices.

Notes for agents:

  • Prices are never hardcoded: call network_pricing for the live per-GB price by IP class (residential, dc, mobile).
  • fetch is GET/HEAD only on ports 80/443, follows no redirects and caps bodies at 10 MB. Plaintext http:// needs allow_http and is visible to the exit node.
  • Routing: country (ISO code; sanctioned countries refused), ip_class, session_id (sticky exit).
  • Signing flows (node register, withdraw, payout wallet) are deliberately not tools here; use the node agent CLI, the DominusNode MCP server, or the SDK with a signer key file.

Development (JS part)

@dominusnode/sdk 2.x may not be on npm yet; link the in-repo SDK for local builds and tests:

(cd ../../sdks/node && npm ci && npm run build)
npm install && npm run link-sdk
npx tsc && npx vitest run

functions.json is generated from core.ts; after changing a spec rebuild and regenerate it (node -e 'import("./dist/handler.js").then(m=>require("fs").writeFileSync("functions.json", JSON.stringify(m.functionDeclarations,null,2)+"\n"))'). Tests in both languages fail if it is stale.

Testing

pip install -e ../../sdks/python -e '.[dev]'   # or npm install for the JS part
python -m pytest -q python_tests

License

MIT

Metadata

Release files for dominusnode-gemini 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dominusnode-gemini 2.1.0
File Size Uploaded Provenance Actions
dominusnode_gemini-2.1.0.tar.gz 13.0 kB Without provenance Details for dominusnode_gemini-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dominusnode-gemini 2.1.0
File Interpreter ABI Platform Actions
dominusnode_gemini-2.1.0-py3-none-any.whl Python 3 none any Details for dominusnode_gemini-2.1.0-py3-none-any.whl

Total release size: 24.8 kB

Release files / dominusnode_gemini-2.1.0.tar.gz

Download URL dominusnode_gemini-2.1.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0299cb7c591995bd94dcb7cd940a726f971aa83f0261a83f39a376223973683f
BLAKE2b-256 checksum
How to use checksums
39a0e16d10babccf5ef867760b81606aad99b9438f6b90a9b15dbb99cf0b4fcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Release files / dominusnode_gemini-2.1.0-py3-none-any.whl

Download URL dominusnode_gemini-2.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e3562a9f7c680726ead1ea9fa9db39a528e121068df2cec98f1fb7400283b34
BLAKE2b-256 checksum
How to use checksums
bf68c5cc8af0ff57557d311ed0b36bc4392c49b4324f6b811b414b3ff8c5775d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for dominusnode-gemini 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page