API ReferenceBenchmarks
Run Benchmark
Execute a benchmark and list available files
Run Benchmark
POST
/api/v1/benchmark/{schemaId}/run-benchmarkASYNCStarts 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
| Name | Type | In | Required | Description |
|---|---|---|---|---|
schemaId | string | path | Yes | The extraction schema ID |
benchmarkRunName | string | body | Yes | Name for this benchmark run |
benchmarkRunDescription | string | body | Yes | Description of the benchmark run |
selectedFileIds | string[] | body | No | Specific file IDs to benchmark (defaults to all accepted files) |
configurationOverride | object | body | No | Override 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-filesLists files available for benchmarking in an extraction schema. Only files with all accepted rows are eligible.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
schemaId | string | path | Yes | The 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.