Home/Docs/SDK quickstart

SDK quickstart

Register for RedactNode, install an official SDK, configure your gateway endpoint, and execute your first prompt with Malaysian PII tokenization.

Updated Sep 17, 2026
||View API spec

Use the official SDK for application integrations. It handles authentication, typed API responses, binary file transfers, streaming Server-Sent Events (SSE), and structured errors for the RedactNode Sovereign Gateway.

If you want to protect employee web chat inside ChatGPT or Claude in the browser without writing code, see the Tanda Guard Chrome MV3 setup. For direct raw HTTP clients and generated tooling, see the REST API reference.

RedactNode is OpenAI wire-compatibleYou do not need to rewrite your application prompts, function tools, or structured output schemas. Simply point the standard base_url to your gateway.

1. Register and create an API key

Sign in to your RedactNode portal instance. Navigate to API Keys, create a secret token, and select your environment scopes:

chat:completionstokens:redacttokens:restoreaudit:verify

Export your generated key into your local shell environment:

$ export REDACTNODE_API_KEY="rn_live_9f82a1c0..."

2. Install an SDK

Because RedactNode Gateway adheres to standard OpenAI wire specifications, you can use the official OpenAI SDKs in your language of choice:

Terminal (Python)pip
pip install openai
Terminal (Node.js)npm
npm install openai

3. Configure and execute prompt

Initialize the client pointing to your gateway instance. The gateway automatically detects and swaps Malaysian identifiers before forwarding the prompt to the upstream model:

quickstart.py
PYTHON 3.10+
import os
from openai import OpenAI

# 1. Point the client to your internal RedactNode gateway
client = OpenAI(
    base_url="https://gateway.internal.firm/v1",
    api_key=os.environ.get("REDACTNODE_API_KEY")
)

# 2. Execute normal completion containing Malaysian MyKad and financial data
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {
            "role": "user",
            "content": "Review loan application for citizen MyKad 850315-14-5521 with gross salary RM 14,500."
        }
    ],
    temperature=0.2
)

# 3. Upstream LLM saw only surrogate tokens; completion is re-hydrated transparently
print(response.choices[0].message.content)

4. Verify telemetry and tokens

Each response contains a redactnode_telemetry object recording latency, token counts, and cryptographic hash verification:

Response Telemetry Object200 OK
{
  "redactnode_telemetry": {
    "tokens_replaced": 2,
    "rules_triggered": ["MY_MYKAD_NRIC_V2", "MY_FINANCIAL_SALARY_V1"],
    "vault_session_id": "vault_session_9a41",
    "processing_latency_ms": 1.8,
    "proof_digest": "sha256:4b91ce20f81a7042a98f1294821a..."
  }
}

Next steps