API Docs

Programmatic analysis for Dispel.cloud

Use bearer-authenticated endpoints to submit content, receive normalized verdicts, and integrate Dispel into a future API product surface. Scores are calibrated product heuristics, not absolute truth.

Workspace
Protected investigation console
Authentication

v1 analyze endpoints require an API key in the Authorization header. The compare endpoint currently uses workspace session auth because it is designed for interactive, source-bounded review inside the app.

Authorization: Bearer dsp_live_1234abcd_xxxxxxxxxxxxxxxxxxxxxxxx

API access is gated to Pro. Key management routes are tied to the current workspace identity in settings, and raw tokens are never stored after creation.

v1 programmatic endpoints currently cover text and image. Voice, music, and video remain available in the web app while the API surface stays intentionally small.

Compare mode is already live at /api/compare, but it remains a workspace-authenticated route until the API product grows a dedicated multi-source comparison plan surface.

Endpoints
POST/api/compare

Compare bounded source excerpts and return separated facts, inferences, uncertainty, and calibrated comparative synthesis for the signed-in workspace.

POST/api/v1/analyze/text

Submit text content for scam-risk, AI-likelihood, provenance, and claim-consistency scoring.

POST/api/v1/analyze/image

Submit an image file with multipart form data for file inspection, OCR-assisted scoring, and provider-backed checks when configured.

GET/api/v1/me/usage

Return the local workspace usage summary used by the dashboard settings screen.

GET/api/v1/me/keys

List the current user’s API keys, prefixes, statuses, and usage counts.

POST/api/v1/me/keys

Create a new API key and reveal the raw token one time.

POST/api/v1/me/keys/:id/revoke

Revoke an issued API key. Revocation is immediate and cannot be undone.

Examples
Compare request
curl -X POST https://your-host/api/compare \
  -H "Content-Type: application/json" \
  -H "Cookie: dispel_session=..." \
  -d '{
    "title": "Conflicting seller claims",
    "sources": [
      {
        "sourceId": "source-1",
        "title": "Marketplace DM",
        "originLabel": "Seller message",
        "sourceType": "message",
        "excerpt": "I can only take payment off-platform today because my account is limited."
      },
      {
        "sourceId": "source-2",
        "title": "Listing copy",
        "originLabel": "Listing body",
        "sourceType": "article",
        "excerpt": "All payments are protected through the marketplace checkout and never leave the platform."
      }
    ]
  }'
Text analysis request
curl -X POST https://your-host/api/v1/analyze/text \
  -H "Authorization: Bearer $DISPEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Suspicious payroll note",
    "text": "Urgent final notice. Pay the onboarding fee today by gift card."
  }'
Image analysis request
curl -X POST https://your-host/api/v1/analyze/image \
  -H "Authorization: Bearer $DISPEL_API_KEY" \
  -F "title=Listing screenshot" \
  -F "file=@suspicious-image.png"
Representative response
{
  "analysisId": "cm123...",
  "type": "TEXT",
  "verdict": "HIGH_RISK",
  "overallTrustScore": 14,
  "aiLikelihoodScore": 58,
  "scamRiskScore": 92,
  "manipulationRiskScore": 71,
  "provenanceScore": 28,
  "claimConsistencyScore": 35,
  "confidenceLabel": "Moderate",
  "summary": "Multiple payment-pressure and impersonation signals were found.",
  "recommendedAction": "Do not pay or click links until you verify the source independently.",
  "uncertaintyNote": "Provider-backed AI checks can remain unknown when adapters are inactive.",
  "comparison": null,
  "evidence": [],
  "warnings": [
    "Remote image provider is unavailable, so AI-likelihood remains unknown."
  ],
  "provider": {
    "key": "openai-compatible",
    "status": "inactive"
  },
  "reportUrl": "https://your-host/report/...",
  "receiptUrl": "https://your-host/report/...?view=receipt"
}