

The audio library searches external provider catalogs, normalizes license metadata, and copies selected audio into your workspace media library. Imported audio can then be reused like any other workspace audio asset.

Current providers:

* `openverse`
* `freesound` (`FREESOUND_API_KEY` required server-side)
* `wikimedia`
* `remotion` (32 bundled sound effects from `@remotion/sfx`)

The API default is `cc0`. Use `license=no_attribution` to include CC0, public-domain, and Remotion SFX results.

Use `license=attribution` only when your workflow can preserve attribution text.

## Search Audio [#search-audio]

```bash title="Terminal"
curl "https://blitzreels.com/api/v1/audio-library/search?query=lofi%20beat&provider=all&license=cc0&audio_type=music&limit=10" \
  -H "Authorization: Bearer $BLITZREELS_API_KEY"
```

```json title="Response"
{
  "items": [
    {
      "provider": "openverse",
      "external_id": "provider-audio-id",
      "title": "Lo-fi beat",
      "creator_name": "Creator",
      "source_url": "https://provider.example/audio",
      "preview_url": "https://provider.example/audio.mp3",
      "duration_seconds": 24.5,
      "license_code": "cc0",
      "requires_attribution": false,
      "attribution_text": null
    }
  ],
  "warnings": [],
  "providers": ["openverse", "freesound", "wikimedia", "remotion"]
}
```

## Import Audio [#import-audio]

Import copies the provider audio into BlitzReels storage and creates a completed `audio` media asset.

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/audio-library/import \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openverse",
    "external_id": "provider-audio-id",
    "audio_type": "music"
  }'
```

## Import and Insert [#import-and-insert]

Pass `project_id` to import and place the audio on the project timeline in one request.

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/audio-library/import \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openverse",
    "external_id": "provider-audio-id",
    "project_id": "project-uuid",
    "start_seconds": 0,
    "duration_seconds": 30,
    "volume": 0.45,
    "fade_in_seconds": 0.5,
    "fade_out_seconds": 1,
    "loop": true,
    "audio_type": "music"
  }'
```

```json title="Response"
{
  "asset": {
    "id": "asset-uuid",
    "name": "Lo-fi beat",
    "asset_type": "audio",
    "audio_type": "music",
    "duration_seconds": 24.5,
    "source_url": "https://provider.example/audio",
    "license_code": "cc0",
    "license_url": "https://creativecommons.org/publicdomain/zero/1.0/",
    "attribution_text": null
  },
  "imported": true,
  "deduped": false,
  "timeline_item_id": "timeline-item-uuid",
  "txid": 123
}
```

## CLI [#cli]

```bash title="Terminal"
blitzreels audio search --query "ambient riser" --license cc0 --json
blitzreels audio import --provider openverse --external-id AUDIO_ID --project-id PROJECT_ID --at 0 --duration 12 --volume 0.5
blitzreels audio search --query "sound effect" --provider remotion --license no_attribution --json
blitzreels audio import --provider remotion --external-id mouseClick --project-id PROJECT_ID --audio-type sound_effect
```

## Related [#related]

* [Media Library](/docs/media-library)
* [Timeline Editing API](/docs/timeline)
