SDK quickstart
Register for RedactNode, install an official SDK, configure your gateway endpoint, and execute your first prompt with Malaysian PII tokenization.
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.
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:
Export your generated key into your local shell environment:
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:
pip install openai
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:
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:
{
"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..."
}
}