Multimodal classification made simple

One simple SDK. Any modality. Bring your own labels and get predictions in milliseconds—no training, no infrastructure, no complexity. Process single items or batches effortlessly.

Powered by Google Gemma 3-27B under the hood.

Try the SDK live

Test our simple SDK with different classification tasks—single texts, multiple texts, or images

Via API (powered by inference.net)

💡 Tip: Separate multiple texts with double line breaks to classify them all at once

Choose what you want to send to the API.
'texts' array will be sent in the API request

Images are converted to base64 and sent as an array in the images field.

Separate labels with commas

API Response

Results will appear here after classification

Get started in seconds

Choose your preferred integration method - SDK for simplicity, API for flexibility

Install with npm install zerolabel
Set INFERENCE_API_KEY from inference.net
import { classify } from 'zerolabel';

const results = await classify({
  apiKey: process.env.INFERENCE_API_KEY,
  texts: ["The product arrived on time and the packaging was adequate. It functions as described, though I expected slightly better build quality for the price point. Customer service was responsive when I had questions."],
  labels: ["Positive","Negative","Neutral","Mixed"]
});

console.log(results[0].predicted_label);
console.log(results[0].confidence);

More Examples & Use Cases

📦 Batch Processing

Process multiple items efficiently in a single request

const reviews = [
  "Great product!",
  "Not satisfied",
  "Good value for money"
];

const results = await classify({
  texts: reviews,
  labels: ['positive', 'negative', 'neutral'],
  apiKey: process.env.INFERENCE_API_KEY
});

🔀 Text + Image Analysis

Combine text and visual information for richer classification

const results = await classify({
  texts: ["Check out this cute pet!"],
  images: [imageBase64],
  labels: ['cute dog', 'cute cat', 'other'],
  apiKey: process.env.INFERENCE_API_KEY
});

🎯 Custom Criteria

Add specific instructions to improve classification accuracy

const results = await classify({
  texts: ["The ML model shows promising results"],
  labels: ['technical', 'non-technical'],
  criteria: 'Focus on technical complexity',
  additionalInstructions: 'Consider jargon and expertise',
  apiKey: process.env.INFERENCE_API_KEY
});

🐍 Python Integration

Use our API with requests or your favorite HTTP client

import requests

response = requests.post(
  'https://www.zerolabel.dev/api/classify',
  json={
    'texts': ['Amazing service!'],
    'labels': ['positive', 'negative']
  }
)

results = response.json()['results']
FAQ

Frequently Asked Questions

Everything you need to know about zerolabel.dev text & image classification API

1

What is zero-shot classification?

Zero-shot classification lets you categorise data without training a task-specific model first. You simply send your payload (text, image or both) together with the labels you care about and our SDK returns the most likely label with confidences.

2

How do I install and set up zerolabel?

Install with `npm install zerolabel`, get your API key from inference.net, and set it as `INFERENCE_API_KEY` environment variable. Then import and use: `import { classify } from 'zerolabel'`. That's it!

3

Can I process multiple texts or images at once?

Absolutely! Batch processing is one of our key features. Just pass an array of texts or images instead of a single item. Process thousands of items efficiently in a single API call—it's faster and more cost-effective than individual requests.

4

Can I classify images as well as text?

Yes. The same simple SDK works for images. Include an `images` array of base64-encoded files in your request. Common formats like PNG, JPEG, GIF, and WebP are supported up to 1MB per image.

5

What about combined text + image classification?

Send both a `texts` and an `images` array in the same request. Our SDK handles the complexity—the model will jointly reason over the text and the image before deciding on the best label.

6

How fast is the classification?

Classification typically takes milliseconds to a few seconds depending on batch size. We use optimized inference infrastructure to ensure low latency. Batch processing is particularly efficient for multiple items.

7

What are some real-world use cases?

Email triage (urgent/normal/spam), content moderation (safe/nsfw), support ticket routing (bug/feature/question), document classification (invoice/receipt/contract), sentiment analysis of reviews, and many more. Any categorization task works!

8

How should I structure the API request?

At minimum include a `labels` array with your categories. Add either `texts` (string array), `images` (base64 array), or both. Optional fields include `verbose` for detailed probabilities and `criteria` for custom instructions.

9

What response format can I expect?

Each input returns `{ predicted_label, confidence, probabilities }` with the predicted category, confidence percentage, and probability distribution across all labels. Results are returned as an array matching your input order.

10

How does this compare to traditional machine learning?

Traditional ML requires weeks of data collection, hours of training, and complex infrastructure. zerolabel works instantly with any labels you define—no training, no infrastructure, no complexity. Just install and classify.

11

Is zerolabel TypeScript-ready?

Yes! Full TypeScript definitions are included with proper typing for all inputs and outputs. Import types like `ClassificationInput`, `ClassificationResult`, and `ZeroLabelConfig` for complete type safety.

12

What's the pricing model?

Pricing follows your inference.net plan. The free tier allows limited requests, while paid plans offer much higher rate limits. You pay per API request, making it cost-effective compared to maintaining ML infrastructure.

13

What if classification goes wrong or errors occur?

The SDK includes built-in error handling and retry logic. Common issues include invalid base64 images, missing API keys, or rate limit exceeded. All errors include descriptive messages to help you debug quickly.

14

What languages and image formats are supported?

100+ languages including English, Spanish, French, German, Chinese, Japanese, Arabic and more. Images support PNG, JPEG, GIF, WebP up to 1MB. No extra configuration needed for either.

15

What model powers the API?

Our SDK uses Google Gemma 3-27B optimized for classification tasks via inference.net infrastructure. This ensures high accuracy comparable to fine-tuned models while maintaining fast response times.

16

Do you store the data I send?

We log requests for monitoring and abuse prevention. Logs are retained securely and never shared externally. For data deletion requests or privacy concerns, please email contact@zerolabel.dev.

17

Are there rate limits I should know about?

Rate limits depend on your inference.net plan. Free tier has basic limits, while API key holders get much higher allowances. Batch processing helps maximize efficiency within your rate limits.

18

How do I get started right now?

Try the live demo above to see it in action! Then: 1) `npm install zerolabel`, 2) Get API key from inference.net, 3) Set `INFERENCE_API_KEY` environment variable, 4) Copy the generated code from our demo. You'll be classifying in under 5 minutes.

Ready to get started?

Join thousands of developers using our simple SDK for multimodal classification