typefile
{
"audio": "https://replicate.delivery/pbxt/JNFJg9bnf1DyV6TkjH645OoAd7VhevU9hdSj391R4j1rhbYb/in.mp3",
"click_track": true,
"combine_click_track": true
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Zjn**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run e7mac/beatnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"e7mac/beatnet:d579bc739439ed9805595139fd45d38e7db9f455c58dae9a230b9d31564201c6",
{
input: {
audio: "https://replicate.delivery/pbxt/JNFJg9bnf1DyV6TkjH645OoAd7VhevU9hdSj391R4j1rhbYb/in.mp3",
click_track: true,
combine_click_track: true
}
}
);
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_Zjn**********************************
This is your API token. Keep it to yourself.
import replicate
Run e7mac/beatnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"e7mac/beatnet:d579bc739439ed9805595139fd45d38e7db9f455c58dae9a230b9d31564201c6",
input={
"audio": "https://replicate.delivery/pbxt/JNFJg9bnf1DyV6TkjH645OoAd7VhevU9hdSj391R4j1rhbYb/in.mp3",
"click_track": True,
"combine_click_track": True
}
)
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_Zjn**********************************
This is your API token. Keep it to yourself.
Run e7mac/beatnet 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": "e7mac/beatnet:d579bc739439ed9805595139fd45d38e7db9f455c58dae9a230b9d31564201c6",
"input": {
"audio": "https://replicate.delivery/pbxt/JNFJg9bnf1DyV6TkjH645OoAd7VhevU9hdSj391R4j1rhbYb/in.mp3",
"click_track": true,
"combine_click_track": true
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 3 properties
{
"id": "5n5wxczbozldsric3qy7wxjxiy",
"model": "e7mac/beatnet",
"version": "d579bc739439ed9805595139fd45d38e7db9f455c58dae9a230b9d31564201c6",
"input": {
"audio": "https://replicate.delivery/pbxt/JNFJg9bnf1DyV6TkjH645OoAd7VhevU9hdSj391R4j1rhbYb/in.mp3",
"click_track": true,
"combine_click_track": true
},
"logs": "/tmp/tmp1gdxkhxxin-beats.wav",
"output": {
"beats": "https://pbxt.replicate.delivery/Ofs0L8r8td2Qcq09mlyORHJWhdhphKffuu34MMnR6PDEiz2iA/tmp1gdxkhxxin-beats.json",
"click": "https://pbxt.replicate.delivery/h4QovTvzNHKBD5uatT33HO3fFaKizbxn0l7L6njEkrSh4stIA/tmp1gdxkhxxin-beats.wav",
"combined": "https://pbxt.replicate.delivery/tA7fKatdX4T6Lq6rBXr4epNTZETEczB1IMsjcV5gA7iDxZbRA/tmp1gdxkhxxin-click.wav"
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-08-18T21:57:03.203461Z",
"started_at": "2023-08-18T22:01:26.2846Z",
"completed_at": "2023-08-18T22:01:39.852207Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/5n5wxczbozldsric3qy7wxjxiy/cancel",
"get": "https://api.replicate.com/v1/predictions/5n5wxczbozldsric3qy7wxjxiy"
},
"metrics": {
"predict_time": 13.567607,
"total_time": 276.648746
}
}