

BlitzReels timeline endpoints edit existing project items and insert existing media library assets. All public API timing fields use seconds.

## Layers [#layers]

Lower layer indexes render above higher layer indexes.

* Layer 0: captions
* Layer 1: effects and editable overlays
* Layer 2: B-roll images
* Layer 3: main video
* Layer 4: audio tracks
* Layer 5: backgrounds

## Find Items at a Time [#find-items-at-a-time]

```bash title="Terminal"
curl "https://blitzreels.com/api/v1/projects/{project_id}/timeline/at?time_seconds=12.5" \
  -H "Authorization: Bearer $BLITZREELS_API_KEY"
```

## Unified Edit Endpoint [#unified-edit-endpoint]

Use this endpoint for trim, split, delete, move, transform, and batch variants.

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/edits \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "trim",
    "timeline_item_id": "timeline-item-uuid",
    "trim_start_delta_seconds": 0.5,
    "trim_end_delta_seconds": 0.25,
    "snap_to_frame": true
  }'
```

## Trim [#trim]

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/trim \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "timeline_item_id": "timeline-item-uuid",
    "trim_start_delta_seconds": 1,
    "trim_end_delta_seconds": 0.5,
    "snap_to_frame": true
  }'
```

## Split [#split]

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/split \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "timeline_item_id": "timeline-item-uuid",
    "split_at_seconds": 8.2,
    "snap_to_frame": true
  }'
```

## Move and Transform [#move-and-transform]

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/move \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "timeline_item_id": "timeline-item-uuid",
    "new_start_seconds": 14,
    "new_layer_index": 2
  }'
```

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/transform \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "timeline_item_id": "timeline-item-uuid",
    "position_x": 120,
    "position_y": -40,
    "width_px": 720,
    "keep_aspect_ratio": true
  }'
```

## Batch Operations [#batch-operations]

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/batch-trim \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      { "timeline_item_id": "id-1", "trim_start_delta_seconds": 0.4 },
      { "timeline_item_id": "id-2", "trim_end_delta_seconds": 0.8 }
    ],
    "snap_to_frame": true
  }'
```

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/batch-move \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      { "timeline_item_id": "id-1", "new_start_seconds": 3 },
      { "timeline_item_id": "id-2", "new_start_seconds": 8, "new_layer_index": 2 }
    ]
  }'
```

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/batch-transform \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      { "timeline_item_id": "id-1", "position_x": 0, "position_y": -120 },
      { "timeline_item_id": "id-2", "width_px": 640 }
    ]
  }'
```

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/batch-delete \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "timeline_item_ids": ["id-1", "id-2"],
    "auto_pack": false
  }'
```

## Delete [#delete]

```bash title="Terminal"
curl -X DELETE https://blitzreels.com/api/v1/projects/{project_id}/timeline/items/{timeline_item_id} \
  -H "Authorization: Bearer $BLITZREELS_API_KEY"
```

## Insert Media [#insert-media]

Use these routes only with existing media library assets. Images and videos go through `/timeline/media` or `/broll`. Audio has a dedicated route.

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/media \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "asset_id": "asset-uuid",
        "start_seconds": 5,
        "duration_seconds": 3,
        "position_preset": "fullscreen",
        "animation_preset": "fadeIn"
      }
    ],
    "allow_duplicate": true
  }'
```

```bash title="Terminal"
curl -X POST https://blitzreels.com/api/v1/projects/{project_id}/timeline/audio \
  -H "Authorization: Bearer $BLITZREELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "asset_id": "audio-asset-uuid",
        "start_seconds": 0,
        "duration_seconds": 18,
        "volume": 0.35,
        "fade_in_seconds": 0.5,
        "fade_out_seconds": 1,
        "loop": true
      }
    ]
  }'
```

## Related [#related]

* [Captions API](/docs/captions)
* [Overlays API](/docs/overlays)
* [Media Library](/docs/media-library)
* [Jobs and Exports](/docs/jobs-exports)
