curl --request GET \
--url https://davinci-app.com/api/v2/evaluation-runs/{runId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://davinci-app.com/api/v2/evaluation-runs/{runId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/evaluation-runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/evaluation-runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceProjectId": "<string>",
"status": "provisioning",
"sandbox": {
"projectId": "<string>",
"branchName": "<string>",
"ephemeral": true,
"name": "<string>",
"deleteAfter": "2023-11-07T05:31:56Z"
},
"cleanup": {
"status": "not_started",
"requested": true,
"requestedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"grantsRevoked": 1,
"projectDeleted": true,
"failure": {
"code": "EVALUATION_SCOPE_MISSING",
"message": "<string>",
"infrastructure": true,
"details": {}
}
},
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"testId": "<string>",
"testRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"codeExecutionId": "<string>",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataPlane": {
"url": "<string>",
"token": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"connectionId": "<string>",
"ownerId": "<string>",
"userId": "<string>",
"projectKey": "<string>",
"operations": [
"<string>"
],
"purpose": "evaluation"
},
"evidence": {
"capturedAt": "2023-11-07T05:31:56Z",
"transcript": {
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taskId": "<string>",
"source": "live",
"status": "no_session",
"entryCount": 1,
"messages": [
{
"index": 1,
"role": "user",
"kind": "<string>",
"text": "<string>",
"timestamp": 123,
"messageId": "<string>",
"tool": {
"name": "<string>",
"status": "<string>",
"params": "<unknown>",
"result": "<unknown>",
"error": "<string>"
}
}
]
},
"tree": {
"objectCount": 1,
"tree": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"parent": "<string>",
"childrenCount": 1
}
]
},
"usage": {
"scope": "account",
"asOf": "2023-11-07T05:31:56Z",
"totals": {
"credits": 123,
"promptTokens": 123,
"completionTokens": 123,
"reasoningTokens": 123,
"cacheWriteTokens": 123,
"cacheReadTokens": 123,
"eventCount": 123
},
"projectId": "<string>",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"groupBy": "model",
"groups": [
{
"credits": 123,
"promptTokens": 123,
"completionTokens": 123,
"reasoningTokens": 123,
"cacheWriteTokens": 123,
"cacheReadTokens": 123,
"eventCount": 123,
"provider": "<string>",
"model": "<string>",
"projectId": "<string>",
"sessionId": "<string>",
"day": "2023-11-07T05:31:56Z"
}
]
},
"seededObjectIds": [
"<string>"
],
"artifacts": [
{
"name": "<string>",
"mediaType": "<string>",
"fileId": "<string>",
"sha256": "<string>"
}
],
"summary": {}
},
"quality": {
"value": 123,
"unit": "<string>",
"rubric": "<string>",
"metrics": {}
},
"failure": {
"code": "EVALUATION_SCOPE_MISSING",
"message": "<string>",
"infrastructure": true,
"details": {}
},
"updatedAt": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Get an evaluation sandbox run
Reads lifecycle, quality, evidence, and cleanup state. The Code execution’s own grant or the user credential behind it may read the run. Tokens are returned only to the execution grant while the sandbox is live.
curl --request GET \
--url https://davinci-app.com/api/v2/evaluation-runs/{runId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://davinci-app.com/api/v2/evaluation-runs/{runId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/evaluation-runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/evaluation-runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceProjectId": "<string>",
"status": "provisioning",
"sandbox": {
"projectId": "<string>",
"branchName": "<string>",
"ephemeral": true,
"name": "<string>",
"deleteAfter": "2023-11-07T05:31:56Z"
},
"cleanup": {
"status": "not_started",
"requested": true,
"requestedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"grantsRevoked": 1,
"projectDeleted": true,
"failure": {
"code": "EVALUATION_SCOPE_MISSING",
"message": "<string>",
"infrastructure": true,
"details": {}
}
},
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"testId": "<string>",
"testRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"codeExecutionId": "<string>",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataPlane": {
"url": "<string>",
"token": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"connectionId": "<string>",
"ownerId": "<string>",
"userId": "<string>",
"projectKey": "<string>",
"operations": [
"<string>"
],
"purpose": "evaluation"
},
"evidence": {
"capturedAt": "2023-11-07T05:31:56Z",
"transcript": {
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taskId": "<string>",
"source": "live",
"status": "no_session",
"entryCount": 1,
"messages": [
{
"index": 1,
"role": "user",
"kind": "<string>",
"text": "<string>",
"timestamp": 123,
"messageId": "<string>",
"tool": {
"name": "<string>",
"status": "<string>",
"params": "<unknown>",
"result": "<unknown>",
"error": "<string>"
}
}
]
},
"tree": {
"objectCount": 1,
"tree": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"parent": "<string>",
"childrenCount": 1
}
]
},
"usage": {
"scope": "account",
"asOf": "2023-11-07T05:31:56Z",
"totals": {
"credits": 123,
"promptTokens": 123,
"completionTokens": 123,
"reasoningTokens": 123,
"cacheWriteTokens": 123,
"cacheReadTokens": 123,
"eventCount": 123
},
"projectId": "<string>",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"groupBy": "model",
"groups": [
{
"credits": 123,
"promptTokens": 123,
"completionTokens": 123,
"reasoningTokens": 123,
"cacheWriteTokens": 123,
"cacheReadTokens": 123,
"eventCount": 123,
"provider": "<string>",
"model": "<string>",
"projectId": "<string>",
"sessionId": "<string>",
"day": "2023-11-07T05:31:56Z"
}
]
},
"seededObjectIds": [
"<string>"
],
"artifacts": [
{
"name": "<string>",
"mediaType": "<string>",
"fileId": "<string>",
"sha256": "<string>"
}
],
"summary": {}
},
"quality": {
"value": 123,
"unit": "<string>",
"rubric": "<string>",
"metrics": {}
},
"failure": {
"code": "EVALUATION_SCOPE_MISSING",
"message": "<string>",
"infrastructure": true,
"details": {}
},
"updatedAt": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
The grant injected into a running Code object's container. It delegates the reach of whoever started the execution over the one project the Code object lives in, and it expires with the container.
On this mount it can create, inspect, and clean up the evaluation
sandboxes that execution owns. It cannot select an existing project as a
target, and a sandbox-bound purpose=evaluation grant is refused here so
an evaluation cannot start another one.
Path Parameters
Evaluation-run or Test-run id returned by its create operation.
Response
Current evaluation-run state.
ready means the target is pinned and its grant can be used. failed
is an infrastructure failure, not a low quality score. cleaned and
expired are terminal and carry no usable grant.
provisioning, ready, running, cleaning, cleaned, failed, expired Hide child attributes
Hide child attributes
not_started, pending, completed, failed x >= 0Hide child attributes
Hide child attributes
EVALUATION_SCOPE_MISSING, EVALUATION_AGENT_FAILED, EVALUATION_TIMEOUT, EVALUATION_EVIDENCE_MISSING, EVALUATION_OBSERVATION_INVALID, EVALUATION_CLEANUP_FAILED, CODE_EXECUTION_FAILED, TEST_CANCELLED, TEST_RUN_FAILED, TEST_RUN_TIMED_OUT True when no quality verdict may be inferred from this failure.
The Test whose Results Value started the Code, when a Test did. Absent for a Code object run directly.
The Test run that started the Code, when one did.
Headless target session attached to the evaluation data-plane grant.
Everything needed to address the data plane: where to send, what to send with, and the path parameters that are not obvious from the project id alone.
Hide child attributes
Hide child attributes
Base URL for data-plane operations. Names no specific machine, so it stays valid if the project moves.
The grant, dav_gr_…. Returned only here and only once — it is not stored
in recoverable form, so a lost grant is replaced by refreshing the session
rather than looked up.
Pass as the connectionId path parameter on upload.
Pass as the ownerId path parameter.
Pass as the userId path parameter on upload.
Pass as the projectId path parameter. Compound form
{projectId}--{branchName}, since the data plane addresses a branch.
Data-plane operations this grant authorizes.
Target-bound evaluation authority. Ordinary data-plane/execution grants remain denied from agent and git routes; this purpose admits only the target agent, and still denies git.
"evaluation"Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Where the answer came from. live is current; persisted is the copy saved
when a run ended, and so lags a run in progress.
live, persisted, none no_session— the machine has no record of this session; it lapsed or the project restarted. Create a new one.project_not_running— the session is known but its project has unloaded.idle— the session is live and no run has been started.starting— a run is being set up.running— a run is in progress.paused— a run was stopped and can be continued with a new prompt.completed— the run finished.failed— the run ended in an error. The transcript says why.unknown— the machine could not be reached for this field. Retry; anything else in the same response is still valid.
paused, completed, and failed are terminal for a run.
no_session, project_not_running, idle, starting, running, paused, completed, failed, unknown Entries in the whole conversation, not just the returned window.
x >= 0Oldest first. Bounded by limit, taken from the end.
Hide child attributes
Hide child attributes
Position in the whole conversation, so a window can be placed.
x >= 0user, agent text for what was said, thought for the agent's reasoning, tool for a
tool it used, error for a failure it hit. Treat an unrecognized value as
informational rather than as a problem — new kinds can appear.
The content. For a tool entry, the tool's name.
Milliseconds since the epoch.
Present on your own prompts, matching what you sent.
Present only on entries whose kind is tool.
Hide child attributes
Hide child attributes
working while it runs, complete when it succeeded, otherwise the severity
of what went wrong.
The arguments the agent chose. Null when the tool takes none.
What the tool returned. Shape is the tool's own.
Present when the tool failed.
Flat list of project objects excluding the project object itself. New
projects contain reserved Model and Library packages whose parent
is the project id; callers must not assume a parentless node exists.
Hide child attributes
Hide child attributes
Total objects in the project, including the project object itself.
x >= 0Hide child attributes
Hide child attributes
What the numbers cover, determined by the path you called.
account, project, session When the newest counted event was recorded, or null when the scope holds none. This is the honest bound on freshness: the engine reports usage on an interval, so a run's last few seconds may not be included. Null means "nothing here", not "nothing yet" — a scope with no usage looks the same either way, and inventing a timestamp would hide that.
Hide child attributes
Hide child attributes
Credits charged, to six decimal places.
Thinking tokens, charged at the completion rate.
Charged calls counted. Not all of them are token-priced — image generation
and web search are charged per call, so a non-zero credits with zero
tokens is normal rather than a gap.
Present on the project and session reads. Always the bare id.
Present on the session read.
Echoed back when you asked for a breakdown.
model, project, session, day One entry per group, largest spend first — except day, which is
chronological. Absent unless you passed groupBy.
Hide child attributes
Hide child attributes
Credits charged, to six decimal places.
Thinking tokens, charged at the completion rate.
Charged calls counted. Not all of them are token-priced — image generation
and web search are charged per call, so a non-zero credits with zero
tokens is normal rather than a gap.
Present when grouping by model.
Present when grouping by model.
Present when grouping by project.
Present when grouping by session.
Midnight UTC of the day. Present when grouping by day.
Hide child attributes
Hide child attributes
EVALUATION_SCOPE_MISSING, EVALUATION_AGENT_FAILED, EVALUATION_TIMEOUT, EVALUATION_EVIDENCE_MISSING, EVALUATION_OBSERVATION_INVALID, EVALUATION_CLEANUP_FAILED, CODE_EXECUTION_FAILED, TEST_CANCELLED, TEST_RUN_FAILED, TEST_RUN_TIMED_OUT True when no quality verdict may be inferred from this failure.