audio

Every audio format we produce, and exactly what its bytes are

Audio defaults to MPEG-2 Layer III (MP3), 24 kHz, mono, 128 kbps, with no Xing/LAME header and no ID3 tag — the body starts at the first audio frame. Set response_format for anything else: mp3, mp3_64, mp3_160, wav, wav24, wav32f, flac, flac24, pcm, pcm_f32, aiff, caf, au, mulaw, alaw. The exact numbers for a given response are echoed in the X-Ditto-Audio-* headers; decode and resample from those rather than assuming a rate. GET /v1/audio/format describes every encoding in full, without authentication.

This endpoint is the machine-readable version: every response_format with its media type, codec, bit depth, bitrate, cost multiplier and a one-line description; the spellings we accept as aliases; the formats we do NOT produce and what to use instead; the response headers that echo the encoding; and a symptom→cause→fix table for the playback mistakes these encodings invite.

get/v1/audio/format

Request

  • Base URL: https://api.ditto.audio (the document declares no server; this is the origin it was published from)
  • URL: https://api.ditto.audio/v1/audio/format
  • Auth: none declared

Response

objectstring
defaultstring
sampleRateHznumber
channelsnumber
aliasesobject

Other spellings we accept, mapped to the canonical id.

unsupportedobject

Formats we do not produce, each with what to use instead.

headersstring[]
notesstring[]

Example response

{
  "object": "audio.format",
  "default": "mp3",
  "sampleRateHz": 24000,
  "channels": 1,
  "costMultipliers": {
    "standard": 1,
    "hiFidelity": 1.2
  },
  "formats": [
    {
      "id": "mp3",
      "mimeType": "audio/mpeg",
      "extension": "mp3",
      "container": "mpeg",
      "codec": "mpeg2-layer3",
      "sampleRateHz": 24000,
      "channels": 1,
      "bitsPerSample": 16,
      "bitrateBps": 128000,
      "costMultiplier": 1,
      "mpegVersion": "2",
      "mpegLayer": 3
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.