# Detect Video

Detect if a video is AI-generated.

## Endpoint

`POST https://api.bitmind.ai/detect-video`

## Authentication

Send a Bearer token in the `Authorization` header.

See [Authentication](https://docs.bitmind.ai/api-reference/authentication).

## Request

```bash
curl -X POST https://api.bitmind.ai/detect-video \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"video": "https://example.com/video.mp4"}'
```

### Multipart upload

```bash
curl -X POST https://api.bitmind.ai/detect-video \
  -H "Authorization: Bearer $API_KEY" \
  -F "video=@video.mp4"
```

### JSON fields

| Field       | Type    | Required | Description                                                    |
| ----------- | ------- | -------- | -------------------------------------------------------------- |
| `video`     | string  | Yes      | Video URL. Supports YouTube, Twitter, TikTok, and direct links |
| `startTime` | float   | No       | Start time in seconds                                          |
| `endTime`   | float   | No       | End time in seconds                                            |
| `fps`       | integer | No       | Frames per second for analysis                                 |
| `debug`     | boolean | No       | Include debug data in the response                             |

### Multipart fields

| Field       | Type   | Required | Description                    |
| ----------- | ------ | -------- | ------------------------------ |
| `video`     | file   | Yes      | Video file to upload           |
| `startTime` | string | No       | Start time in seconds          |
| `endTime`   | string | No       | End time in seconds            |
| `fps`       | string | No       | Frames per second for analysis |
| `debug`     | string | No       | `"true"` or `"false"`          |

## Response

```json
{
  "isAI": true,
  "confidence": 0.87,
  "similarity": 0.0,
  "objectKey": "1234567890.mp4",
  "thumbnailObjectKey": "thumbnails/1234567890/main.jpg"
}
```

## Notes

* Direct uploads are limited to `10MB`
* For larger files, use the presigned upload flow in [API Reference](https://docs.bitmind.ai/api-reference)
