Limai Docs
API ReferenceBenchmarks

Run Benchmark

Execute a benchmark and list available files

Run Benchmark

POST/api/v1/benchmark/{schemaId}/run-benchmarkASYNC

Starts a benchmark execution against a specific extraction schema. The benchmark re-extracts data from files with accepted rows and compares results against the ground truth.

Parameters

NameTypeInRequiredDescription
schemaIdstringpathYesThe extraction schema ID
benchmarkRunNamestringbodyYesName for this benchmark run
benchmarkRunDescriptionstringbodyYesDescription of the benchmark run
selectedFileIdsstring[]bodyNoSpecific file IDs to benchmark (defaults to all accepted files)
configurationOverrideobjectbodyNoOverride extraction configuration for this run

Request

const res = await fetch(
"https://app.limai.io/api/v1/benchmark/es_abc123/run-benchmark",
{
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    benchmarkRunName: "Baseline v1",
    benchmarkRunDescription: "Initial benchmark with default settings",
  }),
}
);

Response

Response200
{
  "success": true,
  "benchmarkExecutionId": "exec_abc123",
  "deploymentId": "dep_001",
  "fileCount": 25
}

List Available Files

GET/api/v1/benchmark/{schemaId}/list-files

Lists files available for benchmarking in an extraction schema. Only files with all accepted rows are eligible.

Parameters

NameTypeInRequiredDescription
schemaIdstringpathYesThe extraction schema ID

Request

const res = await fetch(
"https://app.limai.io/api/v1/benchmark/es_abc123/list-files",
{
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
}
);
const files = await res.json();

Response

The response contains an array of files eligible for benchmarking with their IDs and names.