Interface: MusicGenerateRequest
Defined in: packages/agentos/src/core/audio/types.ts:80
Request payload for music generation from a text prompt.
Passed to IAudioGenerator.generateMusic by the high-level orchestration layer after normalising user input.
Example
const request: MusicGenerateRequest = {
prompt: 'Upbeat lo-fi hip hop beat with vinyl crackle and mellow piano',
durationSec: 60,
outputFormat: 'mp3',
};
Properties
durationSec?
optionaldurationSec:number
Defined in: packages/agentos/src/core/audio/types.ts:102
Desired output duration in seconds.
Provider limits vary: Suno caps at ~240s, Stable Audio at ~47s. Exceeding the limit may result in truncation or an error.
modelId?
optionalmodelId:string
Defined in: packages/agentos/src/core/audio/types.ts:94
Model identifier to use for generation.
When omitted the provider falls back to its IAudioGenerator.defaultModelId.
n?
optionaln:number
Defined in: packages/agentos/src/core/audio/types.ts:131
Number of audio clips to generate.
Default
1
negativePrompt?
optionalnegativePrompt:string
Defined in: packages/agentos/src/core/audio/types.ts:110
Negative prompt describing musical elements to avoid.
Not all providers support negative prompts — unsupported values are silently ignored by the adapter.
outputFormat?
optionaloutputFormat:AudioOutputFormat
Defined in: packages/agentos/src/core/audio/types.ts:117
Output audio format.
Default
'mp3'
prompt
prompt:
string
Defined in: packages/agentos/src/core/audio/types.ts:87
Text prompt describing the desired musical composition.
Quality and specificity of the prompt directly influence output quality. Include genre, mood, instrumentation, and tempo for best results.
providerOptions?
optionalproviderOptions:Record<string,unknown>
Defined in: packages/agentos/src/core/audio/types.ts:137
Arbitrary provider-specific options.
seed?
optionalseed:number
Defined in: packages/agentos/src/core/audio/types.ts:124
Seed for reproducible output.
Not all providers honour seeds — check provider documentation.
userId?
optionaluserId:string
Defined in: packages/agentos/src/core/audio/types.ts:134
Identifier of the requesting user (for billing / rate limiting).