Skip to main content
POST
Extract structured data from uploaded file
Extract structured data from an uploaded file’s transcript using a custom schema you define.

Overview

Extract structured data from files you have previously uploaded to your VidNavigator library. The file must be fully processed and have a transcript available.

How It Works

  1. Provide a file_id and a schema describing the structured fields you want
  2. VidNavigator reads the transcript from the uploaded file
  3. VidNavigator runs AI extraction against your schema
  4. You receive structured JSON matching your schema definition, plus file_info

Schema Rules

  • Each field must have type and description
  • Supported types: String, Number, Boolean, Integer, Object, Array, Enum
  • Maximum 10 root-level fields
  • Maximum 3 nesting levels
You can also send the request body as YAML by setting Content-Type to application/x-yaml or text/yaml.
This endpoint does not support a transcribe parameter. It works only on files that already have a transcript available.

Example Usage

Response Example

The usage field is only included when include_usage=true in the request. file_info is included in the response metadata.

Billing

  • AI extraction consumes analysis_request units in blocks of 15,000 total tokens
  • Formula: ceil(total_tokens / 15000)
  • Examples:
    • 14,000 tokens -> 1 analysis_request unit
    • 17,000 tokens -> 2 analysis_request units
    • 31,000 tokens -> 3 analysis_request units
  • There is no speech-to-text billing on this endpoint
  • Failed requests are not charged
  • Set include_usage: true to receive a usage block with the per-charge breakdown (the analysis_request entry carries a nested tokens object)

Authorizations

X-API-Key
string
header
required

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

Body

file_id
string
required

ID of the uploaded file to extract data from

schema
object
required

Custom extraction schema defining the fields to extract. Max 10 root-level fields, max 3 nesting levels. Each field must have type and description.

Example:
what_to_extract
string

Optional guidance for what to extract from the transcript

Example:

"Extract action items and deadlines from this meeting"

include_usage
boolean
default:false

When true, includes token usage statistics in the response

Response

Data extracted successfully

status
enum<string>
Available options:
success
data
object

Extracted data matching the provided schema. The shape of this object mirrors the input schema fields.

video_info
object

Video metadata (title, channel, duration, views, etc.). Only present for /extract/video requests.

file_info
object

File metadata (name, size, type, duration, etc.). Only present for /extract/file requests.

usage
object

Per-call billing + LLM token usage. Only present when include_usage=true. For /extract/*, the block carries the credit-charge fields (charges, total_credits, credits_remaining_after, waived) AND the LLM token fields (prompt_tokens, completion_tokens, total_tokens) in a single object.