v4
latestOpenAPI 3.1.02026-08-021957100.4 KBZero/Few-shot Classification
Train
Train or update a few-shot classifier.
Create a new classifier with labeled examples, or update an existing one with additional training data.
post/v1/train
Request body
Example request
{
"access": "private",
"input": [
{
"label": "Biology",
"text": "Explain the process of photosynthesis."
},
{
"label": "Geography",
"text": "What is the capital of France?"
}
],
"model": "jina-embeddings-v2-base-en",
"num_iters": 15
}Response
Successful Response
Example response
{
"classifier_id": "00000000-0000-0000-0000-000000000000",
"num_samples": 6,
"usage": {
"total_tokens": 1830
}
}