typefile
{
"clip_model_name": "ViT-H-14/laion2b_s32b_b79k",
"image": "https://replicate.delivery/pbxt/JVpnDt9nXuAnqBaXFPH8JbLrkU7JxQIoAGrHFwRWnFYqI7Ad/replicate-prediction-lyehbrdbrdztdi7ggx63lmhkgm.png",
"mode": "fast"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_78v**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/clip-interrogator using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/clip-interrogator:14d81f8a13e8ef87cc9b5eb7d03f5940fc7010e7226e93af612c5f0f4df1a35f",
{
input: {
clip_model_name: "ViT-H-14/laion2b_s32b_b79k",
image: "https://replicate.delivery/pbxt/JVpnDt9nXuAnqBaXFPH8JbLrkU7JxQIoAGrHFwRWnFYqI7Ad/replicate-prediction-lyehbrdbrdztdi7ggx63lmhkgm.png",
mode: "fast"
}
}
);
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_78v**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/clip-interrogator using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/clip-interrogator:14d81f8a13e8ef87cc9b5eb7d03f5940fc7010e7226e93af612c5f0f4df1a35f",
input={
"clip_model_name": "ViT-H-14/laion2b_s32b_b79k",
"image": "https://replicate.delivery/pbxt/JVpnDt9nXuAnqBaXFPH8JbLrkU7JxQIoAGrHFwRWnFYqI7Ad/replicate-prediction-lyehbrdbrdztdi7ggx63lmhkgm.png",
"mode": "fast"
}
)
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_78v**********************************
This is your API token. Keep it to yourself.
Run lucataco/clip-interrogator 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": "lucataco/clip-interrogator:14d81f8a13e8ef87cc9b5eb7d03f5940fc7010e7226e93af612c5f0f4df1a35f",
"input": {
"clip_model_name": "ViT-H-14/laion2b_s32b_b79k",
"image": "https://replicate.delivery/pbxt/JVpnDt9nXuAnqBaXFPH8JbLrkU7JxQIoAGrHFwRWnFYqI7Ad/replicate-prediction-lyehbrdbrdztdi7ggx63lmhkgm.png",
"mode": "fast"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
painting of a turtle swimming in the ocean with a blue sky in the background, digital painting highly detailed, highly detailed digital painting, high quality digital painting, highly detailed digital artwork, turtle, detailed realistic colors, highly detailed digital art, airbrush digital oil painting, very detailed digital painting, in style of digital painting, detailed painting 4 k, digital art. highly detailed
{
"id": "5td6bttbyzfz4tjptzfmot5l6u",
"model": "lucataco/clip-interrogator",
"version": "14d81f8a13e8ef87cc9b5eb7d03f5940fc7010e7226e93af612c5f0f4df1a35f",
"input": {
"clip_model_name": "ViT-H-14/laion2b_s32b_b79k",
"image": "https://replicate.delivery/pbxt/JVpnDt9nXuAnqBaXFPH8JbLrkU7JxQIoAGrHFwRWnFYqI7Ad/replicate-prediction-lyehbrdbrdztdi7ggx63lmhkgm.png",
"mode": "fast"
},
"logs": "Loading CLIP model ViT-H-14/laion2b_s32b_b79k...\nLoaded CLIP model and data in 9.57 seconds.\n 0%| | 0/55 [00:00<?, ?it/s]\n 53%|█████▎ | 29/55 [00:00<00:00, 289.08it/s]\n100%|██████████| 55/55 [00:00<00:00, 302.06it/s]",
"output": "painting of a turtle swimming in the ocean with a blue sky in the background, digital painting highly detailed, highly detailed digital painting, high quality digital painting, highly detailed digital artwork, turtle, detailed realistic colors, highly detailed digital art, airbrush digital oil painting, very detailed digital painting, in style of digital painting, detailed painting 4 k, digital art. highly detailed",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-09-12T03:02:01.827298Z",
"started_at": "2023-09-12T03:02:01.766679Z",
"completed_at": "2023-09-12T03:02:12.22034Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/5td6bttbyzfz4tjptzfmot5l6u/cancel",
"get": "https://api.replicate.com/v1/predictions/5td6bttbyzfz4tjptzfmot5l6u"
},
"metrics": {
"predict_time": 10.453661,
"total_time": 10.393042
}
}