---
title: "Save a song from S3"
method: POST
path: "/api/os/s3/song"
tags: ["S3 integration"]
---

# Save a song from S3

`POST /api/os/s3/song`

Create a new song or update an existing one with data sent from AWS

## Request body

- object
  - `bucket` string, required
  - `key` string, required
  - `tags` object, required
    - `duration` number, required
    - `artist` string, required
    - `albumartist` string
    - `album` string, required
    - `cover` object
      - `data` string, required — The base64-encoded binary content of the album cover
      - `extension` string, required
    - `title` string, required
    - `track` number
    - `lyrics` string

## Response `200`

OK

- Song — A Song model
  - `id` string, required — An md5 string
  - `artist_id` integer, required
  - `album_id` integer, required
  - `title` string, required
  - `disc` integer, required
  - `track` number, required
  - `length` number, float, required — The duration of the song in seconds

---

[API](https://skmtc.net/koel/apis/koel-api.md) · [All operations](https://skmtc.net/koel/apis/koel-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/koel/koel-api/revisions/b8837d22df45/schema)
