Classifier

High performance zero-shot and few-shot classifier for multimodal and multilingual data.

What is Classifier?

The Classifier is an API service that categorizes text and images using embedding models (jina-embeddings-v3 and jina-clip-v1), supporting both zero-shot classification without training data and few-shot learning with minimal examples.

When to use zero-shot or few-shot?

Use zero-shot classification as your default solution for immediate results on general classification tasks with up to 256 classes, while few-shot learning is better suited when dealing with domain-specific data outside the embedding models' knowledge or when you need to handle time-sensitive data that requires continuous model updates.
FeatureZero-shotFew-shot
Primary Use CaseDefault solution for general classificationFor data outside v3/clip-v1's domain or time-sensitive data
Multimodal & Multilingual Support
Training Data Required
Labels Required in /trainN/A
Labels Required in /classify
Classifier ID Required
Semantic Labels Required
State ManagementStatelessStateful
Continuous Model Updates
Access Control
Maximum Classes25616
Maximum ClassifiersN/A16
Maximum Inputs per Request1,0241,024
Maximum Token Length per Input8192 tokens8192 tokens

Classifier API

Try out our API playground to see how our classifier works.




Inputs to classify
For text, it can be a sentence up to 8192 tokens. For images, it can be a URL or a base64-encoded image.

Request
curl https://api.jina.ai/v1/classify \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer " \
  -d @- <<EOFEOF
  {
    "input": [
        "Calculate the compound interest on a principal of $10,000 invested for 5 years at an annual rate of 5%, compounded quarterly.",
        "分析使用CRISPR基因编辑技术在人类胚胎中的伦理影响。考虑潜在的医疗益处和长期社会后果。",
        "AIが自意識を持つディストピアの未来を舞台にした短編小説を書いてください。人間とAIの関係や意識の本質をテーマに探求してください。",
        "Erklären Sie die Unterschiede zwischen Merge-Sort und Quicksort-Algorithmen in Bezug auf Zeitkomplexität, Platzkomplexität und Leistung in der Praxis.",
        "Write a poem about the beauty of nature and its healing power on the human soul.",
        "Translate the following sentence into French: The quick brown fox jumps over the lazy dog."
    ],
    "labels": [
        "Simple task",
        "Complex reasoning",
        "Creative writing",
        "Complex reasoning",
        "Creative writing",
        "Simple task"
    ],
    "model": "jina-embeddings-v3",
    "action": "list"
  }
EOFEOF


API Pricing

API pricing is based on token usage - input tokens for standard APIs and output tokens for Reader API. One API key gives you access to all search foundation products.
Auto-recharge when tokens are low
Recommended for uninterrupted service in production. When your token balance is below the threshold you set, we will automatically recharge your credit card for the same amount as your last top-up. If you purchased multiple packs in the last top-up, we will recharge only one pack.
Top up this API key with more tokens
Depending on your location, you may be charged in USD, EUR, or other currencies. Taxes may apply.
Toy Experiment
1 Million
Tokens valid for:
Non-commercial use only (CC-BY-NC)
Free
Enjoy your new API key with free tokens, no credit card required.
Prototype Development
1 Billion
Tokens valid for:
Unrestricted commercial use
$20
0.020 / 1M tokens
Production Deployment
11 Billion
Tokens valid for:
Unrestricted commercial use
Much higher rate limit
Priority customer support
Free 1-hour consultation
$200
0.018 / 1M tokens
Please input the right API key to top up
Rate Limit
Rate limits are tracked in two ways: RPM (requests per minute) and TPM (tokens per minute). Limits are enforced per IP and can be reached based on whichever threshold—RPM or TPM—is hit first.
ProductAPI EndpointDescriptionw/o API Keyw/ API Keyw/ Premium API KeyAverage LatencyToken Usage CountingAllowed Request
Classifier API (Zero-shot)https://api.jina.ai/v1/classifyClassify inputs using zero-shot classification200 RPM & 500,000 TPM1,000 RPM & 3,000,000 TPM
depends on the input size
Tokens counted as: input_tokens + label_tokensPOST
Classifier APIhttps://api.jina.ai/v1/trainTrain a classifier using labeled examples20 RPM & 200,000 TPM60 RPM & 1,000,000 TPM
depends on the input size
Tokens counted as: input_tokens × num_itersPOST
Classifier API (Few-shot)https://api.jina.ai/v1/classifyClassify inputs using a trained few-shot classifier20 RPM & 200,000 TPM60 RPM & 1,000,000 TPM
depends on the input size
Tokens counted as: input_tokensPOST
Embedding APIhttps://api.jina.ai/v1/embeddingsConvert text/images to fixed-length vectors500 RPM & 1,000,000 TPM2,000 RPM & 5,000,000 TPM
depends on the input size
Count the number of tokens in the input request.POST
Reranker APIhttps://api.jina.ai/v1/rerankTokenize and segment long text500 RPM & 1,000,000 TPM2,000 RPM & 5,000,000 TPM
depends on the input size
Count the number of tokens in the input request.POST
Reader APIhttps://r.jina.aiConvert URL to LLM-friendly text20 RPM200 RPM1000 RPM4.6sCount the number of tokens in the output response.GET/POST
Reader APIhttps://s.jina.aiSearch the web and convert results to LLM-friendly text40 RPM100 RPM8.7sCount the number of tokens in the output response.GET/POST
Reader APIhttps://g.jina.aiGrounding a statement with web knowledge10 RPM30 RPM22.7sCount the total number of tokens in the whole process.GET/POST
Segmenter APIhttps://segment.jina.aiTokenize and segment long text20 RPM200 RPM1,000 RPM0.3sToken is not counted as usage.GET/POST
Classifier-related common questions
API-related common questions
Billing-related common questions