typefile
{
"category": "all_tags",
"character_mcut_enabled": false,
"character_thresh": 0.85,
"general_mcut_enabled": false,
"general_thresh": 0.35,
"image": "https://replicate.delivery/pbxt/KyBHXfcGfwSFs0ob5gIoW0gPgU8e06B2t2gyGKeDElufpsj0/bunny3.webp",
"model_repo": "models/wd-swinv2-tagger-v3"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_GgT**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run zsxkib/wd-image-tagger using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zsxkib/wd-image-tagger:f9cfa5bef6e8f789662b1d6014a378f5e514a9f4d6b409e0ad84da126a4bdf62",
{
input: {
category: "all_tags",
character_mcut_enabled: false,
character_thresh: 0.85,
general_mcut_enabled: false,
general_thresh: 0.35,
image: "https://replicate.delivery/pbxt/KyBHXfcGfwSFs0ob5gIoW0gPgU8e06B2t2gyGKeDElufpsj0/bunny3.webp",
model_repo: "models/wd-swinv2-tagger-v3"
}
}
);
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_GgT**********************************
This is your API token. Keep it to yourself.
import replicate
Run zsxkib/wd-image-tagger using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zsxkib/wd-image-tagger:f9cfa5bef6e8f789662b1d6014a378f5e514a9f4d6b409e0ad84da126a4bdf62",
input={
"category": "all_tags",
"character_mcut_enabled": False,
"character_thresh": 0.85,
"general_mcut_enabled": False,
"general_thresh": 0.35,
"image": "https://replicate.delivery/pbxt/KyBHXfcGfwSFs0ob5gIoW0gPgU8e06B2t2gyGKeDElufpsj0/bunny3.webp",
"model_repo": "models/wd-swinv2-tagger-v3"
}
)
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_GgT**********************************
This is your API token. Keep it to yourself.
Run zsxkib/wd-image-tagger 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": "zsxkib/wd-image-tagger:f9cfa5bef6e8f789662b1d6014a378f5e514a9f4d6b409e0ad84da126a4bdf62",
"input": {
"category": "all_tags",
"character_mcut_enabled": false,
"character_thresh": 0.85,
"general_mcut_enabled": false,
"general_thresh": 0.35,
"image": "https://replicate.delivery/pbxt/KyBHXfcGfwSFs0ob5gIoW0gPgU8e06B2t2gyGKeDElufpsj0/bunny3.webp",
"model_repo": "models/wd-swinv2-tagger-v3"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "q2x669wp75rgc0cfmr4r6pz7m8",
"model": "zsxkib/wd-image-tagger",
"version": "f9cfa5bef6e8f789662b1d6014a378f5e514a9f4d6b409e0ad84da126a4bdf62",
"input": {
"category": "all_tags",
"character_mcut_enabled": false,
"character_thresh": 0.85,
"general_mcut_enabled": false,
"general_thresh": 0.35,
"image": "https://replicate.delivery/pbxt/KyBHXfcGfwSFs0ob5gIoW0gPgU8e06B2t2gyGKeDElufpsj0/bunny3.webp",
"model_repo": "models/wd-swinv2-tagger-v3"
},
"logs": "",
"output": [
{
"category": "general",
"confidence": 0.5684077143669128,
"tag": "outdoors"
},
{
"category": "general",
"confidence": 0.3831140398979187,
"tag": "lying"
},
{
"category": "general",
"confidence": 0.8763853311538696,
"tag": "blurry"
},
{
"category": "general",
"confidence": 0.9804705381393433,
"tag": "no humans"
},
{
"category": "general",
"confidence": 0.5741121172904968,
"tag": "blurry background"
},
{
"category": "general",
"confidence": 0.5820473432540894,
"tag": "depth of field"
},
{
"category": "general",
"confidence": 0.8318572640419006,
"tag": "animal"
},
{
"category": "general",
"confidence": 0.6375629305839539,
"tag": "cat"
},
{
"category": "general",
"confidence": 0.5245271325111389,
"tag": "grass"
},
{
"category": "general",
"confidence": 0.5816801190376282,
"tag": "realistic"
},
{
"category": "general",
"confidence": 0.9442822933197021,
"tag": "animal focus"
},
{
"category": "general",
"confidence": 0.36753329634666443,
"tag": "white fur"
},
{
"category": "general",
"confidence": 0.551397442817688,
"tag": "whiskers"
},
{
"category": "rating",
"confidence": 0.983599066734314,
"tag": "general"
},
{
"category": "rating",
"confidence": 0.015072911977767944,
"tag": "sensitive"
},
{
"category": "rating",
"confidence": 0.000958561897277832,
"tag": "questionable"
},
{
"category": "rating",
"confidence": 0.000261843204498291,
"tag": "explicit"
}
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-05-23T15:19:57.241Z",
"started_at": "2024-05-23T15:25:23.527905Z",
"completed_at": "2024-05-23T15:25:25.433149Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/q2x669wp75rgc0cfmr4r6pz7m8/cancel",
"get": "https://api.replicate.com/v1/predictions/q2x669wp75rgc0cfmr4r6pz7m8",
"web": "https://replicate.com/p/q2x669wp75rgc0cfmr4r6pz7m8"
},
"metrics": {
"predict_time": 1.905244,
"total_time": 328.192149
}
}