API ReferenceProjects
Benchmarks
List and create benchmarks within a project
List Benchmarks
GET
/api/v1/projects/{projectId}/benchmarksReturns all benchmark executions for a project.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId | string | path | Yes | The project ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/benchmarks",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const { data } = await res.json();Response
Response200
{
"data": [
{
"id": "exec_001",
"name": "Baseline v1",
"description": "Initial benchmark run",
"status": "COMPLETED",
"fileCount": 25,
"deploymentId": "dep_001",
"deploymentName": "Invoice Extractor",
"createdAt": "2025-01-15T10:00:00.000Z",
"createdBy": "user_001"
}
]
}Create Benchmark
POST
/api/v1/projects/{projectId}/benchmarksCreates and starts a new benchmark execution for a deployment. Optionally specify which files to include.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId | string | path | Yes | The project ID |
deploymentId | string | body | Yes | Deployment to benchmark against |
name | string | body | Yes | Benchmark run name |
description | string | body | No | Benchmark description |
fileIds | string[] | body | No | Specific file IDs to include (defaults to all accepted files) |
Request
const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/benchmarks",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
deploymentId: "dep_001",
name: "Baseline v2",
description: "After prompt improvements",
}),
}
);Response
Response201
{
"executionId": "exec_new",
"deploymentId": "dep_001",
"fileCount": 25,
"status": "RUNNING"
}