Skip to main content
POST
/
v1
/
evals
/
classify
/
extract
/
{project_id}
/
{iteration_id}
Extract For Project Iteration
curl --request POST \
  --url https://api.retab.com/v1/evals/classify/extract/{project_id}/{iteration_id} \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'document=<string>' \
  --form 'model=<string>' \
  --form n_consensus=4 \
  --form 'metadata=<string>'
{
  "result": {
    "reasoning": "<string>",
    "classification": "<string>"
  },
  "usage": {
    "credits": 123
  },
  "likelihood": 123,
  "votes": [
    {
      "reasoning": "<string>",
      "classification": "<string>"
    }
  ]
}

Authorizations

Api-Key
string
header
required

Path Parameters

project_id
string
required
iteration_id
string
required

Query Parameters

access_token
string | null

Body

multipart/form-data
document
string | null
model
string | null
n_consensus
integer | null
Required range: 1 <= x <= 8
metadata
string | null

Response

Successful Response

result
ClassifyResult · object
required

The classification result with reasoning

usage
RetabUsage · object
required

Usage information for the classification

likelihood
number | null

Likelihood score (0.0-1.0) of the consensus classification. Only set when n_consensus > 1 and at least two votes succeed.

votes
ClassifyVote · object[]

Individual LLM votes used to build the consensus. Empty when n_consensus <= 1.