# Extract from M4B

Use this extractor for `.m4b` files. It can extract metadata, artwork, chapters, chapter audio, transcript into a ZIP result.

## Quick reference

| Field | Value |
| --- | --- |
| Source file type | `.m4b` |
| Source group | Audio |
| Submit endpoint | `POST https://api.tools.fast/extract` |
| Estimate endpoint | `POST https://api.tools.fast/extract/estimate/m4b` |
| Result | ZIP download |
| Default capabilities | `audio.metadata`, `audio.artwork`, `audio.chapters`, `audio.chapterAudio` |
| Max file size | free: 50 MB; pro: 2048 MB |
| Document limits | Not applicable |
| Duration limits | free: 60 minutes; pro: 300 minutes |

## Capabilities

| Capability | Default | Options | Pricing | Description |
| --- | --- | --- | --- | --- |
| `audio.metadata` | Yes | None | Included | File information, duration, dates, and embedded tags. |
| `audio.artwork` | Yes | None | Included | Cover art and attached pictures. |
| `audio.chapters` | Yes | None | Included | Chapter markers exported for review. |
| `audio.chapterAudio` | Yes | `audioFormat` | Included | Chapter audio files split from markers. |
| `media.transcript` | No | `transcription.mode` | `fast`: 2 credits per 1 minute; `quality`: 4 credits per 1 minute; `meeting-intelligence`: 6 credits per 1 minute | Create transcripts from speech. |


## Capability options

### Chapter audio

| Option | Type | Default | Allowed values | Limits |
| --- | --- | --- | --- | --- |
| `audioFormat` | `enum` | `mp3` | `mp3`, `wav`, `m4a`, `original`, `best` | None |

### Transcript

| Option | Type | Default | Allowed values | Limits |
| --- | --- | --- | --- | --- |
| `transcription.mode` | `enum` | `fast` | `fast`, `quality`, `meeting-intelligence` | None |

## Options payload with all capabilities

Use this shape when you want to explicitly configure every supported output for this source type.

```json
{
  "extraction": {
    "selectedCapabilities": [
      "audio.metadata",
      "audio.artwork",
      "audio.chapters",
      "audio.chapterAudio",
      "media.transcript"
    ],
    "includeManifest": true,
    "capabilityOptions": {
      "audio.chapterAudio": {
        "audioFormat": "mp3"
      },
      "media.transcript": {
        "transcription.mode": "quality"
      }
    }
  }
}
```

## Estimate example

```bash
curl -sS -X POST "https://api.tools.fast/extract/estimate/m4b" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "fileSizeMb": 25,
  "durationMinutes": 3,
  "options": {
    "extraction": {
      "selectedCapabilities": [
        "audio.metadata",
        "audio.artwork",
        "audio.chapters",
        "audio.chapterAudio",
        "media.transcript"
      ],
      "includeManifest": true,
      "capabilityOptions": {
        "audio.chapterAudio": {
          "audioFormat": "mp3"
        },
        "media.transcript": {
          "transcription.mode": "quality"
        }
      }
    }
  }
}'
```

## Extract example with all options configured

```bash
curl -sS -X POST "https://api.tools.fast/extract" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -F "file=@input.m4b" \
  -F 'options={
  "extraction": {
    "selectedCapabilities": [
      "audio.metadata",
      "audio.artwork",
      "audio.chapters",
      "audio.chapterAudio",
      "media.transcript"
    ],
    "includeManifest": true,
    "capabilityOptions": {
      "audio.chapterAudio": {
        "audioFormat": "mp3"
      },
      "media.transcript": {
        "transcription.mode": "quality"
      }
    }
  }
}'
```

## Machine-readable discovery

```http
GET /options/m4b
GET /extractors/m4b
```
