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": "every-n-seconds",
"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
| Param | Required | Notes |
|---|---|---|
sourceFileExtension | Yes | Source extension with or without the dot, such as mp4, pdf, docx, or zip. |
Fields
| Field | Required | Notes |
|---|---|---|
fileSizeBytes or fileSizeMb | Yes | Used for file-credit pricing and limits. |
durationSeconds or durationMinutes | Yes for audio and video | Those formats price on duration. |
pageCount, slideCount, sheetCount, documentUnitCount | Yes for documents | Send the metric that matches the source type: pageCount for PDF and Word, slideCount for PowerPoint, sheetCount for Excel. |
frameCount | Yes for frame-billed images | Applies to avif, avifs, gif, ico, png, tif, tiff, and webp, including single-frame files. |
workflow | No | extract by default; use transcribe for transcript-only estimates. |
mode | For transcript-only mode override | fast, quality, or meeting-intelligence. |
options | No | Same extraction option object accepted by POST /extract. |
Most formats price on the highest of two or more metrics — for example a PowerPoint deck costs the greater of 1 credit per 5 MB and 1 credit per 5 slides. The endpoint prices only from metrics you send, so it refuses to answer at all when one is missing rather than return the cheaper partial figure. Read the metric from the file before estimating; every value is available locally without uploading anything.
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.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | estimate.unsupported_format | The source extension is not supported. |
| 400 | estimate.invalid_file_size | fileSizeBytes or fileSizeMb is missing, zero, or negative. |
| 400 | estimate.duration_limit_exceeded | The duration exceeds the limit for your plan. |
| 422 | estimate.exact_metrics_required | A metric this format prices on was not supplied. |
estimate.exact_metrics_required names exactly what to send:
{
"error": "estimate.exact_metrics_required",
"format": "pptx",
"job": "extract.pptx",
"params": {
"format": "pptx",
"job": "extract.pptx",
"missingMetrics": ["documentUnits"],
"documentUnitKind": "slides",
"fields": ["slideCount", "documentUnitCount"]
}
}Send any field from params.fields and retry. A 647 KB, 9-slide deck costs 2 credits (ceil(9 / 5) beats ceil(0.647 / 5)), so quoting it on file size alone would show 1 credit and then charge 2. The endpoint returns this error instead of a number it cannot stand behind.