§ quickstart

Quickstart

Every tool is registered once and exposed three ways — REST, MCP and GraphQL — all generated from the same registry. Authenticate with a Bearer token, pay per request with credits. An early-access key comes with 25,000 free credits (about $10 at $0.0004 per credit), no card.

curl -X POST https://boracode.ai/api/tools/pii_check \
  -H "Authorization: Bearer bai_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Patient John Doe, email john@example.com, MRN 12345"}'
Response (new key, first call)
{
  "has_pii": true,
  "redacted_text": "[REDACTED:patient_name], email [REDACTED:email], MRN 12345",
  "findings": [
    {
      "category": "patient_name",
      "start": 0,
      "end": 16,
      "sample": "Patient John Doe",
      "originalValue": "Patient John Doe"
    },
    {
      "category": "email",
      "start": 24,
      "end": 40,
      "sample": "john@example.com",
      "originalValue": "john@example.com"
    }
  ],
  "counts": {
    "patient_name": 1,
    "email": 1
  },
  "method": "mask",
  "profile": "hipaa",
  "audit": {
    "total_redacted": 2,
    "categories_affected": [
      "patient_name",
      "email"
    ],
    "timestamp": "2026-11-26T00:46:37.563Z"
  },
  "billing": {
    "cost_credits": 3,
    "remaining_credits": 24997,
    "raw_credits": 3,
    "discount_percent": 0,
    "input_tokens": 30,
    "output_tokens": 127,
    "total_tokens": 157,
    "base_token_cost": 1,
    "surcharge": 2,
    "cached": false,
    "demo_mode": false
  }
}
§ tool

pii_check

privacyhealthcare2 credits

Strip PII from text with multiple de-identification methods. Detects emails, phones, SSNs, MRNs, credit cards, API keys, private keys, DOB, addresses, patient names, URLs, IP addresses. Methods: mask, replace (fake data), hash (SHA-256), shift_dates (temporal). Profiles: HIPAA (18 Safe Harbor identifiers), GDPR, research, minimal.

Input Parameters
textstring
methodenum(4)
profileenum(4)
date_shift_daysnumber
Example Request
curl -X POST https://boracode.ai/api/tools/pii_check \
  -H "Authorization: Bearer bai_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Patient John Doe, email john@example.com, MRN 12345"}'
Example Response
{
  "has_pii": true,
  "redacted_text": "…",
  "findings": [
    {}
  ],
  "counts": {},
  "method": "…",
  "profile": "…",
  "audit": {}
}
§ all tools

Tool Registry (18)

pii_check
privacy
Strip PII from text with multiple de-identification methods. Detects emails, phones, SSNs, MRNs, cre2 cr
hl7_redact
medical
Field-aware PII redaction for HL7 v2 messages. Redacts PID, NK1, PV1 fields by position + regex fall2 cr
draft_synoptic_report
medical
Draft a structured synoptic pathology report from clinical findings using CAP cancer protocol templa3 cr
simplify_for_patient
medical
Translate medical reports into plain language for patients. Handles pathology, radiology, lab result3 cr
batch
utility
Execute any tool on multiple documents in one request. Pass a tool name and an array of inputs. Retu0 cr
clinical_ner
medical
Extract biomedical entities (diseases, drugs, genes, anatomy, symptoms, procedures) from clinical te2 cr
drug_interactions
medical
Screen a list of drugs for clinically significant drug-drug interactions (DDIs). A clinical-pharmaci3 cr
icd10_lookup
medical
Extract ICD-10-CM codes from clinical text (notes, impressions, discharge summaries). A certified-co3 cr
lab_interpret
medical
Interpret a panel of lab results and flag each value as normal / low / high / critical against stand3 cr
medical_translate
medical
Translate medical/clinical text between languages while preserving clinical terms, drug names (INN),3 cr
image_analyze
image
Analyze a medical image using MedGemma 4B IT on Modal GPU (L4) — Google's medical-specialized multim10 cr
scan_interpret
image
Interpret a radiology scan using MedGemma 4B IT on Modal GPU (L4) — Google's medical-specialized mul25 cr
tutor
education
Socratic AI tutoring for Ugandan students (PLE, UCE, UACE). Guides with questions — never hands over3 cr
grade_essay
education
Grade a student essay against rubric criteria. Returns score, strengths, areas for improvement, and 3 cr
quiz_generate
education
Generate multiple-choice quiz questions for Ugandan exam levels (PLE, UCE, UACE). Each question incl3 cr
case_search
legal
Search for relevant Ugandan case law by legal question or scenario. Returns case names, key principl3 cr
case_summarize
legal
Summarize a Ugandan court case judgment. Extracts key facts, legal issues, holding, and reasoning. B3 cr
legal_brief
legal
Generate a legal brief for a Ugandan legal scenario. Includes applicable laws, analysis, and recomme3 cr
§ authentication

Authentication

All requests require a Bearer token. Get one from the admin dashboard.

Authorization: Bearer bai_xxxxxxxxxxxxx
§ billing

Billing

Each response carries a billing object with the credits charged and the balance left. New early-access keys start with 25,000 free credits (about $10 at $0.0004 per credit), no card.

ChargeCostRuns on
Base LLM call1 credit / 1k tokensz.ai GLM-4.7-flash
PII strip / HL7 redact+2 credits / requestAll methods + profiles
Image analysis10 credits / image + tokensModal GPU (MedGemma 4B IT + LLaVA fallback)
Scan interpretation25 credits / scan + tokensModal GPU (MedGemma 4B IT + LLaVA fallback)
Cache hit (deterministic tools)1 credit flatpii_check, hl7_redact
§ endpoints

API Endpoints

POST/api/tools/{name}Execute a tool
GET/api/toolsList all tools
POST/api/mcpMCP JSON-RPC (tools/list, tools/call)
POST/api/graphqlGraphQL query/mutation
GET/api/graphqlGraphQL SDL schema
GET/api/healthHealth check
GET/api/readyzReadiness + tool count
GET/api/usageUsage summary (Bearer auth)
POST/api/admin/keysCreate API key (admin)
DELETE/api/admin/keysRevoke API key (admin)
GET/api/admin/verifyVerify admin token (no side effects)
POST/api/admin/creditsAdd credits (admin)
GET/api/admin/statsAdmin stats + activity
GET/llms.txtAI agent discovery
GET/llms-full.txtFull API reference for agents
§ oracle apex

Oracle APEX SDK

PL/SQL package with typed wrappers for all 18 tools. Install once, call from any APEX page or Dynamic Action.

-- 1. Install (run as SCANLAB_LIS or SYS)
@packages/apex/boringai_sdk.sql

-- 2. Configure
INSERT INTO gen_system_parameters (code, string_value)
VALUES ('BORINGAI_URL', 'https://boracode.ai');
INSERT INTO gen_system_parameters (code, string_value)
VALUES ('BORINGAI_KEY', 'bai_your_key');
COMMIT;

-- 3. Use from any APEX page
SELECT scanlab_lis.boringai.strip_pii(:P1_TEXT) FROM dual;
SELECT scanlab_lis.boringai.redact_hl7(:P1_HL7_MSG) FROM dual;
SELECT scanlab_lis.boringai.draft_report('breast', :P1_FINDINGS) FROM dual;
SELECT scanlab_lis.boringai.simplify(:P1_REPORT) FROM dual;
SELECT scanlab_lis.boringai.clinical_ner(:P1_NOTE, 'disease,drug') FROM dual;
SELECT scanlab_lis.boringai.check_interactions('warfarin,ibuprofen') FROM dual;
SELECT scanlab_lis.boringai.lookup_icd10(:P1_NOTE, 3) FROM dual;
SELECT scanlab_lis.boringai.interpret_labs(:P1_LABS) FROM dual;
SELECT scanlab_lis.boringai.translate_medical(:P1_TEXT, 'sw') FROM dual;
SELECT scanlab_lis.boringai.analyze_image(:P1_IMAGE_B64) FROM dual;
SELECT scanlab_lis.boringai.interpret_scan(:P1_SCAN_B64, 'chest_xray') FROM dual;
SELECT scanlab_lis.boringai.batch('pii_check', '[{"text":"a"}]') FROM dual;
SELECT scanlab_lis.boringai.list_tools FROM dual;
SELECT scanlab_lis.boringai.get_usage FROM dual;
§ mcp server

MCP Server

The boringai MCP endpoint exposes all 18 tools to any MCP-compatible client (Claude Desktop, Cursor, etc.).

{
  "mcpServers": {
    "boringai": {
      "url": "https://boracode.ai/api/mcp",
      "headers": { "Authorization": "Bearer bai_YOUR_KEY" }
    }
  }
}
§ graphql

GraphQL

Each tool is also exposed as a GraphQL mutation. Inspect the full schema:

curl https://boracode.ai/api/graphql
§ ai agents

AI Agent Discovery

boringai publishes llms.txt and llms-full.txt for AI agents to auto-discover the API.

A wide horizon at dusk: layered hills in muted plum and ochre above a lake that holds the last light, a family of crested cranes at the water's edge, an acacia in silhouette and a single bright star above the ridge.