# 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](/api-reference/authentication.md).

## 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](/api-reference.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bitmind.ai/api-reference/api/detect-video.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
