# Upload Audio

> Learn how to upload brand audio to your workspace

- **URL**: https://orshot.com/docs/api-reference/brand-audio-post

---

## Overview

This endpoint allows you to upload brand audio to your workspace. You can upload audio from a URL, as a base64-encoded string, or as a binary upload.```markdown tab="Endpoint"
https://api.orshot.com/v1/brand-assets/audio/add
```## Request```js
await fetch("https://api.orshot.com/v1/brand-assets/audio/add", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <ORSHOT_API_KEY>",
  },
  body: JSON.stringify({
    file: "https://example.com/audio/background-music.mp3",
    name: "background-music.mp3", // optional
    tags: ["intro", "music"], // optional
    metadata: { // optional
      duration: 169.5,
      description: "Background music track"
    }
  }),
});
```</Tab>```js
const formData = new FormData();
formData.append("file", audioFile); // File object
formData.append("name", "background-music.mp3"); // optional

await fetch("https://api.orshot.com/v1/brand-assets/audio/add", {
method: "POST",
headers: {
Authorization: "Bearer <ORSHOT_API_KEY>",
},
body: formData,
});

```</Tab>```json
{
  "data": {
    "audio": {
      "id": 42,
      "created_at": "2025-09-11T10:15:30.123Z",
      "name": "background-music.mp3",
      "original_filename": "background-music.mp3",
      "file_size": 2621440,
      "direct_url": "https://storage.orshot.com/cloud/w-50/renders/audio/background-music.mp3",
      "duration": 169.5,
      "format": "mp3",
      "mime_type": "audio/mpeg",
      "waveform_url": null,
      "metadata": {
        "duration": 169.5,
        "description": "Background music track"
      },
      "tags": ["intro", "music"],
      "workspace_id": 50,
      "user_id": "abcdef01-2345-6789-abcd-ef0123456789"
    },
    "url": "https://storage.orshot.com/cloud/w-50/renders/audio/background-music.mp3"
  }
}
```</Tab>
</Tabs>

## Request Parameters

| Parameter  | Type     | Required | Description                                                                     |
| ---------- | -------- | -------- | ------------------------------------------------------------------------------- |
| `file`     | String   | Yes      | URL, base64-encoded string, or binary upload of the audio file                  |
| `name`     | String   | No       | Custom name for the audio (defaults to original filename or auto-generated)     |
| `tags`     | String[] | No       | Array of tags to associate with the audio (e.g., `["intro", "music"]`)          |
| `metadata` | Object   | No       | Custom metadata to attach to the audio (can include `duration`)                 |

## Supported Audio Formats

- MP3 (`audio/mpeg`)
- WAV (`audio/wav`)
- M4A (`audio/mp4`)
- AAC (`audio/aac`)
- OGG (`audio/ogg`)
- Opus (`audio/opus`)
- FLAC (`audio/flac`)
- WebM (`audio/webm`)
- AIFF (`audio/aiff`)
- WMA (`audio/x-ms-wma`)

## Notes

- Maximum file size: 50MB
- For **base64** uploads, include the file extension in the `name` (e.g., `track.wav`) so the format is detected correctly — otherwise it defaults to `mp3`.
- Audio is stored as-is; it is re-encoded to AAC automatically when a template is rendered to video.

## Rate Limits

- 30 requests per minute per endpoint