📡 API Reference

AI Security Hub API Docs

Complete reference for all REST API endpoints. Secure, versioned, enterprise-ready. Build, integrate, automate.

BASE URL https://cyberdudebivash.in
Authentication
🔑
JWT Bearer Token
Obtain via POST /api/auth/login — include as Authorization: Bearer <token>
🗝
API Key (cdb_*)
Generated in the API Keys tab of your dashboard — include as X-API-Key: cdb_your_key. POST /api/developer/keys below is the same key system under a developer-portal-branded URL — same key, same limits, same account, either path works.
👤
Anonymous / IP Fallback
Free-tier read endpoints are available without auth. Rate-limited per IP.
POST /api/auth/login FREE Obtain JWT token
Request Body
{
  "email": "user@example.com",
  "password": "your-password"
}
Response
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_in": 86400,
  "user": { "id": "usr_...", "tier": "FREE" }
}
Status Codes
200 OK 400 Invalid credentials
Developer API Keys

Create and manage keys programmatically. Session auth required (log in first) — these endpoints manage the same keys shown in your dashboard's API Keys tab, just reachable under a developer-portal-branded URL.

POST /api/developer/keys SESSION Generate a new API key
Request Body
{
  "label": "My Integration"
}
Response
{
  "success": true,
  "key": "cdb_...",
  "prefix": "cdb_ab12",
  "label": "My Integration",
  "tier": "FREE",
  "warning": "Store this key securely. It cannot be retrieved after this response."
}
Status Codes
201 Created 401 Authentication required 409 Key limit reached for your tier
GET /api/developer/keys SESSION List your active API keys
Response
{
  "keys": [ { "key_prefix": "cdb_ab12", "label": "My Integration", "active": true } ],
  "count": 1,
  "max_keys": 1
}
DELETE /api/developer/keys/{id} SESSION Revoke a key
POST /api/developer/keys/{id}/rotate SESSION Revoke and reissue a key, same label and tier
Rate Limits
FREE
50
requests / hour
STARTER
500
requests / hour
PRO
5,000
requests / hour
ENTERPRISE
Unlimited
custom SLA

Exceeded limits return HTTP 429 with header Retry-After: <seconds>.

Pillar 1 — AI Security Posture Management
POST /api/ai-security/assets/register STARTER+ Register AI asset
Request Body
{
  "name": "My GPT-4 Agent",
  "asset_type": "agent",       // model | agent | rag | api | pipeline
  "provider": "openai",
  "endpoint_url": "https://api.openai.com/v1/chat/completions",
  "deployment": "cloud"
}
Response
{
  "asset_id": "ast_01JX...",
  "provenance": { "evidence_mode": "DECLARED", "observed": false },
  "message": "Asset registered as customer-declared inventory. /scan provides metadata review questions; verified assessment evidence is required to determine control posture."
}
GET /api/ai-security/assets STARTER+ List all AI assets
Query Parameters
ParamTypeRequiredDescription
typestringoptionalFilter: model | agent | rag | api
limitnumberoptionalDefault 50, max 100
POST /api/ai-security/assets/:id/scan PRO+ Review asset metadata — no live security tests
Path Parameters
ParamTypeRequiredDescription
idstringrequiredAsset ID from register
Response
{
  "success": true,
  "scan_id": null,
  "review_id": "airv_example",
  "assessment_mode": "METADATA_REVIEW_ONLY",
  "scan_status": "NOT_RUN",
  "verification_status": "UNVERIFIED",
  "security_score": null,
  "risk_score": null,
  "findings": [],
  "review_considerations": [
    { "category": "LLM01", "title": "Prompt Injection", "evidence_status": "NOT_ASSESSED", "severity": null }
  ]
}
Pillar 2 — AI Governance Center

Questionnaire-based control mapping. These responses are customer declarations, not legal compliance certification or independently verified controls.

GET /api/ai-security/governance/frameworks FREE List currently implemented governance catalogs
Response (illustrative schema; current implemented IDs)
{
  "success": true,
  "frameworks": [
    { "id": "NIST_AI_RMF", "total_controls": 18 },
    { "id": "ISO_42001", "total_controls": 13 },
    { "id": "EU_AI_ACT", "total_controls": 13 }
  ]
}

Each real framework object also includes name, version, publication, and applicability. This endpoint does not implement an OWASP questionnaire catalog.

POST /api/ai-security/governance/assess STARTER+ Create authenticated control questionnaire
Request Body (canonical deployed contract)
{
  "framework": "ISO_42001"
}

Use one of the exact IDs returned by GET /frameworks. An independently reviewed backend update will additionally support the `framework_id` alias; do not rely on the alias until that release is serving.

Pillar 3 — Guided AI Red-Team Transcript Analysis

Implemented workflow: create an authorized engagement and submit transcripts obtained from your own separately run target tests. The Hub does not automatically execute attack traffic, deploy agents, or claim validated compromise from engagement creation. Results are bounded transcript observations requiring human verification.

POST /api/ai-security/redteam/engage PRO+ Register guided transcript engagement
Request Body
{
  "target_model": "customer-owned-assistant",
  "attack_types": ["prompt_injection", "jailbreak"]
}

Use only authorized test scopes. Optional `assessment_id` must refer to a RUNNING assessment with active authorization for every requested attack type. Unsupported legacy `target_asset_id`, `attack_categories`, and `intensity` fields do not initiate live tests.

Response
{
  "success": true,
  "engagement_id": "rt_<generated-id>",
  "assessment_method": "guided_transcript_analysis",
  "live_attack_execution": false,
  "raw_transcript_storage": false,
  "report_endpoint": "/api/ai-security/redteam/<id>/report"
}

Next: submit a real authorized transcript to POST /api/ai-security/redteam/:id/attack using `attack_type`, `test_id`, and `target_response`. The server evaluates the submitted transcript, not an externally executed payload.

GET /api/ai-security/redteam/:id/report PRO+ Evidence-scoped engagement report
Response before customer-submitted conclusive transcripts
{
  "success": true,
  "assessment_method": "transcript_analysis",
  "verification_status": "UNVERIFIED",
  "live_attack_execution": false,
  "executive_summary": {
    "submitted_transcripts": 0,
    "overall_risk": "UNVERIFIED",
    "risk_score": null
  }
}

Never infer a successful attack, an engagement-wide risk score, or regulatory compliance from an empty or incomplete transcript set.

Pillar 4 — AI Agent Security
POST /api/ai-security/agents/scan STARTER+ Scan AI agent configuration
Request Body
{
  "agent_type": "langchain",  // openai | langchain | crewai | autogen | mcp
  "tools": ["web_search","code_exec","file_write"],
  "system_prompt": "You are a helpful assistant..."
}
Response
{
  "risk_score": 83,
  "risk_level": "HIGH",
  "issues": [
    { "type": "OVER_PRIVILEGED_TOOL", "tool": "file_write", "severity": "CRITICAL" },
    { "type": "SYSTEM_PROMPT_INJECTION_RISK", "severity": "HIGH" }
  ]
}
Pillar 5 — AI Threat Intelligence
GET /api/ai-security/threat-feed FREE Live AI threat intelligence feed
Query Parameters
ParamTypeRequiredDescription
typestringoptionalprompt_attacks | agent_threats | ai_cves | model_advisories
severitystringoptionalCRITICAL | HIGH | MEDIUM | LOW
limitnumberoptionalDefault 20, max 100
Response
{
  "feed": [
    {
      "id": "ATI-2025-0047",
      "type": "prompt_attack",
      "title": "Multi-turn Jailbreak via Role Persistence",
      "severity": "HIGH",
      "published": "2025-06-09T08:00:00Z"
    }
  ],
  "total": 847,
  "updated_at": "2025-06-09T14:00:00Z"
}
GET /api/threat-intel/:id/playbook FREE Mitigation & response playbook for a CVE/threat-intel item
Description

Deterministically generates immediate mitigation actions, detection guidance, a threat hunting guide, a SOC playbook, an incident response playbook (NIST SP 800-61), an executive advisory, security architecture guidance, an operational checklist, and references — grounded entirely in the real threat_intel record plus the live MITRE ATT&CK mapping and composite risk score. Anonymous callers get the full playbook computed on demand; sign in to persist it and get staleness tracking if the underlying intelligence is later re-enriched.

Response (abridged)
{
  "success": true,
  "playbook_id": "pbk_mr4z...",
  "persisted": true,
  "stale": false,
  "playbook": {
    "risk_tier": "CRITICAL",
    "immediate_actions": [ "..." ],
    "detection_guidance": [ "..." ],
    "threat_hunting_guide": { "suggested_query": "..." },
    "soc_playbook": [ { "stage": "Triage", "action": "..." } ],
    "incident_response_playbook": [ /* NIST SP 800-61 phases */ ],
    "executive_advisory": "...",
    "security_architecture_guidance": [ /* per ATT&CK tactic */ ],
    "operational_checklist": [ /* checkbox items */ ],
    "references": [ { "label": "NVD — CVE-...", "url": "https://nvd.nist.gov/..." } ],
    "supporting_evidence": { /* every real field the playbook was built from */ }
  }
}
Related

POST /api/threat-intel/:id/playbook — force regeneration from current intelligence. GET /api/threat-intel/playbooks/history — your saved generation history (sign-in required).

Vibe Code Security Scanner
POST /api/vibe-code/scan FREE (gated) Scan AI-generated code
Request Body
{
  "code": "const query = `SELECT * FROM users WHERE id = ${req.params.id}`",
  "language": "javascript",  // js | ts | py | go | java | php | rb | cs | rs
  "context": "express api route"
}
Response (FREE)
{
  "ok": true,
  "risk_grade": "F",
  "risk_score": 94,
  "findings": [ /* top 3 findings visible */ ],
  "locked_count": 7,
  "gated": true,
  "upgrade": { "price": "₹999", "url": "https://cyberdudebivash.in/upgrade" }
}
Response (STARTER+)
{
  "ok": true,
  "risk_grade": "F",
  "risk_score": 94,
  "tier": "starter",
  "gated": false,
  "findings": [
    {
      "rule_id": "CDB-SQL-001",
      "title": "SQL Injection via String Interpolation",
      "severity": "CRITICAL",
      "cwe": "CWE-89",
      "line": 1,
      "remediation": "Use parameterized queries..."
    }
  ]
}
GET /api/vibe-code/patterns FREE Get rule catalog
Response
{
  "total_rules": 47,
  "categories": ["injection","auth","secrets","crypto","ssrf","ai_llm"],
  "patterns": [ /* full rule catalog */ ]
}
MCP Security Scanner
POST /api/mcp-security/scan STARTER+ Scan MCP server configuration
Request Body
{
  "mcp_config": {
    "server_url": "https://mcp.example.com/sse",
    "tools": ["read_file", "execute_code"],
    "auth_method": "oauth2"
  }
}
MYTHOS God Mode API — Autonomous Orchestration

/status is public only as a coarse availability signal. Detailed run state, job identifiers, metrics, pipeline metadata and all operational intelligence endpoints require privileged authority: an authenticated ENTERPRISE/MSSP principal, a valid ADMIN_KEY, or an approved administrative RBAC principal.

GET /api/mythos/god-mode/status Availability status — detailed operational telemetry is authority-gated ▾
Anonymous requests return only a coarse availability envelope. ENTERPRISE/MSSP/admin-authorized requests receive detailed run state and operational telemetry.
curl https://cyberdudebivash.in/api/mythos/god-mode/status
GET /api/mythos/god-mode/ciso ENTERPRISE / MSSP / ADMIN CISO executive intel pack — posture gauge, threat highlights, recommendations ▾
Returns the full CISO intelligence package: executive summary with posture grade (A–F), critical CVE counts, CISA KEV entries, MITRE TTPs detected, and prioritized remediation recommendations. Privileged authentication required: real ENTERPRISE/MSSP principal, ADMIN_KEY, or administrative RBAC authority.
curl https://cyberdudebivash.in/api/mythos/god-mode/ciso \
  -H "Authorization: Bearer <ENTERPRISE_OR_MSSP_TOKEN>"
GET /api/mythos/god-mode/aspm ENTERPRISE / MSSP / ADMIN AI Security Posture Management snapshot — ASPM score, findings, zero-trust anomalies ▾
Returns the ASPM snapshot: assets scanned, overall posture, critical findings, open risks, and zero-trust anomalies including API abuse detections. Privileged authentication required: real ENTERPRISE/MSSP principal, ADMIN_KEY, or administrative RBAC authority.
curl https://cyberdudebivash.in/api/mythos/god-mode/aspm \
  -H "Authorization: Bearer <ENTERPRISE_OR_MSSP_TOKEN>"
GET /api/mythos/god-mode/compliance ENTERPRISE / MSSP / ADMIN Compliance posture — ISO 27001, SOC 2, NIST CSF, GDPR, DPDP 2023, OWASP LLM ▾
Returns compliance posture mapping active CVEs to control gaps across six frameworks. Privileged authentication required: real ENTERPRISE/MSSP principal, ADMIN_KEY, or administrative RBAC authority.
curl https://cyberdudebivash.in/api/mythos/god-mode/compliance \
  -H "Authorization: Bearer <ENTERPRISE_OR_MSSP_TOKEN>"
GET /api/mythos/god-mode/hunt-pack ENTERPRISE / MSSP / ADMIN SOAR hunt pack — auto-generated Sigma, KQL, YARA detection rules ▾
Returns Sigma rules, KQL hunt queries, and YARA signatures auto-generated for each active CVE. Privileged authentication required: real ENTERPRISE/MSSP principal, ADMIN_KEY, or administrative RBAC authority.
curl https://cyberdudebivash.in/api/mythos/god-mode/hunt-pack \
  -H "Authorization: Bearer <ENTERPRISE_OR_MSSP_TOKEN>"
POST /api/mythos/god-mode/run Trigger a full 16-phase God Mode run — admin only ▾
Triggers an asynchronous 16-phase autonomous security orchestration run. Returns immediately with a job ID. Privileged authority required: valid ADMIN_KEY, authenticated ENTERPRISE/MSSP principal, or administrative RBAC authority.
curl -X POST https://cyberdudebivash.in/api/mythos/god-mode/run \
  -H "Content-Type: application/json" \
  -H "x-api-key: <YOUR_ADMIN_KEY>" \
  -d '{"max_items": 20}'
Error Codes
CodeStatusMeaning
AUTH_REQUIRED401JWT or API key required for this endpoint
TIER_REQUIRED403Current plan insufficient — upgrade required
RATE_LIMITED429Too many requests — check Retry-After header
VALIDATION_ERROR400Request body failed validation — check the errors array
NOT_FOUND404Resource does not exist or belongs to another account
INTERNAL_ERROR500Platform error — contact support with x-request-id