This function uses the Hugging Face API to generate music from text.
Parameters
| Name | Description | Location | Type | Sample Value |
|---|---|---|---|---|
| prompt | Prompt you want to turn into music | Body | String | A happy lofi beat |
This function also accepts body of a document from Appwrite Databases with the text field.
Response
Sample 200 Response:
{
"ok": true,
"fileId": "61f1b1e3f4b7d"
}| Setting | Value |
|---|---|
| Runtime | Node (18.0) |
| Entrypoint | src/main.js |
| Build Commands | npm install && npm run setup |
| Permissions | any |
| Timeout (Seconds) | 15 |
The ID of the storage bucket where the music files will be stored.
| Question | Answer |
|---|---|
| Required | No |
| Sample Value | generated_music |
Secret for sending requests to the Hugging Face API.
| Question | Answer |
|---|---|
| Required | Yes |
| Sample Value | hf_x2a... |
| Documentation | Hugging Face: API tokens |