---
title: "Upload audio file"
method: POST
path: "/audios"
tags: ["Audios"]
---

# Upload audio file

`POST /audios`

Upload an audio file to a temporary storage before creating an animation.
The audio is uploaded using multipart/form-data. the filename directive is optional and if provided should contain up to 50 valid characters long.
The resulting file is stored as a .wav file in a 16kHz sample rate.
Valid characters: a-z A-Z 0-9 . _ -
Supported mime types: "audio/, video/"
Storage duration: 24-48H

## Response `201`

The audio has been uploaded successfully

- UploadAudioResponseDto
  - `url` string, required — The temporary URL of the audio. This URL should be provided when creating an animation via the /animations endpoint.
  - `id` string — A unique identifier for the audio. This identifier should be used when deleting the audio via the /audio/{id} endpoint.
  - `duration` number, double — The duration of the audio in seconds
  - `moderation_metadata` RecordStringAny — Construct a type with a set of properties K of type T
  - `wordLevelTimestampsUrl` string — The URL of the word level timestamps file.

## Other responses

- `400` — BadRequestError | InvalidFileSizeError | InvalidAudioDurationError
- `401` — AuthorizationError
- `402` — InsufficientCreditsError
- `415` — UnsupportedMimeTypeError
- `451` — AudioModerationError

---

[API](https://skmtc.net/d-id/apis/realtime-endpoints.md) · [All operations](https://skmtc.net/d-id/apis/realtime-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/d-id/realtime-endpoints/revisions/2f2425e1b6b6/schema)
