typetext
{
"call_back_url": "1",
"custom_mode": true,
"instrumental": true,
"model": "1",
"prompt": "1",
"style": "1",
"title": "1"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_dyx**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run zj7730/test-music using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zj7730/test-music:791744a7436ae8ec4a11dea94188461cfda961e06e495875c66970d9a923460a",
{
input: {
call_back_url: "1",
custom_mode: true,
instrumental: true,
model: "1",
prompt: "1",
style: "1",
title: "1"
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_dyx**********************************
This is your API token. Keep it to yourself.
import replicate
Run zj7730/test-music using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zj7730/test-music:791744a7436ae8ec4a11dea94188461cfda961e06e495875c66970d9a923460a",
input={
"call_back_url": "1",
"custom_mode": True,
"instrumental": True,
"model": "1",
"prompt": "1",
"style": "1",
"title": "1"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_dyx**********************************
This is your API token. Keep it to yourself.
Run zj7730/test-music using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "zj7730/test-music:791744a7436ae8ec4a11dea94188461cfda961e06e495875c66970d9a923460a",
"input": {
"call_back_url": "1",
"custom_mode": true,
"instrumental": true,
"model": "1",
"prompt": "1",
"style": "1",
"title": "1"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
hello 1 and scale 1
{
"id": "1nh2c8mfc1rg80cm97n932j70g",
"model": "zj7730/test-music",
"version": "791744a7436ae8ec4a11dea94188461cfda961e06e495875c66970d9a923460a",
"input": {
"call_back_url": "1",
"custom_mode": true,
"instrumental": true,
"model": "1",
"prompt": "1",
"style": "1",
"title": "1"
},
"logs": "",
"output": "hello 1 and scale 1",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-01-09T07:14:56.48Z",
"started_at": "2025-01-09T07:15:53.23106Z",
"completed_at": "2025-01-09T07:15:53.232655Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/1nh2c8mfc1rg80cm97n932j70g/cancel",
"get": "https://api.replicate.com/v1/predictions/1nh2c8mfc1rg80cm97n932j70g",
"web": "https://replicate.com/p/1nh2c8mfc1rg80cm97n932j70g"
},
"metrics": {
"predict_time": 0.001595815,
"total_time": 56.752655
}
}