Server-side only
Proxy browser and mobile traffic through your own backend so API keys remain private.
Integrate ReRanDE as a narrow correction layer for clinical text normalization, domain routing, correction evidence, audit metadata, and structured JSON responses.
https://rerande.nextnlp.com
Primary endpoint
POST /check
Content type
application/json
Send clinical text to POST /check with a response mode. Production integrations should include an API key using the Authorization header.
curl -X POST "https://rerande.nextnlp.com/check" \
-H "Authorization: Bearer $RERANDE_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"text": "The patient developed tachycarda and chest discomfrt.",
"mode": "text",
"language": "en",
"options": {
"include_original": true,
"include_billing": true
}
}'
Use bearer-token authentication for production API access. Keep keys server-side and never expose them in browser JavaScript, mobile binaries, client logs, or public repositories.
Authorization: Bearer YOUR_RERANDE_API_KEY
export RERANDE_API_KEY="rerande_live_xxxxxxxxxxxxx"
curl -X POST "https://rerande.nextnlp.com/check" \
-H "Authorization: Bearer $RERANDE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Patient admited with dyspniya.","mode":"elite"}'
Proxy browser and mobile traffic through your own backend so API keys remain private.
Use separate keys for evaluation, staging, and production environments.
Do not log API keys, submitted clinical text, or corrected clinical output.
https://rerande.nextnlp.com/check
The endpoint accepts a JSON body and returns a JSON response shaped by the selected mode. ReRanDE does not diagnose, recommend treatment, or generate new clinical meaning.
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Clinical text to inspect and correct. Empty text returns 400. |
mode | enum | No | One of domain, lite, text, elite, full, audit, debug. Default: elite. |
language | string | No | Language hint. Public examples use en. |
options.top_k_domains | integer | No | Number of ranked domains returned where supported. Default: 5. |
options.include_original | boolean | No | Include original text in modes that support it. Default: true. |
options.include_billing | boolean | No | Include SmartCredit usage in supported modes. Audit and debug include billing by default. |
debug | boolean | No | Compatibility flag for internal diagnostic pathways. Prefer mode: "debug". |
Use the smallest response contract that gives your workflow enough evidence. Start with text or elite; move to full, audit, or debug when traceability or diagnostics are required.
domainDomain routing only. Returns detected clinical domain and ranked alternatives.
liteMinimal correction response. Returns corrected text and correction count.
textText contract for forms, databases, and search indexes. Returns original text, corrected text, and correction map.
eliteProduction integration contract. Returns domain, corrected text, structured corrections, and summary.
fullExplainability contract. Returns domain, text object, corrections with positions, and risk summary.
auditTraceability contract. Returns engine metadata, original text hash, correction marks, performance, and billing.
debugDiagnostic contract. Returns full response plus pipeline stages, candidate data, and debug payload.
import os
import requests
url = "https://rerande.nextnlp.com/check"
headers = {
"Authorization": f"Bearer {os.environ['RERANDE_API_KEY']}",
"Content-Type": "application/json",
"Accept": "application/json",
}
payload = {
"text": "The patient developed tachycarda and chest discomfrt.",
"mode": "text",
"language": "en",
"options": {"include_original": True, "include_billing": True},
}
response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()
print(data["corrected_text"])
print(data["corrections"])
const response = await fetch("https://rerande.nextnlp.com/check", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.RERANDE_API_KEY}`,
"Content-Type": "application/json",
"Accept": "application/json"
},
body: JSON.stringify({
text: "Initial electrocardiogrm showed ST elevaton.",
mode: "elite",
language: "en",
options: { include_original: true, include_billing: true }
})
});
if (!response.ok) {
throw new Error(`ReRanDE request failed: ${response.status}`);
}
const data = await response.json();
console.log(data.domain, data.summary);
curl -X POST "https://rerande.nextnlp.com/check" \
-H "Authorization: Bearer $RERANDE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Clinical features include wheezing, bronchospasm, and inhaler response.",
"mode": "domain",
"options": {"top_k_domains": 3}
}'
text response{
"mode": "text",
"request_id": "67a441b9-95fe-41ff-b0e2-f585f36c8f15",
"original_text": "The patient developed tachycarda and chest discomfrt.",
"corrected_text": "The patient developed tachycardia and chest discomfort.",
"corrections": {
"tachycarda": "tachycardia",
"discomfrt": "discomfort"
},
"billing": {
"unit": "SmartCredit",
"credits_used": 57
}
}
audit response{
"mode": "audit",
"request_id": "req_...",
"engine": {
"version": "gold-v...",
"lexicon_version": "pkl-live",
"timestamp": "2026-06-29T..."
},
"domain": "CARDIOLOGY",
"text": {
"original_hash": "sha256:...",
"corrected_text": "The patient developed tachycardia."
},
"corrections": [
{"original": "tachycarda", "corrected": "tachycardia", "confidence": 0.96}
],
"performance": {"execution_time_ms": 18},
"billing": {"unit": "SmartCredit", "credits_used": 241}
}
| Status | Meaning | Action |
|---|---|---|
200 | Request processed successfully. | Read the response according to the selected mode. |
400 | Input text is empty. | Send a non-empty text field. |
401 | Missing or invalid API key in protected environments. | Send Authorization: Bearer YOUR_KEY. |
403 | Key is valid but not authorized for the requested environment or plan. | Check workspace, plan, and deployment agreement. |
422 | Request schema validation failed. | Check field types and supported mode names. |
429 | Rate or quota limit reached. | Retry with backoff or upgrade the SmartCredit pack. |
5xx | Server-side processing error. | Retry with exponential backoff and preserve request_id. |
ReRanDE uses SmartCredits to meter API usage. Input-only contracts are priced by submitted characters. Explainability-heavy contracts include response size because they return additional structured metadata.
input characters
input characters + output characters / 3
Set options.include_billing to true where supported.
Use encrypted transport for all production traffic.
Use bearer-token API access for production environments.
Enterprise deployment planning can align with AWS-hosted operational controls.
Submitted text should be treated as transient request content.
Corrected clinical text is returned to the caller without becoming a stored corpus.
Operational logging should avoid submitted clinical content and corrected output.
HIPAA-regulated organizations should use ReRanDE only under an appropriate enterprise agreement and deployment model.
request_id for support and operational tracing.5xx responses.For production access, enterprise deployment review, or private rollout planning, contact the ReRanDE team.
Contact support