Class MusicCompositionRequest
Inherited Members
Namespace: Glitch9.AIDevKit.ElevenLabs
Assembly: Glitch9.AIDevKit.Provider.ElevenLabs.dll
Syntax
public class MusicCompositionRequest : ElevenLabsAudioRequest
Properties
| Edit this page View SourceCompositionPlan
Optional. A detailed composition plan to guide music generation. Cannot be used in conjunction with prompt.
Declaration
[JsonProperty("composition_plan")]
public CompositionPlan CompositionPlan { get; set; }
Property Value
| Type | Description |
|---|---|
| CompositionPlan |
ForceInstrumental
Optional. If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the prompt. Can only be used with prompt. Defaults to false.
Declaration
[JsonProperty("force_instrumental")]
public bool? ForceInstrumental { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
ModelId
Optional. The model to use for the generation. Defaults to music_v1. Allowed values: music_v1
Declaration
[JsonProperty("model_id")]
public string ModelId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MusicLengthMs
Optional. The length of the song to generate in milliseconds. Used only in conjunction with prompt. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
Declaration
[JsonProperty("music_length_ms")]
public int? MusicLengthMs { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
Prompt
Optional. A simple text prompt to generate a song from. Cannot be used in conjunction with composition_plan.
Declaration
[JsonProperty("prompt")]
public string Prompt { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RespectSectionsDurations
Optional. Controls how strictly section durations in the composition_plan are enforced. Only used with composition_plan. When set to true, the model will precisely respect each section???duration_ms from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. Defaults to true.
Declaration
[JsonProperty("respect_sections_durations")]
public bool? RespectSectionsDurations { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
StoreForInpainting
Optional. Whether to store the generated song for inpainting. Only available to enterprise clients with access to the inpainting API. Defaults to false.
Declaration
[JsonProperty("store_for_inpainting")]
public bool? StoreForInpainting { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |