audio

Generate sound effects from text

Changed on

Creates an asynchronous sound-effects generation task (elevenlabs-sfx-v3 or auto, 0.5 to 30 seconds). Charged per requested audio second (rounded up) or 5 seconds when duration_seconds is omitted. When the task succeeds, output contains {type: "sound_effects", model, loop, audio: {url, artifact_id, duration_seconds, mime_type, size_bytes}}.

post/v1/audio/sound-effects

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

SoundEffectsCreateRequest required

POST /v1/audio/sound-effects request body.

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.

prompt, string required

Text description of the sound effect or ambient audio to generate (1-450 characters).

model, 'auto' | 'elevenlabs-sfx-v3'

Sound-effects model identifier, or 'auto' for automatic selection.

duration_seconds, number nullable

Target duration in seconds (0.5-30.0). Omit to let the model choose duration automatically.

loop, boolean

When true, generate a seamlessly looping sound effect or ambient bed.

prompt_influence, number

How strictly generation follows the prompt (0.0-1.0, default 0.3).

format, 'mp3' | 'wav' | 'opus' | 'pcm'

Output audio container/encoding format.

model_options, object nullable

Optional model-family-specific options (for example, {"elevenlabs": {...}}). Unrecognized keys emit an option_ignored warning.

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