
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
node-replicate
Advanced tools
A Node.js client for Replicate.
import replicate from "node-replicate"
const prediction = await replicate
.model(
"stability-ai/stable-diffusion:db21e45d3f7023abc2a46ee38a23973f6dce16bb082a930b0c49861f96d1e5bf",
)
.predict({
prompt: "an astronaut riding on a horse",
})
console.log(prediction.output)
// [ "https://replicate.delivery/pbxt/f4nlztv3uz1iFC4AEf2wBYQGTezdVeysvtZUtwfsvZOJDN6AC/out-0.png" ]
Replicate is an online platform for running machine learning models in the cloud. This package implements a lightweight client for their anonymous API, allowing you to run Stable Diffusion, Whisper and other cutting-edge models in just a few lines of code 😄🤏.
Install with npm.
npm i node-replicate
To run a model, just pass its identifier to replicate.model() and then call predict(). You can find its identifier and prediction parameters on Replicate (e.g. https://replicate.com/stability-ai/stable-diffusion/api).
import replicate from "node-replicate"
const prediction = await replicate
.model(
"stability-ai/stable-diffusion:db21e45d3f7023abc2a46ee38a23973f6dce16bb082a930b0c49861f96d1e5bf",
)
.predict({
prompt: "an astronaut riding on a horse",
})
console.log(prediction.output)
// [ "https://replicate.delivery/pbxt/f4nlztv3uz1iFC4AEf2wBYQGTezdVeysvtZUtwfsvZOJDN6AC/out-0.png" ]
To monitor a pending prediction, you can also specify an onUpdate() callback.
import replicate from "node-replicate"
const prediction = await replicate
.model(
"stability-ai/stable-diffusion:db21e45d3f7023abc2a46ee38a23973f6dce16bb082a930b0c49861f96d1e5bf",
)
.predict(
{
prompt: "an astronaut riding on a horse",
},
{
onUpdate(prediction) {
console.log(prediction.status)
},
},
)
console.log(prediction.output)
// [ "https://replicate.delivery/pbxt/f4nlztv3uz1iFC4AEf2wBYQGTezdVeysvtZUtwfsvZOJDN6AC/out-0.png" ]
Have a feature you'd like to see included? Create a pull request or open an issue.
FAQs
A Node.js client for Replicate.
The npm package node-replicate receives a total of 61 weekly downloads. As such, node-replicate popularity was classified as not popular.
We found that node-replicate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.