Skip to content

Commit 14a4d08

Browse files
authored
Merge pull request #26 from MiniMax-AI/dev/addurl
music generation support url mode
2 parents b6558ee + 174e8da commit 14a4d08

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

minimax_mcp/server.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,6 @@ def music_generation(
600600
sample_rate: int = DEFAULT_SAMPLE_RATE,
601601
bitrate: int = DEFAULT_BITRATE,
602602
format: str = DEFAULT_FORMAT,
603-
channel: int = DEFAULT_CHANNEL,
604603
output_directory: str = None
605604
) -> TextContent:
606605
try:
@@ -618,10 +617,11 @@ def music_generation(
618617
"audio_setting": {
619618
"sample_rate": sample_rate,
620619
"bitrate": bitrate,
621-
"format": format,
622-
"channel": channel
623-
}
620+
"format": format
621+
},
624622
}
623+
if resource_mode == RESOURCE_MODE_URL:
624+
payload["output_format"] = "url"
625625

626626
# Call music generation API
627627
response_data = api_client.post("/v1/music_generation", json=payload)
@@ -633,7 +633,7 @@ def music_generation(
633633
if resource_mode == RESOURCE_MODE_URL:
634634
return TextContent(
635635
type="text",
636-
text=f"Success. Music audio: {audio_hex}"
636+
text=f"Success. Music url: {audio_hex}"
637637
)
638638

639639
output_path = build_output_path(output_directory, base_path)

0 commit comments

Comments
 (0)