# TruthScan API reference

> TruthScan's image detection API checks whether an image is AI generated and returns a verdict with a confidence score. An investigator uses it to triage images for synthetic generation or edits. This reference covers the image API only; TruthScan also documents text, PDF, audio, video and capture…

Source: https://osinttools.io/apis/truthscan/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/truthscan/

- Base URL: https://detect-image.truthscan.com
- Authentication: API key in the `apikey` header. Get a key: https://truthscan.com/ GET endpoints use the apikey header; POST /detect takes the key as `key` in the JSON body.
- Rate limits: 250 weighted requests per minute per key: /detect and /bulk-upload cost 1, read endpoints 0.2, /query and /health are not limited. On 429 wait at least X-RateLimit-Retry-After seconds.
- Vendor docs: https://truthscan.com/truthscan-ai-image-detection-api-documentation
- OpenAPI spec: https://truthscan.com/openapi/image.json

## Overview

TruthScan's image detection API checks whether an image is AI generated and returns a verdict with a confidence score. An investigator uses it to triage images for synthetic generation or edits. This reference covers the image API only; TruthScan also documents text, PDF, audio, video and capture APIs.

The flow is: request a presigned upload URL with `GET /get-presigned-url`, PUT the file to it (1KB to 10MB), `POST /detect` with the file's URL to start a job, then `POST /query` with the returned `id` until `status` is done. The upload steps and the ZIP bulk upload are not described here. `/detect` takes the key in the JSON body as `key`; the GET endpoints take it in an `apikey` header. `/query` needs no key, so treat job IDs as sensitive.

The limit is 250 weighted requests per minute per key.

## Errors

| Status | Meaning |
| --- | --- |
| 429 | Rate limit exceeded; wait X-RateLimit-Retry-After seconds and retry with backoff |

## Detection

### Start an AI-image detection job for an uploaded image.

`POST /detect`

- Footprint: passive (the target is not contacted)
- Cost: 1 rate-limit unit per request

Returns a job id and status pending. The `url` is built from the storage host and the `file_path` returned by /get-presigned-url after you upload the file. Poll /query for the result.

Response fields:

- `id` (string): Job ID to pass to /query
- `status` (string): Job status, pending when accepted

```bash
curl -X POST 'https://detect-image.truthscan.com/detect' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"key":"YOUR_API_KEY","url":"https://storage.example.com/uploads/photo.jpg","generate_preview":true,"generate_heatmap":true}'
```

Example response (200):

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending"
}
```

### Get the status and result of a detection job.

`POST /query`

- Footprint: passive (the target is not contacted)

Poll until status is done. The heatmap and analysis results are asynchronous, so keep polling until their status fields are ready.

Response fields:

- `id` (string): Document ID
- `status` (string): Processing status, done when finished
- `result` (number): Result score
- `preview_url` (string): Preview image URL
- `result_details.final_result` (string): Final verdict, for example AI Generated
- `result_details.final_label_confidence` (number): Confidence of the final label
- `result_details.confidence` (number): Confidence score
- `result_details.detection_step` (integer): Highest stage reached: 1 metadata, 2 watermark/OCR or SynthID, 3 ML
- `result_details.ml_model` (array): Label and confidence from the ML model
- `result_details.warnings[]` (object): Warnings such as a watermark or blur label
- `result_details.heatmap_url` (string): Heatmap URL

```bash
curl -X POST 'https://detect-image.truthscan.com/query' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"id":"123e4567-e89b-12d3-a456-426614174000"}'
```

Example response (200):

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "done",
  "result": 99,
  "preview_url": "https://example.com/preview.jpg",
  "result_details": {
    "confidence": 99,
    "detection_step": 3,
    "final_label_confidence": 95,
    "final_result": "AI Generated",
    "ml_model": [
      "AI Generated",
      95
    ],
    "warnings": [
      {
        "label": "Blurred",
        "type": "blur_dark"
      }
    ]
  }
}
```

## Account

### Get the credit balance of the API key.

`GET /check-user-credits`

- Footprint: passive (the target is not contacted)

Returns base, boost and total credits.

Response fields:

- `baseCredits` (integer): Base credits
- `boostCredits` (integer): Boost credits
- `credits` (integer): Total credits

```bash
curl 'https://detect-image.truthscan.com/check-user-credits' \
  -H 'apikey: YOUR_API_KEY'
```

Example response (200):

```json
{
  "baseCredits": 100,
  "boostCredits": 50,
  "credits": 150
}
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
