Skip to main content
POST
AI Video Detection

Overview

Use POST /api/v1/ai-detection/video to check whether a video is AI-generated. Send a direct link to an MP4, MOV or WebM file up to 2 minutes long. The result covers the whole video, time segments and individual frames. Detection is run by Pangram.
To upload a video file instead of sending a link, use the AI video detector on nano-gpt.com. It uses the same detector and price.

Endpoint

Authentication

An API key is required. Browser sessions are not accepted.
  • Authorization: Bearer YOUR_API_KEY
  • x-api-key: YOUR_API_KEY

Request Body

Parameters

There is one video detection model; the request takes no model field.

Pricing

The server downloads the video only after your balance and any API key spend limits cover $7.50, the price of the longest video it accepts. The charge is then based on the duration the detector reports, or the duration the server measured when the detector reports none, and is never more than $7.50. For example, an 11.1-second video is billed as 12 seconds: $0.75. You are charged only when a result is returned; a detector failure is not charged. If you disconnect after the video reaches the detector, the check still finishes and is charged. For API keys with an allowed-model list, the list must include pangram-video-detection.

Video Rules

  • video_url must be a direct link to the video file, not a web page that plays it. Links with a username or password are refused.
  • The link must return a successful response with a Content-Type of video/mp4, video/quicktime or video/webm. A text/* response, such as an HTML page, is refused.
  • The file must start with an MP4/MOV or WebM container header. A file that is not a video is refused even when the server labels it as one.
  • Size: up to 500 MiB (524,288,000 bytes).
  • Length: up to 2 minutes (120 seconds after rounding up to whole seconds). The server reads the length from the file before charging.
  • The download must finish within 5 minutes.
  • Link downloads count against the same per-account and per-IP request and byte quotas as other NanoGPT remote file fetches.
  • Up to 2 video checks can run at once per account.
The server keeps a private copy of the video only for the check. The copy is removed when the check ends and permanently deleted within about two hours.

Response

The example is shortened to one frame. The request returns when the check finishes, which can take several minutes. Set your client timeout to at least 30 minutes. The server stops waiting for the detector about 29 minutes after the request starts and returns 504 with code timeout.

Example

Common Errors

Errors use this shape: