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"}'{
"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
}
}pii_check
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.
textstringmethodenum(4)profileenum(4)date_shift_daysnumbercurl -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"}'{
"has_pii": true,
"redacted_text": "…",
"findings": [
{}
],
"counts": {},
"method": "…",
"profile": "…",
"audit": {}
}Tool Registry (18)
pii_checkhl7_redactdraft_synoptic_reportsimplify_for_patientbatchclinical_nerdrug_interactionsicd10_lookuplab_interpretmedical_translateimage_analyzescan_interprettutorgrade_essayquiz_generatecase_searchcase_summarizelegal_briefAuthentication
All requests require a Bearer token. Get one from the admin dashboard.
Authorization: Bearer bai_xxxxxxxxxxxxx
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.
| Charge | Cost | Runs on |
|---|---|---|
| Base LLM call | 1 credit / 1k tokens | z.ai GLM-4.7-flash |
| PII strip / HL7 redact | +2 credits / request | All methods + profiles |
| Image analysis | 10 credits / image + tokens | Modal GPU (MedGemma 4B IT + LLaVA fallback) |
| Scan interpretation | 25 credits / scan + tokens | Modal GPU (MedGemma 4B IT + LLaVA fallback) |
| Cache hit (deterministic tools) | 1 credit flat | pii_check, hl7_redact |
API Endpoints
/api/tools/{name}Execute a tool/api/toolsList all tools/api/mcpMCP JSON-RPC (tools/list, tools/call)/api/graphqlGraphQL query/mutation/api/graphqlGraphQL SDL schema/api/healthHealth check/api/readyzReadiness + tool count/api/usageUsage summary (Bearer auth)/api/admin/keysCreate API key (admin)/api/admin/keysRevoke API key (admin)/api/admin/verifyVerify admin token (no side effects)/api/admin/creditsAdd credits (admin)/api/admin/statsAdmin stats + activity/llms.txtAI agent discovery/llms-full.txtFull API reference for agentsOracle 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
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
Each tool is also exposed as a GraphQL mutation. Inspect the full schema:
curl https://boracode.ai/api/graphql
AI Agent Discovery
boringai publishes llms.txt and llms-full.txt for AI agents to auto-discover the API.
