# 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.

```http
GET /options/mp4
X-Fast-Api-Key: YOUR_API_KEY
```

```json
{
  "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

```http
POST /estimate/mp4
Content-Type: application/json
X-Fast-Api-Key: YOUR_API_KEY
```

```json
{
  "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` | Recommended for audio/video | Helps estimate duration-based media and transcript work. |
| `pageCount`, `slideCount`, `sheetCount`, `documentUnitCount` | Recommended for documents | Use the metric that matches the source type when known. |
| `frameCount` | Recommended for multi-frame images | Helps estimate animated and multi-frame image work. |
| `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`. |

## Response

```json
{
  "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.
