Models API

The following APIs allow you to run inference on trained models.


List models

GET
/api/models
Get the list of models, optionally filtered by type, user, or query

Query Parameters object

Output object

const result = await axios.get(
	`https://dibby.ai/api/models`,
);
{
  "items": [
    {
      "id": "some string",
      "name": "some string",
      "type": "TEXT_EMBEDDER",
      "desc": "some string",
      "owner": {
        "name": "some string"
      },
      "bestVersion": "some string",
      "config": "unknown",
      "versions": [
        {
          "name": "some string",
          "config": "unknown"
        }
      ]
    }
  ],
  "totalPages": 0,
  "currentPage": 0
}

Image Classifier inference

POST
/api/models/image_classifiers/{owner}/{model}/infer
Run an image classifier model on an image

Route Parameters object

Body Parameters object

Output object

const owner = 'some string';
const model = 'some string';
const result = await axios.post(
	`https://dibby.ai/api/models/image_classifiers/${owner}/${model}/infer`,
	{
	  "version": "some string",
	  "image": "https://dibby.ai/image.jpg"
	}
);
{
  "class": "some string",
  "probabilities": {
    "some string": 0
  },
  "confidence": 0
}

Image Scorer inference

POST
/api/models/image_scorers/{owner}/{model}/infer
Run an image scorer model on an image

Route Parameters object

Body Parameters object

Output object

const owner = 'some string';
const model = 'some string';
const result = await axios.post(
	`https://dibby.ai/api/models/image_scorers/${owner}/${model}/infer`,
	{
	  "version": "some string",
	  "image": "https://dibby.ai/image.jpg"
	}
);
{
  "score": 0
}

Image Embedder inference

POST
/api/models/image_embedders/{owner}/{model}/infer
Run an image embedder model on an image

Route Parameters object

Body Parameters object

Output object

const owner = 'some string';
const model = 'some string';
const result = await axios.post(
	`https://dibby.ai/api/models/image_embedders/${owner}/${model}/infer`,
	{
	  "version": "some string",
	  "image": "https://dibby.ai/image.jpg"
	}
);
{
  "embedding": {
    "type": "GTE",
    "value": [
      0
    ]
  }
}

Text Classifier inference

POST
/api/models/text_classifiers/{owner}/{model}/infer
Run a text classifier model on a text

Route Parameters object

Body Parameters object

Output object

const owner = 'some string';
const model = 'some string';
const result = await axios.post(
	`https://dibby.ai/api/models/text_classifiers/${owner}/${model}/infer`,
	{"version":"some string","text":"some string"}
);
{
  "class": "some string",
  "probabilities": {
    "some string": 0
  },
  "confidence": 0
}

Text Embedder inference

POST
/api/models/text_embedders/{owner}/{model}/infer
Run a text embedder model on a text

Route Parameters object

Body Parameters object

Output object

const owner = 'some string';
const model = 'some string';
const result = await axios.post(
	`https://dibby.ai/api/models/text_embedders/${owner}/${model}/infer`,
	{"version":"some string","text":"some string"}
);
{
  "embedding": {
    "type": "GTE",
    "value": [
      0
    ]
  }
}

Document Extractor inference

POST
/api/models/document_extractors/{owner}/{model}/infer
Run an extract scorer model on a document

Route Parameters object

Body Parameters object

Output object

const owner = 'some string';
const model = 'some string';
const result = await axios.post(
	`https://dibby.ai/api/models/document_extractors/${owner}/${model}/infer`,
	{
	  "version": "some string",
	  "document": "https://dibby.ai/example.pdf"
	}
);
{
  "data": {
    "some string": "unknown"
  }
}