Text prompt describing the desired sound effect.
Optional providerExplicit provider identifier (e.g. "elevenlabs-sfx", "stable-audio",
"audiogen-local"). When omitted, auto-detection from environment
variables is used.
Optional modelModel identifier within the provider. When omitted, the provider's default model is used.
Optional durationDesired output duration in seconds. SFX clips are typically 1-15s.
Optional outputOutput audio format (e.g. "mp3", "wav"). Defaults to provider default.
Optional seedRandom seed for reproducible generation (provider-dependent).
Optional timeoutMaximum time in milliseconds to wait for generation to complete. Provider-dependent — polling providers enforce this directly.
Optional nNumber of audio clips to generate. Defaults to 1.
Optional onOptional progress callback invoked during long-running generation. Called with an AudioProgressEvent at each status transition.
Optional apiOverride the provider API key instead of reading from env vars.
Optional userOptional user identifier forwarded to the provider for billing.
Optional providerArbitrary provider-specific options.
Optional providerProvider preferences for reordering or filtering the fallback chain.
When supplied, the available providers are reordered according to
preferred and filtered by blocked before building the chain.
Optional usageOptional durable usage ledger configuration for accounting.
Options for a generateSFX call.
At minimum, a
promptis required. The provider is resolved fromopts.provider,opts.apiKey, or the first SFX-capable env var found (ELEVENLABS_API_KEY->STABILITY_API_KEY->REPLICATE_API_TOKEN->FAL_API_KEY-> local AudioGen).