{
"language": "en"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_SOO**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run intelligent-utilities/random-wikipedia-article using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
language: "en"
};
const output = await replicate.run("intelligent-utilities/random-wikipedia-article", { input });
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_SOO**********************************
This is your API token. Keep it to yourself.
import replicate
Run intelligent-utilities/random-wikipedia-article using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"intelligent-utilities/random-wikipedia-article",
input={
"language": "en"
}
)
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_SOO**********************************
This is your API token. Keep it to yourself.
Run intelligent-utilities/random-wikipedia-article 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 $'{
"input": {
"language": "en"
}
}' \
https://api.replicate.com/v1/models/intelligent-utilities/random-wikipedia-article/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "s2jjzn6b95rm80crn9ta90yb4m",
"model": "intelligent-utilities/random-wikipedia-article",
"version": "hidden",
"input": {
"language": "en"
},
"logs": "",
"output": {
"description": "Sporting event delegation",
"image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Flag_of_Bulgaria.svg/1000px-Flag_of_Bulgaria.svg.png",
"language": "en",
"page_id": 58492812,
"summary": "Bulgaria competed at the 2020 Summer Olympics in Tokyo. Originally scheduled to take place from 24 July to 9 August 2020, the Games were postponed to 23 July to 8 August 2021, due to the COVID-19 pandemic. Bulgarian athletes have appeared in every edition of the Summer Olympics since 1924, except for three occasions: the 1948 Summer Olympics in London, and the 1932 and 1984 Summer Olympics in Los Angeles because of Bulgaria's actions in World War II and the worldwide Great Depression and Soviet boycott, respectively.",
"thumbnail_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Flag_of_Bulgaria.svg/330px-Flag_of_Bulgaria.svg.png",
"title": "Bulgaria at the 2020 Summer Olympics",
"url": "https://en.wikipedia.org/wiki/Bulgaria_at_the_2020_Summer_Olympics"
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-14T21:20:37.705Z",
"started_at": "2025-08-14T21:20:37.968407Z",
"completed_at": "2025-08-14T21:20:38.187842Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/s2jjzn6b95rm80crn9ta90yb4m/cancel",
"children": "https://api.replicate.com/v1/predictions/s2jjzn6b95rm80crn9ta90yb4m/children",
"get": "https://api.replicate.com/v1/predictions/s2jjzn6b95rm80crn9ta90yb4m",
"root": "https://api.replicate.com/v1/predictions/s2jjzn6b95rm80crn9ta90yb4m",
"web": "https://replicate.com/p/s2jjzn6b95rm80crn9ta90yb4m"
},
"metrics": {
"predict_time": 0.219435893,
"total_time": 0.482842
}
}