Limai Docs
API ReferenceProjects

Benchmarks

List and create benchmarks within a project

List Benchmarks

GET/api/v1/projects/{projectId}/benchmarks

Returns all benchmark executions for a project.

Parameters

NameTypeInRequiredDescription
projectIdstringpathYesThe 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}/benchmarks

Creates and starts a new benchmark execution for a deployment. Optionally specify which files to include.

Parameters

NameTypeInRequiredDescription
projectIdstringpathYesThe project ID
deploymentIdstringbodyYesDeployment to benchmark against
namestringbodyYesBenchmark run name
descriptionstringbodyNoBenchmark description
fileIdsstring[]bodyNoSpecific 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"
}