Skip to main content
Browse Docs
On This Page
View Markdown~901 tokensDownload Markdown~901 tokens

Estimate endpoint

POST /estimate/{sourceFileExtension} estimates one file and one options payload without uploading the file.

Find valid options

Call GET /options/{format} before building an options payload. It returns the valid capability ids, default selections, and allowed option values for that source format.

GET /options/mp4
X-Fast-Api-Key: YOUR_API_KEY
{
  "format": "mp4",
  "job": "extract.mp4",
  "defaults": {
    "selectedCapabilities": ["video.audio", "video.frames", "video.metadata", "video.subtitles"],
    "includeManifest": true,
    "capabilityOptions": {
      "video.audio": {
        "audioFormat": "mp3"
      },
      "video.frames": {
        "frameMode": "evenly-spaced",
        "frameIntervalSeconds": 1,
        "maxExtractedFrames": 500
      }
    }
  },
  "capabilities": [
    {
      "id": "video.audio",
      "output": "audio",
      "defaultSelected": true,
      "options": [
        {
          "id": "audioFormat",
          "type": "enum",
          "defaultValue": "mp3",
          "allowedValues": ["mp3", "wav", "m4a", "original", "best"]
        }
      ]
    },
    {
      "id": "media.transcript",
      "output": "transcript",
      "defaultSelected": false,
      "options": [
        {
          "id": "transcription.mode",
          "type": "enum",
          "required": true,
          "defaultValue": "fast",
          "allowedValues": ["fast", "quality", "meeting-intelligence"]
        }
      ]
    }
  ]
}

Use capabilities[].id in options.extraction.selectedCapabilities. If a selected capability has options[], put each value under options.extraction.capabilityOptions[capability.id][option.id].

Request

POST /estimate/mp4
Content-Type: application/json
X-Fast-Api-Key: YOUR_API_KEY
{
  "fileSizeMb": 25,
  "durationMinutes": 3,
  "options": {
    "extraction": {
      "selectedCapabilities": ["video.audio", "video.metadata", "media.transcript"],
      "capabilityOptions": {
        "media.transcript": {
          "transcription.mode": "quality"
        }
      }
    }
  }
}

Path params

ParamRequiredNotes
sourceFileExtensionYesSource extension with or without the dot, such as mp4, pdf, docx, or zip.

Fields

FieldRequiredNotes
fileSizeBytes or fileSizeMbYesUsed for file-credit pricing and limits.
durationSeconds or durationMinutesRecommended for audio/videoHelps estimate duration-based media and transcript work.
pageCount, slideCount, sheetCount, documentUnitCountRecommended for documentsUse the metric that matches the source type when known.
frameCountRecommended for multi-frame imagesHelps estimate animated and multi-frame image work.
workflowNoextract by default; use transcribe for transcript-only estimates.
modeFor transcript-only mode overridefast, quality, or meeting-intelligence.
optionsNoSame extraction option object accepted by POST /extract.

Response

{
  "job": "extract.mp4",
  "category": "video",
  "quotedCredits": 16,
  "lineItems": [
    {
      "kind": "base",
      "credits": 1
    },
    {
      "kind": "capability",
      "capabilityId": "media.transcript",
      "credits": 15,
      "mode": "quality",
      "unit": "minute"
    }
  ]
}

Credit quote

quotedCredits is the quoted credit cost for the file and option payload. lineItems breaks that quote into base extraction and selected priced add-ons.

Copied