# Getting started

Extract.FAST public API jobs are single-file jobs. Submit one source file, wait for completion, and download one ZIP.

## 1. Get an API key

[Create an account](/?account=apiKeys&account_source=api-docs), then go to **API Keys** and create a key. Pass it in the `X-Fast-Api-Key` header with every protected request. Extraction jobs require Pro access and account credits, so add credits or subscribe before running API job work. The CLI wrappers read the `TOOLS_FAST_API_KEY` environment variable. The inline examples below use a local `API_KEY` shell variable for brevity.

```bash
API_KEY="fast_prod_your_key_here"
```

## 2. Check credits

```bash
curl https://api.tools.fast/extract/entitlements/me \
  -H "X-Fast-Api-Key: $API_KEY"
```

## 3. Estimate the job

```bash
curl https://api.tools.fast/extract/estimate/mp4 \
  -H "X-Fast-Api-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileSizeMb": 25,
    "durationMinutes": 3,
    "options": {
      "extraction": {
        "selectedCapabilities": ["video.audio", "video.metadata"]
      }
    }
  }'
```

The estimate response includes `quotedCredits` and optional `lineItems` showing the base extraction and selected priced add-ons.

## 4. Submit one file

```bash
curl https://api.tools.fast/extract \
  -H "X-Fast-Api-Key: $API_KEY" \
  -F "file=@meeting.mp4" \
  -F 'options={
    "extraction": {
      "selectedCapabilities": ["video.audio", "video.metadata"]
    }
  }'
```

The response is `202 Accepted` with a job id and status URL.

## 5. Poll status

```bash
curl https://api.tools.fast/extract/job/$JOB_ID \
  -H "X-Fast-Api-Key: $API_KEY"
```

Poll until `status` is `succeeded`, `failed`, or `cancelled`.

## 6. Download

```bash
curl -L https://api.tools.fast/extract/job/$JOB_ID/download \
  -H "X-Fast-Api-Key: $API_KEY" \
  -o extracted.zip
```

## Client responsibilities

- Submit one file per job.
- Store the returned job id.
- Poll with backoff.
- Treat `403 api_key.pro_required` as a Pro access requirement.
- Treat 402 as a credit or plan-limit problem.
