Sentiment DistilBERT

SENTIMENT_DISTILBERT

English sentiment: POSITIVE or NEGATIVE with a confidence score, from DistilBERT fine-tuned on SST-2.

Utilities

About Sentiment DistilBERT

Classifies a short piece of English text as positive or negative and returns a confidence score.

The weights are distilbert/distilbert-base-uncased-finetuned-sst-2-english, published by Hugging Face. DistilBERT was created by Victor Sanh, Lysandre Debut, Julien Chaumond and Thomas Wolf. This checkpoint is that base model fine-tuned on the SST-2 movie-review split of GLUE. The model card states the licence as Apache-2.0. The weights file model.safetensors is 267,832,558 bytes and is public.

Limits

English prose only. A 2000-character cap keeps a single request small. The score is a classification confidence, not a measure of truth, safety or intent. Empty text is still scored. The model runs on CPU.

Sentiment DistilBERT inputs and output

NameTypeRequiredDefaultDetails
texttextYes—English text to classify as POSITIVE or NEGATIVE.
Max 2000 characters

Output. Returns plain text.

Run Sentiment DistilBERT with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=SENTIMENT_DISTILBERT" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "text": "example"
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "SENTIMENT_DISTILBERT",
        {
          "text": "example"
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Sentiment DistilBERT pricing

Price per request: 0.008 credits ($0.00008). The price is shown again before every run; all prices are on the pricing page.

SAM 2.1 Hiera Large: Utilities model on Kainguru
Utilities

SAM 2.1 Hiera Large

Click or draw a box on an object and get back a mask outlining it.

Fine-tunable
Grounded SAM 2: Utilities model on Kainguru
Utilities

Grounded SAM 2

Outlines the things you name in a picture, such as "red car, person with a helmet", with a mask and a box for each one.

Fine-tunable
BiRefNet General: Utilities model on Kainguru
Utilities

BiRefNet General

Removes the background from a photo and returns the subject on a transparent background, or as a black-and-white mask.

Fine-tunable
Cloth Segmentation U2-Net: Utilities model on Kainguru
Utilities

Cloth Segmentation U2-Net

Finds the clothes a person wears in a photo and returns a mask for the upper body, the lower body and full-body…

Fine-tunable
Depth Anything v2 Small: Utilities model on Kainguru
Utilities

Depth Anything v2 Small

Turns any photo into a depth map that shows which parts are near and which are far.

Fine-tunable
DWPose Wholebody: Utilities model on Kainguru
Utilities

DWPose Wholebody

Finds every person in a photo and returns 133 keypoints for each: body, feet, face and both hands, as JSON in the…

Fine-tunable