Skip to main content
POST
Analyze uploaded file
Run AI-powered analysis on a previously uploaded audio/video file.

Overview

Similar to Analyze Video, but operates on files in your library.

Request Body

  • file_id (string, required): ID of the uploaded file to analyze
  • query (string, optional): Ask a specific question about the content

Billing

File analysis consumes analysis_request units based on context size. One unit covers up to 15,000 total tokens, and longer contexts are billed with ceil(total_tokens / 15000). For example, an analysis that uses 17,000 total tokens consumes 2 analysis_request units. One unit is charged up front as a credit gate; additional units are topped up at the end if the LLM call exceeded 15,000 tokens. The file’s transcript is read locally from your storage — no proxy fetch is involved, so no standard_request / residential_request is charged. Set include_usage: true to receive a usage block with the per-charge breakdown.

Example Request

cURL

Authorizations

X-API-Key
string
header
required

API key authentication. Include your VidNavigator API key in the X-API-Key header.

Body

application/json
file_id
string
required

ID of the uploaded file to analyze

query
string

Optional question about the file content

Example:

"What is discussed in this file?"

transcript_text
boolean
default:false

When true, returns the transcript as a single plain-text string instead of an array of segments.

include_usage
boolean
default:false

When true, the response includes a usage block listing every meter charged during this request, the total credits deducted, and the user's remaining balance.

Response

File analyzed successfully

status
enum<string>
Available options:
success
data
object
usage
object

Per-call usage disclosure. Returned only when the caller passes include_usage=true in the request body. Lists every meter that fired during this request and the credits actually deducted. Multiple charges of the same meter inside one request are consolidated into a single entry (their quantities and credits are summed). When a charge was waived through a cache-hit sponsorship (e.g. NGO), it carries waived: true + credits_saved, and a top-level waived.credits_saved summary appears.

For endpoints that involve LLM analysis (/extract/video, /extract/file, /analyze/video, /analyze/file, /youtube/search), the consolidated analysis_request charge entry carries a nested tokens object reporting the LLM input/output token tally for the request.