v4

latestOpenAPI 3.1.02026-08-021957100.4 KB
Zero/Few-shot Classification

Classify

Classify text or images into categories.

Zero-shot and few-shot classification. Zero-shot uses embedding similarity, few-shot uses a trained classifier.

post/v1/classify

Request body

OR

Example request

{
  "input": [
    "Write a Python function to reverse a string.",
    "Summarize the main findings of the research paper."
  ],
  "labels": [
    "Simple task",
    "Complex reasoning",
    "Creative writing"
  ],
  "model": "jina-embeddings-v2-base-en"
}

Response

Successful Response