Music generation
Parameters
-
prompt
- Type: string
- Required: true
-
model
- Type: string
- Required: false
- Options: small, medium, melody, large
- Default: small
-
duration
- Type: number
- Required: false
- Default: 8
-
stream
- Type: boolean
- Required: false
Examples
Music generation example
import axios from "axios";
(async () => {
let response = await axios({
method: "post",
url: 'https://api.turing.sh/audio/music',
headers: {
"Content-Type": "application/json",
Authorization: "Bearer YOUR_API_KEY",
"x-captcha-token": "Captcha key"
},
data: {
"prompt": "string",
"model": "small",
"duration": 8
},
})
})();