# Integration Guides

Choose the Mighty integration guide for text, OCR, uploads, images, model output, async scans, and errors.

Source URL: https://trymighty.ai/docs/integrate

This section is for product surfaces.

Start here when you know what your app is handling, but you are not sure where Mighty should sit.

## Choose The Guide

| You have | Start with | What it helps you do |
| --- | --- | --- |
| Text, images, PDFs, documents, OCR output, or model output | [Multimodal Support](/docs/integrate/multimodal-support) | Pick `content_type`, `scan_phase`, `focus`, and `data_sensitivity`. |
| Chat text, OCR text, extracted fields, or form fields | [Scan Text And OCR Output](/docs/integrate/text-ocr) | Scan text before it becomes model context or workflow data. |
| Browser or API file uploads | [Scan File Uploads](/docs/integrate/file-uploads) | Scan files before storage, OCR, extraction, or automation. |
| Damage photos or visual evidence | [Damage Photo AI Fraud Review](/docs/integrate/images-ai-fraud) | Route suspicious image evidence without claiming fraud proof. |
| Assistant answers, AI summaries, or agent output | [Scan Model Output](/docs/integrate/model-output) | Scan generated output before users or tools act on it. |
| High-value PDFs or images that need deeper review | [Async Deep Scans](/docs/integrate/async-webhooks) | Submit async scans, poll, or handle webhooks. |
| Billing, payload, rate limit, or request errors | [Error Handling](/docs/integrate/errors) | Handle `400`, `402`, `409`, `413`, `429`, and async states. |

## The Integration Rule

Put Mighty before the first trust boundary.

```text
untrusted material -> POST /v1/scan -> route result -> trusted next step
```

Examples:

- Upload before storage.
- PDF before OCR.
- OCR text before workflow fields.
- Prompt before model call.
- Model output before user display.
- Tool output before agent context.

## What To Store

For every integration, store:

| Field | Why |
| --- | --- |
| `scan_id` | Link to the exact scan result. |
| `request_id` | Debug retries and request logs. |
| `scan_group_id` | Connect original input, OCR, extracted text, model output, and review for one item. |
| `session_id` | Connect the wider chat, claim, case, batch, or agent run. |
| `action` and `risk_score` | Explain why the workflow continued, reviewed, or stopped. |

## AI-Agent Prompt

### Choose a Mighty integration guide

```text
Choose the correct Mighty integration guide for this product.

For each product surface:
- Identify the untrusted material.
- Pick the guide: multimodal, text and OCR, file uploads, image evidence, model output, async scans, or errors.
- Place POST /v1/scan before the first trust boundary.
- Use scan_phase=input for submitted material.
- Use scan_phase=output for generated, extracted, or agent-created material.
- Store scan_id, request_id, scan_group_id, session_id, action, and risk_score.
- Route ALLOW, WARN, BLOCK, indeterminate, pending, and failed.

Acceptance criteria:
- Every guide choice maps to a real code path.
- API key stays server-side.
- Tests cover the route for the selected guide.
```
