curl --request POST \
--url https://api.lightsage.com/v2/eval-runs \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"eval_id": "eval_123",
"env": {
"LIGHTSAGE_API_KEY": "secret-value"
}
}
'{
"id": "<string>",
"job_id": "<string>",
"status": "<string>",
"eval_id": "<string>",
"eval_name": "<string>",
"configuration_id": "<string>",
"persona": "<string>",
"agent": [
"<string>"
],
"prompt_count": 1,
"runs": 1,
"attempt_count": 1,
"stage": "<string>",
"dispatch_id": "<string>",
"progress": {
"total": 0,
"queued": 0,
"running": 0,
"completed": 0,
"failed": 0,
"cancelled": 0,
"retrying": 0,
"interrupted": 0,
"percent": 0
},
"estimated_cost": 123,
"error": "<string>",
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>"
}Start an eval run
Queues a durable eval job and returns immediately with a polling ID. Poll GET /v2/eval-runs/{run_id} until its status reaches a terminal value; once finished it also returns the results and analysis. Follow a run live with the monitor operation.
Eval runs measure how well agents complete tasks with your product. To compare how coding agents and answer engines answer the same research question, with mentions and citations, use POST /v2/prompts/runs with agent instead.
Send one of these flat request forms:
- Saved eval: provide
eval_id; optionally replace its prompts, persona, agents, CLIs, MCPs, setup commands, cleanup commands, startingrepository, or runs for this launch only; the saved eval is not changed. A saved configuration can still provide repository, environment, skills, and legacy tool selections. - Direct create-and-run: provide
prompts,judges, andagent. You may also provide a persona, tags, repository, write-only environment variables, saved or inline CLIs and MCP servers, skills, setup commands, and cleanup commands.
The run fans out across prompts × agents × runs. Persona is shared metadata and does not multiply attempts. No separate mode field is required. If the organization lacks the estimated credits, the request fails with 402 before dispatching work.
A saved or inline environment containing an empty or placeholder credential is rejected with 400 before any evaluation is dispatched.
curl --request POST \
--url https://api.lightsage.com/v2/eval-runs \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"eval_id": "eval_123",
"env": {
"LIGHTSAGE_API_KEY": "secret-value"
}
}
'{
"id": "<string>",
"job_id": "<string>",
"status": "<string>",
"eval_id": "<string>",
"eval_name": "<string>",
"configuration_id": "<string>",
"persona": "<string>",
"agent": [
"<string>"
],
"prompt_count": 1,
"runs": 1,
"attempt_count": 1,
"stage": "<string>",
"dispatch_id": "<string>",
"progress": {
"total": 0,
"queued": 0,
"running": 0,
"completed": 0,
"failed": 0,
"cancelled": 0,
"retrying": 0,
"interrupted": 0,
"percent": 0
},
"estimated_cost": 123,
"error": "<string>",
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>"
}Body
Start an eval run using one of two flat request forms. Saved runs require eval_id and use saved simulation defaults unless the request replaces them. Direct create-and-run requests require prompts, judges, and agent. No separate mode field is required.
Saved CLI IDs or shell installation commands. UUID values resolve saved CLIs from GET /v2/clis; every other value is run as an installation command. In saved mode, an explicit empty array disables saved CLIs for this launch. CLI clients expose repeatable --cli.
20Shell commands run one after another before the agent starts. They run in the folder the agent starts in, so ./ is the agent's project folder. New files and folders a command creates directly in ~ also appear in the agent's home folder; files added inside a folder ~ already has, such as ~/.config, do not. In saved mode, an explicit empty array disables saved setup commands for this launch. CLI clients expose repeatable --setup-command.
20Best-effort shell commands run sequentially after agent execution and result capture, before sandbox deletion. In saved mode, an explicit empty array disables saved cleanup commands for this launch. CLI clients expose repeatable --cleanup-command.
20Response
Successful Response