typefile
{
"agree_to_research_only": true,
"image": "https://replicate.delivery/pbxt/KHcvVMn21kcN62J7qUBDGmTYxjZHQ8aCm0NuaKhmYtB9j3Fh/demo-1.jpg",
"prompt": "What is the title of this book?"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Vri**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run jyoung105/moondream using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jyoung105/moondream:78c6e38e06676317599665ed1991562cbb5f2b4d728f418958153d1bb70b97bc",
{
input: {
agree_to_research_only: true,
image: "https://replicate.delivery/pbxt/KHcvVMn21kcN62J7qUBDGmTYxjZHQ8aCm0NuaKhmYtB9j3Fh/demo-1.jpg",
prompt: "What is the title of this book?"
}
}
);
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_Vri**********************************
This is your API token. Keep it to yourself.
import replicate
Run jyoung105/moondream using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jyoung105/moondream:78c6e38e06676317599665ed1991562cbb5f2b4d728f418958153d1bb70b97bc",
input={
"agree_to_research_only": True,
"image": "https://replicate.delivery/pbxt/KHcvVMn21kcN62J7qUBDGmTYxjZHQ8aCm0NuaKhmYtB9j3Fh/demo-1.jpg",
"prompt": "What is the title of this book?"
}
)
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_Vri**********************************
This is your API token. Keep it to yourself.
Run jyoung105/moondream 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": "jyoung105/moondream:78c6e38e06676317599665ed1991562cbb5f2b4d728f418958153d1bb70b97bc",
"input": {
"agree_to_research_only": true,
"image": "https://replicate.delivery/pbxt/KHcvVMn21kcN62J7qUBDGmTYxjZHQ8aCm0NuaKhmYtB9j3Fh/demo-1.jpg",
"prompt": "What is the title of this book?"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
The Little Book of Deep Learning
{
"id": "pc7zbyzbutnmsi2xsn7dqyvkki",
"model": "jyoung105/moondream",
"version": "78c6e38e06676317599665ed1991562cbb5f2b4d728f418958153d1bb70b97bc",
"input": {
"agree_to_research_only": true,
"image": "https://replicate.delivery/pbxt/KHcvVMn21kcN62J7qUBDGmTYxjZHQ8aCm0NuaKhmYtB9j3Fh/demo-1.jpg",
"prompt": "What is the title of this book?"
},
"logs": "",
"output": "The Little Book of Deep Learning",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-01-24T18:04:49.184158Z",
"started_at": "2024-01-24T18:09:09.021955Z",
"completed_at": "2024-01-24T18:09:13.003517Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/pc7zbyzbutnmsi2xsn7dqyvkki/cancel",
"get": "https://api.replicate.com/v1/predictions/pc7zbyzbutnmsi2xsn7dqyvkki"
},
"metrics": {
"predict_time": 3.981562,
"total_time": 263.819359
}
}