The following APIs allow you to run inference on trained models.
limit
number?offset
number?type
TEXT_EMBEDDER | TEXT_CLASSIFIER | IMAGE_EMBEDDER | IMAGE_CLASSIFIER | IMAGE_SCORER?user
string?query
string?Search query
items
arraytotalPages
numbercurrentPage
numberconst result = await axios.get(
`https://dibby.ai/api/models`,
);
{
"items": [
{
"id": "abbfa6f1-5798-4e14-be31-4b334d98f324",
"name": "model_name",
"type": "TEXT_EMBEDDER",
"desc": "some string",
"user": {
"name": "dibby"
},
"bestVersion": "some string",
"versions": [
{
"name": "some string"
}
]
}
],
"totalPages": 1,
"currentPage": 0
}
owner
stringmodel
stringversion
stringimage
imageclass
stringThe predicted class
probabilities
Record<string, number>The probabilities of each class
confidence
numberThe confidence of the prediction
const owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/image_classifiers/${owner}/${model}/infer`,
{
"version": "clip-zs",
"image": "https://dibby.ai/image.jpg"
}
);
{
"class": "Apple",
"probabilities": {
"Apple": 0.9,
"Banana": 0.1
},
"confidence": 0.9
}
owner
stringmodel
stringversion
stringimage
imagescore
numberThe score of the image
const owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/image_scorers/${owner}/${model}/infer`,
{
"version": "clip-zs",
"image": "https://dibby.ai/image.jpg"
}
);
{
"score": 0.54
}
owner
stringmodel
stringversion
stringimage
imageembedding
embeddingconst owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/image_embedders/${owner}/${model}/infer`,
{
"version": "clip",
"image": "https://dibby.ai/image.jpg"
}
);
{
"embedding": {
"type": "CLIP",
"value": [
0.912,
0.612,
0.1235,
0.512
]
}
}
owner
stringmodel
stringversion
stringtext
stringThe text to classify
class
stringThe predicted class
const owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/text_classifiers/${owner}/${model}/infer`,
{
"version": "gte-zs",
"text": "This is a great movie!"
}
);
{
"class": "Positive review"
}
owner
stringmodel
stringversion
stringtext
stringThe text to embed
embedding
embeddingconst owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/text_embedders/${owner}/${model}/infer`,
{"version":"clip","text":"Hello, world!"}
);
{
"embedding": {
"type": "CLIP",
"value": [
0.912,
0.612,
0.1235,
0.512
]
}
}