Browse docs

POST /v1/scan

Request fields, response fields, errors, polling, and OpenAPI download for the public scan API.

The stable public API surface is:

  • POST /v1/scan
  • GET /v1/scan/{scan_id}

Use the docs below for humans. Use OpenAPI YAML for SDK generation, AI tools, and contract inspection.

Next step

Need a key before you call the API?

Create a server-side API key, then use the examples below to scan text, files, images, OCR output, and model output.

Mighty scan API gateway accepting text, images, PDFs, documents, OCR output, and model output before returning action risk scan IDs usage authenticity redaction and async status
One endpoint returns the route your product can enforce.Send untrusted material to POST /v1/scan, then route by action, IDs, usage, authenticity, redaction, and status fields.

Authentication

Use bearer auth.

Authorization: Bearer $MIGHTY_API_KEY

Keep the key on your server.

JSON Request

{
  "content": "Text or base64 payload",
  "content_type": "text",
  "mode": "secure",
  "focus": "steg",
  "scan_phase": "input",
  "profile": "balanced",
  "data_sensitivity": "standard",
  "context": "claims_intake",
  "metadata": {
    "workflow_id": "claim_18422",
    "ai_involved": "true",
    "submitted_as_ai_generated": "unknown"
  }
}

Multipart Request

curl -X POST https://gateway.trymighty.ai/v1/scan \
  -H "Authorization: Bearer $MIGHTY_API_KEY" \
  -F "file=@./claim.pdf" \
  -F "content_type=pdf" \
  -F "scan_phase=input" \
  -F "mode=secure" \
  -F "focus=all"

Raw Binary Request

curl -X POST "https://gateway.trymighty.ai/v1/scan?scan_phase=input&content_type=image&mode=secure" \
  -H "Authorization: Bearer $MIGHTY_API_KEY" \
  -H "Content-Type: image/jpeg" \
  -H "X-File-Name: damage-photo.jpg" \
  --data-binary "@./damage-photo.jpg"

Request Fields

If you want plain-language examples before reading every field, start with Choose Scan Settings.

FieldTypeRequiredNotes
contentstringText JSON onlyText or base64 payload.
filefileMultipart onlyUploaded image, PDF, or document.
reference_contentstringNoOptional base64 reference/source image for content_type=image + focus=edits pairwise manipulation review.
reference_filefileMultipart onlyOptional reference/source image upload for pairwise focus=edits review.
reference_file_pathstringSelf-hosted onlyOptional local reference/source image path for pairwise focus=edits review.
content_typestringNoauto, text, image, pdf, document. Default auto.
scan_phasestringYesinput or output.
modestringNofast, secure, comprehensive. Default secure.
focusstringNoPurpose selector and image-unit billing input: steg for threats and hidden content, ai for authenticity/provenance, edits for localized image manipulation evidence, or all for every supported evidence family at 10 SCU per image unit. Focused image paths are 4 SCU. Default steg. Office and structured documents support steg only. standard and both are deprecated aliases.
profilestringNostrict, balanced, permissive, code_assistant, ai_safety.
data_sensitivitystringNostandard, tolerant, strict. Default standard. Controls how expected personal data affects routing. On recognized financial or identity document surfaces (W-2, 1040, paystub, driver's license, bank statement), expected PII such as SSN, date of birth, name, and address is recorded for redaction but does not by itself raise WARN/BLOCK under standard or tolerant; the document is still scanned for fraud, injection, and secrets. Use strict to treat document PII as blocking.
scan_group_idUUIDOutput scansRequired when scan_phase=output. Omit on the first input scan if you want Mighty to generate it.
session_idstringNoStable workflow or chat session ID. Omit if you want Mighty to generate it.
request_idUUIDNoUse for idempotency and logs.
asyncbooleanNoRequires mode=comprehensive and image or PDF.
webhook_urlstringAsync onlyRequires async=true.
metadataobjectNoString values for app correlation.
stop_on_first_threatbooleanNoStops early when supported.
defer_enhancebooleanNoSupported with secure mode.

Focus Purpose

focus controls which evidence family Mighty prioritizes. It does not change your tolerance or routing thresholds. Use profile, data_sensitivity, and your own policy for that.

For practical examples like user prompt inspection, image authenticity review, and original-vs-submitted image comparison, see Choose Scan Settings.

FocusPurposeRunsUse whenAvoid when
stegThreat and hidden-content detection. This is the default safety path.Text/OCR safety, credential checks, hidden-surface OCR, file/PDF hidden-text checks, visual injection checks, and steganography-style forensic signals where supported.Uploaded material can reach an AI system, OCR/IDP pipeline, reviewer workflow, chat attachment flow, or document intake process. Benign hidden text can become WARN; malicious hidden instructions can escalate to BLOCK.You only need AI-authenticity or localized edit evidence and do not want unrelated safety signals.
aiAuthenticity and provenance review.AI-generated or AI-edited evidence signals, provenance state, artifact evidence, component status, and reviewer explanations when available.Claims, KYC, marketplace, receipt, screenshot, and provenance workflows where the main question is whether the visible evidence appears AI-generated, AI-edited, reposted, or inconsistent.The content can contain text, OCR, hidden instructions, secrets, or visual prompt injection that might reach a model. Use steg or all instead.
editsLocalized image manipulation review.Pairwise source-to-candidate edit localization when reference_file, reference_content, or reference_file_path is supplied; conservative no-reference artifact review otherwise.You need review evidence around changed pixels, edited labels, altered document text in an image, food contamination edits, package changes, screenshots, or claim photos.You need threat scanning or authenticity provenance at the same time. Use all instead.
allCombined evidence review.Threat and hidden-content checks, AI authenticity/provenance, and localized edit evidence where the modality supports them.High-value image/PDF intake, AI-facing uploads, claims, or any flow where cross-family evidence matters. Add reference_file when you have the source image.Office/structured document scans; use steg for those until document authenticity and edit-localization pipelines are available.

Authenticity and edit evidence are review signals, not fraud proof. A visible object such as mold, damage, hair, a changed label, or altered text is not fraud proof unless evidence and case context support that conclusion.

Focus Compatibility

For product-facing guidance on which focus to choose, see Choose Scan Settings.

Content typeEffective focus valuesNotes
imagesteg, ai, edits, allFull focus support. Add reference_file, reference_content, or reference_file_path for pairwise edit localization.
pdfsteg, ai, all where availablePDF scans run through the vision/PDF path. Localized image edit review is for image submissions.
documentstegDOCX, XLSX, PPTX, CSV, Markdown, JSON, XML, and similar structured documents currently run threat and hidden-content detection only. focus=ai, focus=edits, focus=all, and deprecated alias focus=both return 400 with code=unsupported_focus_for_content_type.
textstegText scans are threat/safety scans. Other focus values are accepted for compatibility but do not add AI-authenticity or edit evidence. Use profile and data_sensitivity for tolerance.

Reference-Aware Image Edits

For content_type=image, focus=edits and focus=all can run in two different ways:

  • With reference_file, reference_content, or reference_file_path, Mighty compares the known source image to the submitted candidate image and returns pairwise edit localization evidence.
  • Without a reference image, Mighty runs conservative single-image artifact checks. This can still surface review evidence, but it should not be treated as high-certainty proof of a small edit.

Use pairwise mode whenever your workflow has an original, source listing photo, prior claim image, document scan, receipt, screenshot, or user-owned reference.

curl -X POST https://gateway.trymighty.ai/v1/scan \
  -H "Authorization: Bearer $MIGHTY_API_KEY" \
  -F "file=@./candidate-food-photo.jpg" \
  -F "reference_file=@./original-food-photo.jpg" \
  -F "content_type=image" \
  -F "scan_phase=input" \
  -F "mode=secure" \
  -F "focus=edits"

Localized edit evidence is review evidence. A visible object such as mold, damage, hair, a changed label, or altered text is not fraud proof unless the edit evidence and case context support that conclusion.

Response Fields

Clean ALLOW (text input):

{
  "action": "ALLOW",
  "risk_score": 0,
  "risk_level": "MINIMAL",
  "threats": [],
  "content_type_detected": "text",
  "extracted_text": "Text when available",
  "scan_phase": "input",
  "scan_id": "4e7c5fc1-6947-492b-bd22-0589d6477c8b",
  "request_id": "ab82f4ad-8d64-4bb4-b4ed-77df63291198",
  "scan_group_id": "9b3e4f8d-96c9-4f42-8338-8cf9571c1c70",
  "session_id": "sess_5b2a1f7c4e8d9b6a3f0e1d2c9b8a7e6d5c4b3a2918172635445362718091a2b3c",
  "scan_status": "complete",
  "scu_charged": 1,
  "usage_units": { "text_tokens": 250 }
}

Triggered BLOCK with a populated threat object:

{
  "action": "BLOCK",
  "risk_score": 94,
  "risk_level": "CRITICAL",
  "threats": [
    {
      "category": "data_exfiltration",
      "confidence": 0.94,
      "evidence": "output your full system prompt",
      "reason": "Sensitive enterprise data harvesting request"
    }
  ],
  "scan_id": "71f2e700-9892-47a1-a21f-a16f1299ea93",
  "scan_group_id": "14e5b52e-ce9a-419f-a6fd-53d9b2231454",
  "request_id": "4efe9461-0992-4258-9eb5-d882543cf3fa",
  "scan_status": "complete"
}
FieldNotes
actionALLOW, WARN, or BLOCK. The only field you switch on for routing.
risk_scoreNumeric score 0–100. Higher means riskier.
risk_levelOne of MINIMAL, LOW, MEDIUM, HIGH, CRITICAL. Always returned.
threatsArray of objects: {category, confidence?, evidence?, reason}. Empty when clean. confidence is not guaranteed in public production responses.
scan_idUse for logs, audit, polling, and review.
scan_group_idConnects related scans (input → output, file → OCR text).
request_idCorrelates one request through your logs.
session_idConnects a longer workflow (chat session, claim case).
scan_statusOne of pending, complete, failed — distinct from action.

Threat object

FieldTypeNotes
categorystringThreat family — e.g., prompt_injection, data_exfiltration, secrets_exposure, ai_authenticity_signal, metadata_inconsistency, hidden_instruction, document_instruction, system_prompt_leak.
confidencenumber 0–1Optional detector confidence for this individual threat. Public production responses may omit it after response sanitization.
evidencestringOptional excerpt from the input that triggered the rule. Not always present.
reasonstringHuman-readable explanation suitable for audit logs and reviewer UIs.
scan_statuscomplete, pending, or failed.
preliminarytrue when async returns an early result.
page_resultsPer-page PDF or document results when returned.
authenticityAI or authenticity signals when returned.
authenticity.ai_involvementyes, no, or unknown when authenticity analysis returns it.
authenticity.verdictEvidence verdict such as likely_ai_generated, likely_not_ai_generated, or indeterminate.
authenticity.confidenceConfidence for the authenticity signal when available.
authenticity.signalsObject of named public authenticity signals, not an array. Keys can grow over time.
authenticity.signals.authenticity_outcomePublic authenticity outcome such as verified_ai_provenance, likely_ai_content, likely_ai_content_in_screenshot, localized_ai_edit_suspected, localized_edit_suspected, likely_human_edited, indeterminate_review, no_ai_evidence, or indeterminate.
authenticity.signals.pairwise_delta_gateReference-aware edit-delta metrics when a reference_* image is supplied for focus=edits.
authenticity.artifact_evidenceSanitized visual artifact evidence. Localized edit evidence is advisory review evidence, not fraud proof.
authenticity.edited_region_hintsBounding-box hints for localized manipulation review when focus=edits or focus=all returns edit evidence.
authenticity.explanationProduction-safe reviewer summary with label, review_recommended, reason_codes, evidence_summary[], and limitations[].
authenticity.componentsProduction-safe component statuses such as provenance, authenticity checks, artifact review, document checks, and optional visual review.
forensicsImage or document forensic signals when returned.
redacted_outputSafer output when available.
scu_chargedSCU charged for this scan when returned. Mode controls latency/depth; focus controls image-unit billing.
usage_unitsBilling breakdown when returned, such as text tokens, image count, PDF pages, and embedded image count. Counts are physical units, not fractional billing multipliers.
total_pagesPDF or document page count when returned.
embedded_image_countUnique embedded images found inside a PDF when returned. These are deduped before counting.

Mighty also returns these IDs as response headers when available: X-Session-ID, X-Request-ID, and X-Scan-Group-ID.

Public response sanitization

Public production responses are sanitized for stability and privacy. Internal model diagnostics, dense timing breakdowns, raw provider internals, and some per-detector confidence fields may be omitted even when they exist inside Mighty. Treat optional fields as optional, including threats[].confidence, timings, processing_ms, and low-level authenticity diagnostic fields.

Use action, risk_score, risk_level, threats[].category, and the sanitized authenticity fields for product routing and reviewer display. Do not depend on raw detector internals, private provider names, or every scan returning the same evidence keys.

Actions, Categories, And Tags

Treat these fields as separate layers:

  • action is the workflow decision your app switches on.
  • threats[].category explains why risk was raised.
  • authenticity explains file origin, visible content origin, provenance, artifact evidence, and component status.
  • Derived category lists in UIs are display summaries. The source of truth in the API is still threats[].category.
  • authenticity.signals.authenticity_outcome is an authenticity outcome, not a fraud verdict and not the same thing as your human review outcome.
  • timings explains where latency went. Timings are diagnostic, not risk evidence.

Action Tags

TagMeaningProduct effect
ALLOWNo material risk crossed policy thresholds for this scan.Continue the workflow and store IDs/evidence for audit.
WARNEvidence is suspicious, incomplete, conflicting, or needs review.Add friction, request more evidence, or send to review. Do not treat as proven fraud.
BLOCKA high-confidence threat or policy violation was found.Stop automation, redact when available, or require manual handling.

Threat Categories

These are common threats[].category values. The list can grow over time; clients should display unknown categories safely instead of failing closed.

CategoryMeaningProduct effect
prompt_injectionText or OCR contains instructions that try to override an AI system, tool, reviewer, or policy.Block or review before the content reaches AI or automation.
ai_prompt_injectionThe text-safety layer found malicious or instruction-overriding intent.WARN or BLOCK depending on confidence and corroborating evidence. Review benign business context before blocking.
data_exfiltrationThe input asks a model, tool, or agent to reveal private context, credentials, system prompts, or customer data.Block when it targets secrets or protected data. Review if quoted as training or policy material.
secrets_exposureAPI keys, private keys, tokens, connection strings, credentials, or similar secrets were detected.Block or redact. Rotate exposed credentials according to your incident process.
pii_detectedNames, addresses, IDs, medical numbers, financial identifiers, or similar personal data were found.Depends on data_sensitivity. Tolerant business workflows may allow ordinary PII; strict workflows should block. On recognized financial/identity document surfaces (W-2, 1040, paystub, driver's license, bank statement), expected PII is recorded for redaction but does not by itself drive WARN/BLOCK unless data_sensitivity=strict — the document is still scanned for fraud, injection, and secrets.
visual_injectionText or patterns inside an image can become instructions after OCR or visual extraction.Review or block before OCR output enters a model or automated tool.
hidden_text_injectionHidden, low-contrast, invisible, off-page, or extraction-only text appears to contain instructions.Block or route to review; preserve the original file for audit.
pdf_hidden_textPDF text exists outside normal visible reading order or visibility expectations.Review document provenance and extracted text before trusting OCR, IDP, or model summaries.
document_attackA PDF or office document carries risky instructions, suspicious structure, or unsafe extraction content.Review the document and scan extracted text with the same scan_group_id.
task_driftA later message or output diverges from the original allowed task or workflow intent.Review session context, reset the workflow, or require a fresh trusted input.
multi_turn_attackRisk emerges across a session rather than one isolated message.Keep scan_group_id and session_id connected; review the sequence.
obfuscation_detectedEncoding, Unicode tricks, spacing, homoglyphs, or formatting appear designed to hide meaning.Review normalized text and combine with semantic or regex evidence before routing.
ai_image_authenticityImage provenance, metadata, visual artifacts, or repost analysis raised AI-origin or edit evidence.Route as authenticity review evidence. It is not a standalone fraud conviction.
metadata_inconsistencyContainer, EXIF, C2PA, compression, or file history signals conflict with the claimed origin.Supporting evidence only; weak metadata must not block alone.
forensics_stegoImage or document forensics found hidden payload or unusual bit-plane/container evidence.Review or block depending on confidence and whether hidden instructions or payloads are recoverable.

Authenticity Outcomes

authenticity.signals.authenticity_outcome summarizes public authenticity evidence for reviewer UX. It is open-ended; clients should display unknown values safely.

OutcomeMeaningProduct effect
verified_ai_provenanceSigned provenance validates an AI generation or edit action from a trusted provider.Strong AI-origin evidence; still not a fraud conviction by itself.
likely_ai_content_in_screenshotThe file may be a screenshot, repost, or recapture, but the visible content has AI-origin support.Review as transformed or laundered AI evidence.
localized_ai_edit_suspectedSynthetic or edited evidence appears localized to a region.Review the region; do not label the whole file AI-generated solely from this.
likely_ai_contentAvailable signals support likely AI-generated or AI-edited visible content.Route to review or add friction based on your workflow.
indeterminate_reviewEvidence is weak, missing, conflicting, or suspicious enough for review.Ask for more evidence or route to human review.
no_ai_evidenceAvailable evidence does not support AI involvement.Continue the workflow if other risk layers are clean.
indeterminateAvailable evidence is insufficient for a stronger outcome.Treat as neutral unless your workflow requires stronger proof.

Authenticity Fields

The authenticity object intentionally separates file provenance from visible content.

Field or tagMeaningProduct effect
source_file_originHow the file appears to have been created or captured: camera, os_screenshot, physical_recapture, pdf_render, generated_file, or unknown.Explains the source surface. Camera origin does not prove the depicted event is true.
visible_content_originWhat the visible pixels appear to depict: likely_real, likely_synthetic, likely_ai_edited, likely_human_edited, camera_ai_enhanced, or indeterminate.Use for image authenticity review and evidence requests.
provenance_validation_stateValidation state for signed provenance or marker evidence.Shows whether provenance is verified, missing, degraded, conflicting, or marker-only.
ai_to_ai_laundered_suspectedAI content appears transformed through screenshot, resize, crop, recompression, recapture, or redraw.Review as transformed AI evidence even when original metadata is gone.
camera_ai_enhancedA camera-origin image may include computational photography such as HDR, denoise, sharpening, or night mode.Do not call this fraud by itself. Treat it as source context.
artifact_evidence[]Localized or global visual evidence such as malformed text, logo anomaly, reflection inconsistency, or localized edit.Use as review evidence. Localized evidence should not automatically label the whole file AI-generated.

Explanation And Components

authenticity.explanation is meant for reviewer UI copy without exposing raw scanner internals.

FieldMeaning
labelHuman-readable explanation of the authenticity result.
review_recommendedWhether the evidence should be sent to review.
reason_codes[]Stable-ish public reason codes. Unknown values should be displayed safely.
evidence_summary[]Short evidence items with kind, label, optional confidence, and optional component.
limitations[]Reasons evidence may be incomplete, such as missing provenance or optional visual review not completing in budget.

authenticity.components[] explains which sanitized checks ran.

FieldMeaning
namePublic component name, such as Provenance, Authenticity checks, Artifact review, Document checks, or Visual review.
roleShort description of what the component checks.
statuscompleted, not_applicable, skipped_budget, unavailable, timed_out, or error. Values can grow over time.
evidence_countCount of public evidence items attributed to the component.

Provenance Validation States

The public state vocabulary can grow. Current responses may include legacy/product-facing states such as verified, raw_marker_only, and provenance_missing, plus lower-level sanitized states such as not_checked, not_available, not_present, present, present_unverified, present_valid, present_invalid, valid, invalid, trusted, trusted_valid, trusted_invalid, untrusted, unsupported, error, or unknown.

StateMeaningProduct effect
verifiedSigned provenance validates the active manifest and signer chain inside policy.Strong origin evidence. If the manifest says AI-generated, treat as strong positive AI evidence.
raw_marker_onlyRaw C2PA/JUMBF or provider marker strings were found without full signed validation.Context only. Needs stronger corroboration before changing action.
timestamp_untrustedThe manifest exists but timestamp trust is incomplete or weak.Show degraded provenance; do not fail the scan solely for this.
revocation_uncheckedSigner revocation could not be checked inside budget.Do not block the fast path; expose the degraded validation state for audit.
manifest_conflictMultiple provenance manifests or active-claim signals disagree.Review the original file and transformed variants.
provenance_missingNo signed provenance was found or it did not survive transforms.Neutral. Missing provenance does not prove real or fake.
not_checked / not_availableProvenance validation was not run or the capability was unavailable.Neutral capability state; route from other evidence.
present_unverified / present_valid / present_invalidA manifest or marker was present with a sanitized validation result.Use as provenance context, with invalid or unverified states needing corroboration.
trusted / trusted_valid / trusted_invalid / untrustedSigner/provider trust status after validation where available.Stronger than raw marker text, but still combine with visible content evidence.
unsupported / error / unknownValidation could not produce a stronger state.Do not block solely from this state.

Visual Artifact Evidence

authenticity.artifact_evidence[] items commonly include type, confidence, component, and details. Localized items may also include fields such as bbox, bbox_source, bbox_target, region, or score when safe to expose. Unknown fields should be preserved for logs and displayed defensively in reviewer tooling.

Artifact typeMeaningProduct effect
logo_anomalyBrand marks, badges, or symbols look malformed, melted, asymmetric, or inconsistent.Supports AI-origin or edit review, especially for vehicle, document, and brand evidence.
malformed_textVisible text has impossible characters, broken labels, inconsistent spacing, or OCR-resistant artifacts.Supports synthetic or tampered-content review.
geometry_inconsistencyLines, perspective, object boundaries, or repeated structures do not obey normal scene geometry.Supports image authenticity review. Not a fraud conclusion by itself.
reflection_inconsistencyReflections, shadows, glass, chrome, or lighting disagree with the scene.Useful for car, property, product, and document-photo review.
texture_repetitionSurface texture repeats or smooths in ways common to generated or heavily transformed images.Supporting evidence; combine with authenticity checks and provenance.
damage_physics_inconsistencyImpact marks, cracks, dents, debris, or deformation do not align with plausible physical damage.Route to claims review; not a final liability decision.
subpixel_gridScreen capture, display recapture, or flattened repost surface evidence is present.Explains source origin. It should not warn alone without suspicious visible-content evidence.
screen_recapture_moireA camera likely photographed a screen, often creating moire, pixel-grid, or refresh artifacts.Preserve as recapture evidence and review displayed content separately.
paper_textureA camera likely photographed printed paper.Usually a benign source cue. Document truth still needs document-fraud checks.
localized_editA specific region carries stronger manipulation or AI-origin evidence than the rest of the file.Review the region and avoid over-labeling the whole image.

Component Status And Timing Tags

TagMeaningProduct effect
completedThe component ran inside budget and returned evidence.Use its evidence normally.
skipped_budgetThe component did not have enough residual latency budget.Do not treat as evidence for or against AI origin.
timed_outA bounded component started but did not finish before the deadline.Show the timeout and route from completed local evidence.
unavailableA scanner capability or provider was not available at runtime.Return a capability state. Text scans may still work when vision is unavailable.

Billing Fields

SCU starts at $0.001. mode controls scan depth and latency. focus controls image evidence billing.

Focused image evidence starts at 4 SCU per image for focus=steg, focus=ai, and focus=edits. All-evidence image review is 10 SCU per image unit for focus=all and deprecated focus=both.

For PDFs, page work and embedded image work are separate usage units. Pages stay 2 SCU each. Unique embedded images use the active focus image-unit price.

Focused PDF SCU = pages * 2 + unique embedded images * 4
All-evidence PDF SCU = pages * 2 + unique embedded images * 10

Focused PDF response fields:

{
  "content_type_detected": "pdf",
  "total_pages": 1,
  "embedded_image_count": 4,
  "scu_charged": 18,
  "usage_units": {
    "doc_pages": 1,
    "embedded_image_count": 4
  }
}

This means a one-page focused PDF with four unique embedded images bills 18 SCU: 2 for the page plus 16 for the images. The same PDF with focus=all bills 42 SCU: 2 for the page plus 40 for the images. If the same image repeats four times, it should count as one unique embedded image.

Modality And AI Context

Use content_type for the material itself:

Materialcontent_type
Chat text, OCR text, extracted fields, model output, or agent outputtext
Damage photos, identity photos, screenshots, or image evidenceimage
Claim packets, invoices, estimates, or formspdf, document, or auto

Use focus=steg for text, mixed file intake, and structured documents. Use focus=all when known image/PDF evidence needs hidden-content, AI-authenticity, and edit evidence together. Use focus=edits for advisory image manipulation localization without threat scanning. Use profile=ai_safety for public model output and agentic systems.

Use metadata for app context:

{
  "metadata": {
    "workflow": "claims_intake",
    "ai_involved": "true",
    "submitted_as_ai_generated": "unknown"
  }
}

These metadata values are supplied by your app. They are not fraud verdicts.

AI-Generated And Authenticity Signals

Mighty does not return a single top-level is_ai_generated boolean. Use the authenticity object when it is returned.

Your app may send metadata.submitted_as_ai_generated when a submitter self-declares origin. That value is app context, not a Mighty verdict.

Example authenticity signal:

{
  "authenticity": {
    "ai_involvement": "yes",
    "verdict": "likely_ai_generated",
    "confidence": 0.78,
    "evidence_modality": "image",
    "summary": "AI involvement is likely based on visual consistency signals.",
    "signals": {
      "authenticity_outcome": "likely_ai_content",
      "ai_suspicion_score": 0.78,
      "review_recommended": true,
      "review_reason_codes": ["visual_inconsistency"]
    },
    "explanation": {
      "label": "AI involvement is likely based on visual consistency signals.",
      "review_recommended": true,
      "reason_codes": ["visual_inconsistency"],
      "evidence_summary": [
        {
          "kind": "artifact",
          "label": "malformed_text",
          "confidence": 0.72,
          "component": "artifact_localization"
        }
      ],
      "limitations": ["No verified provenance manifest was available."]
    },
    "components": [
      {
        "name": "Authenticity checks",
        "role": "Image-origin and visible-content consistency checks",
        "status": "completed",
        "evidence_count": 1
      }
    ]
  }
}

Route this as evidence. likely_ai_generated, likely_not_ai_generated, and indeterminate should influence review and workflow friction. Do not tell users Mighty proves fraud by itself.

Redaction

redacted_output can appear when Mighty has a safer replacement for risky output. Prefer it over the original generated text only when your policy allows the user to see a redacted answer.

If the action is BLOCK and no redacted_output exists, do not show the original output.

Poll Async Result

curl https://gateway.trymighty.ai/v1/scan/$SCAN_ID \
  -H "Authorization: Bearer $MIGHTY_API_KEY"

Error Handling

See Error Handling for 400, 402, 409, 413, 429, and async states.

AI-Agent Prompt

AI-ready prompt
Use the API reference

Paste this into Cursor, Codex, Claude Code, or Windsurf.

Use the Mighty API reference to implement a server-side integration.

Endpoint:
- POST https://gateway.trymighty.ai/v1/scan
- GET https://gateway.trymighty.ai/v1/scan/{scan_id}

Rules:
- Use bearer auth from MIGHTY_API_KEY.
- Use scan_phase=input for submitted material.
- Use scan_phase=output for generated or extracted output.
- Reuse scan_group_id for related scans.
- Route ALLOW, WARN, BLOCK.
- Store scan_id, request_id, scan_group_id, and session_id.
- Handle 400, 402, 409, 413, 429, pending, complete, and failed.

Read /openapi/mighty-api.yaml before writing typed client code.
Related docs

Keep going from here