1980s synth-pop, analog synth bass, gated drums, male lead with reverb-heavy vocals, neon retro energy, 112 BPM
suno-v4/api/v1/suno/text_to_music
运行信息
模型
suno-v4
提供方
Suno
服务
Suno
Endpoint
Text To Music
1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成音乐:"1980s synth-pop, analog synth bass, gated drums, male lead with reverb-heavy vocals, neon retro energy, 112 BPM"
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成音乐:"1980s synth-pop, analog synth bass, gated drums, male lead with reverb-heavy vocals, neon retro energy, 112 BPM"
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成音乐:"1980s synth-pop, analog synth bass, gated drums, male lead with reverb-heavy vocals, neon retro energy, 112 BPM"
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成音乐:"1980s synth-pop, analog synth bass, gated drums, male lead with reverb-heavy vocals, neon retro energy, 112 BPM"
curl -X POST https://runapi.ai/api/v1/suno/text_to_music \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "suno-v4",
"prompt": "1980s synth-pop, analog synth bass, gated drums, male lead with reverb-heavy vocals, neon retro energy, 112 BPM"
}
JSON
import { SunoClient } from "@runapi.ai/suno";
const client = new SunoClient({
apiKey: process.env.RUNAPI_API_KEY,
});
const result = await client.textToMusic.run({
"model": "suno-v4",
"prompt": "1980s synth-pop, analog synth bass, gated drums, male lead with reverb-heavy vocals, neon retro energy, 112 BPM"
});
console.log(result.id);
require "runapi/suno"
client = RunApi::Suno::Client.new
result = client.text_to_music.run(
model: "suno-v4",
prompt: "1980s synth-pop, analog synth bass, gated drums, male lead with reverb-heavy vocals, neon retro energy, 112 BPM"
)
puts result.id
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"model\":\"suno-v4\",\"prompt\":\"1980s synth-pop, analog synth bass, gated drums, male lead with reverb-heavy vocals, neon retro energy, 112 BPM\"}")
req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, "https://runapi.ai/api/v1/suno/text_to_music", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("RUNAPI_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
fmt.Println(resp.Status)
}