Sources

Audio

View Markdown

Introduction

Audio files are commonly used in <audio> tags on the web, and as inputs for media players.


Required props

As with all Tasks, you must provide:

  • either a file_id or a url to use as the input file
  • the kind of task to create
const options = {
  url: 'https://example.com/audio.mp3',
  kind: 'audio',
}
// Pass options to an SDK or API request, e.g.:
const task = await ittybit.tasks.create(options)

File ID

The file_id should be the unique ID of a file in your project’s Files collection.

e.g. "file_id": "file_abcdefgh1234"

URL

The url should be the URL of the audio file to process.

This should be a publicly accessible or signed URL.

e.g. "url": "https://example.com/audio.mp3"

Kind

For audio tasks, this is always audio.

e.g. "kind": "audio"


Shared options

All tasks support the following (optional) props:

  • filename
  • folder
  • ref
const options = {
  url: 'https://example.com/audio.mp3',
  kind: 'audio',
  folder: 'uploads/user123',
  filename: 'episode-01.mp3',
}

Supported inputs & task outputs

Formats

Uploaded or ingested files can be:

PropertyValues
Audio Stream Codecaac, opus, mp3, flac, vorbis
Media Containermp3, m4a, wav, ogg

Tasks can output:

PropertyValues
Audio Stream Codecaac, opus, mp3
Media Containermp3, ogg, wav

If you require flac or any other audio codec, please contact us for early access.

Duration

Uploaded or ingested files can be:

  • up to 4 hours in duration

Tasks have the same default limits. 1

Filesize

Uploaded or ingested files can be:

  • up to 4TB in size

Tasks have the same default limits. 1


Example: Media object with audio

A representative Media object (trimmed to audio-relevant fields):

{
  "id": "med_598j8Q37dsM3zzRe",
  "object": "media",
  "kind": "audio",
  "title": null,
  "duration": 62.224,
  "files": [
    {
      "id": "file_598j8I0639G3VtMy",
      "object": "source",
      "kind": "audio",
      "type": "audio/mpeg",
      "duration": 62.224,
      "filesize": 2488947,
      "bitrate": 320000,
      "ref": null,
      "folder": null,
      "filename": "Dorian_Concept_1.mp3",
      "url": "https://jamal-tests.ittybit.net/Dorian_Concept_1.mp3",
      "metadata": {},
      "original": true,
      "created_by": null,
      "created": "2025-10-09T19:08:52.381Z",
      "updated": "2025-10-09T19:08:52.381Z"
    }
  ],
  "urls": {
    "original": "https://jamal-tests.ittybit.net/Dorian_Concept_1.mp3"
  },
  "metadata": {},
  "created": "2025-10-09T19:08:52.380Z",
  "updated": "2025-10-09T19:08:52.380Z"
}

Usage in HTML

<audio controls src="https://you.ittybit.net/podcast-001.mp3" type="audio/mpeg"></audio>

Task status & webhooks

Tasks are processed asynchronously. You can poll the task by id until it completes, or use Webhooks to receive notifications. See Tasks for status values and examples.

On this page