audio

Creates an asynchronous deterministic audio editing task (beatra-audio-v1 or auto, up to 15 minutes and 100 MiB) for trim, loop, fade, normalize_loudness, or convert_format, with optional fade, loudness, and format finishing in the same call. Charged per task (up to 50 calls per account per UTC day). When the task succeeds, output contains {operation, outputs: [{role: "processed", artifact_id, url, mime_type, duration_ms, size_bytes}]}.

post/v1/audio/process

Request

  • Base URL
    https://api.beatra.ai (the document declares no server; this is the origin it was published from)
  • Auth
    none declared. Required headers: Idempotency-Key

Headers

x-request-id, string nullable
Idempotency-Key, string required
authorization, string nullable

Request body

AudioProcessCreateRequest required

POST /v1/audio/process request body for local audio operations.

metadata, object nullable

Caller-supplied metadata; ≤16 keys, key ≤64 chars, value ≤512 chars

callback_url, string nullable

HTTPS URL beatra will POST the final Task envelope to when the Task reaches a terminal state

callback_signing_key_id, string nullable

Optional standalone callback signing key. Omit for unsigned callback delivery; requires callback_url when provided.

operation, 'trim' | 'loop' | 'fade' | 'normalize_loudness' | 'convert_format' required

Local audio processing operation (trim, loop, fade, normalize_loudness, convert_format).

source, union required

Source audio (artifact_id or HTTPS url). Accepts source or audio.

model, 'auto' | 'beatra-audio-v1'

Audio processing model identifier, or 'auto' for automatic selection.

start_ms, integer nullable

Trim start in milliseconds.

end_ms, integer nullable

Trim end in milliseconds.

target_duration_ms, integer nullable

Target output duration in milliseconds (trim or loop).

loop_count, integer nullable

Exact loop repeat count (loop; 2-100, mutually exclusive with target_duration_ms).

loop_start_ms, integer nullable

Loop region start in ms.

loop_end_ms, integer nullable

Loop region end in ms.

crossfade_ms, integer nullable

Seamless loop boundary crossfade in milliseconds (50-3000).

end_with_fade, boolean nullable

Apply fade-out at the end of a looped clip.

fade_in_ms, integer nullable

Fade-in duration in ms (0-30000).

fade_out_ms, integer nullable

Fade-out duration in ms (0-30000).

fade_curve, 'tri' | 'exp' | 'log' | 'qsin' nullable

Fade curve (tri, exp, log, qsin).

loudness_lufs, number nullable

Target integrated loudness in LUFS (-30 to -9).

true_peak_db, number nullable

Target true-peak ceiling in dBTP (-9 to 0).

format, 'wav' | 'flac' | 'mp3' | 'ogg' | 'm4a' | 'ulaw_8k_wav' nullable

Output audio format (required for convert_format).

sample_rate, 8000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 nullable

Output sample rate in Hz.

bitrate_kbps, 64 | 128 | 192 | 256 | 320 nullable

Lossy bitrate in kbps.

channels, 1 | 2 nullable

Output channel count (1 or 2).

Response

Task accepted

TaskEnvelope required

Standard Task envelope.

Returned by every async-creation endpoint, GET /v1/tasks/{id}, and the body of customer callback POSTs.

object, 'task'
task_id, string required
status, 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled' required
capability, string required
workload_type, 'model' | 'social_operation'
model, string nullable

Caller-requested model verbatim (may be 'auto'). Null for social_operation tasks.

resolved_model, string nullable

Actual model that ran (null until execution starts; equals model for explicit-model calls)

model_selection_reason, unknown
social, SocialTaskIdentity nullable
metadata, object nullable
input, object nullable
progress, AppApiV1SchemasCommonTaskProgress nullable
output, object nullable
warnings, TaskWarning[]
error, AppApiV1SchemasCommonTaskError nullable
usage, UsageObject nullable
billing, TaskBilling nullable
callback, TaskCallback nullable
created_at, string date-time required
started_at, string date-time nullable
deadline_at, string date-time nullable
completed_at, string date-time nullable
cancel_requested_at, string date-time nullable
links, TaskLinks required

Changes