Zum Inhalt
HALOWERK

Medienwerk

audio trim

Takes an audio or video file (up to 24 MB) and returns the part between start_seconds and end_seconds as an audio file. The cut is sample-accurate because the excerpt is re-encoded rather than cut at the nearest frame. Optional fade-in and fade-out in seconds. If the end lies beyond the file, the excerpt ends with the file and this is reported. Output inline as base64, max 8 MB. Runs locally with ffmpeg; nothing leaves this machine. Fixed price per call.

POST https://medien.halowerk.com/v1/audio-trim

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
sourceobjectJaThe recording. Either url or content_base64.
start_secondsnumberJa
end_secondsnumberJa
fade_in_secondsnumberNein
fade_out_secondsnumberNein
output_formatstringNein
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "source",
    "start_seconds",
    "end_seconds"
  ],
  "additionalProperties": false,
  "properties": {
    "source": {
      "type": "object",
      "additionalProperties": false,
      "description": "The recording. Either url or content_base64.",
      "properties": {
        "url": {
          "type": "string",
          "maxLength": 2048,
          "description": "Public http(s) URL of the file."
        },
        "content_base64": {
          "type": "string",
          "maxLength": 12000000,
          "description": "The file inline, base64. Larger files by url."
        },
        "filename": {
          "type": "string",
          "maxLength": 260
        }
      }
    },
    "start_seconds": {
      "type": "number",
      "minimum": 0,
      "maximum": 7200
    },
    "end_seconds": {
      "type": "number",
      "minimum": 0.1,
      "maximum": 7200
    },
    "fade_in_seconds": {
      "type": "number",
      "minimum": 0,
      "maximum": 10,
      "default": 0
    },
    "fade_out_seconds": {
      "type": "number",
      "minimum": 0,
      "maximum": 10,
      "default": 0
    },
    "output_format": {
      "type": "string",
      "enum": [
        "opus",
        "mp3",
        "wav",
        "flac"
      ],
      "default": "mp3"
    }
  }
}

Originalschema öffnen

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →