API tutorials

BenchDX API

Read a paged trace manifest, claim each benchmark prompt, and submit the model response.

Use this flow for an existing BenchDX evaluation that you will execute with your own client. All three endpoints require the PAT and routing headers.

Use the account buttons above to switch all request examples. Personal requests omit X-Tenant-Id; Organization requests include it. See the account comparison.

1. Read the trace manifest

GET/api/evaluation/trace-manifests/{evaluationId}

Lists trace identifiers, order, and status without exposing prompt content.

LocationNameFormat
PathevaluationIdRequired positive integer.
QuerypageSizeOptional integer from 1 to 100; defaults to 100.
QuerypageTokenServer-provided continuation token; use the returned nextLink.
Read the first manifest page · Personal accountcURL
curl --request GET \
  'https://trial.aidx.pro/api/evaluation/trace-manifests/123' \
  --header 'Authorization: Bearer <PERSONAL_ACCOUNT_PAT>' \
  --header 'X-Workspace-Id: <PERSONAL_WORKSPACE_ID>'
Example final page, containing one traceJSON
{
  "code": "req_example",
  "message": "Operation Succeed",
  "data": {
    "evaluationId": 123,
    "items": [
      {
        "traceId": "40000000-0000-4000-8000-000000000081",
        "order": 1,
        "status": "PROCESSING"
      }
    ],
    "total": 1
  },
  "success": true
}

The response envelope is code, message, data, and success. Read traces from data.items; each item contains only traceId, order, and status. The global order starts at 1 and continues across pages. data.total is the total trace count.

The first request needs no pagination arguments. When data.nextLink is present, GET that absolute URL unchanged with the same headers. Treat its token as opaque. Stop when nextLink is omitted. The manifest contains no prompt or content field.

2. Claim one prompt

POST/api/evaluation/trace-claims

Returns the frozen prompt for one trace in an evaluation you own.

JSON fieldTypeRequirement
evaluationIdnumberRequired positive integer; use 123, not "123".
traceIdstringRequired UUID copied from the manifest.

Set Content-Type: application/json. These are the only two body fields; additional keys are rejected. No claim ID, run ID, attempt, or idempotency key is required.

Claim a manifest trace · Personal accountcURL
curl --request POST \
  'https://trial.aidx.pro/api/evaluation/trace-claims' \
  --header 'Authorization: Bearer <PERSONAL_ACCOUNT_PAT>' \
  --header 'X-Workspace-Id: <PERSONAL_WORKSPACE_ID>' \
  --header 'Content-Type: application/json' \
  --data '{"evaluationId":123,"traceId":"40000000-0000-4000-8000-000000000081"}'
First successful claimJSON
{
  "code": "req_example",
  "message": "Operation Succeed",
  "data": {
    "prompt": "The frozen prompt for this trace",
    "alreadyClaimed": false
  },
  "success": true
}

Read data.prompt and data.alreadyClaimed. Repeating an allowed claim for the same evaluation and trace returns the same frozen prompt with alreadyClaimed: true, without increasing the cumulative claimed amount. Responses use Cache-Control: no-store.

3. Run your target model

Send data.prompt from the claim to your model or application. Keep the original evaluationId and traceId paired with the returned answer. The claim response does not repeat those IDs.

4. Submit the benchmark response

POST/api/evaluation/response

Submits one BenchDX answer using form parameters.

Form fieldValue
evaluationIdThe same positive evaluation ID, encoded as form text.
traceIdThe original manifest trace UUID.
llmResponseThe non-empty target-model answer.

Use application/x-www-form-urlencoded or multipart/form-data. This endpoint reads form parameters, not a JSON request body. --data-urlencode safely encodes special characters and sets the URL-encoded form content type.

Submit a BenchDX answer · Personal accountcURL
curl --request POST \
  'https://trial.aidx.pro/api/evaluation/response' \
  --header 'Authorization: Bearer <PERSONAL_ACCOUNT_PAT>' \
  --header 'X-Workspace-Id: <PERSONAL_WORKSPACE_ID>' \
  --data-urlencode 'evaluationId=123' \
  --data-urlencode 'traceId=40000000-0000-4000-8000-000000000081' \
  --data-urlencode 'llmResponse=<MODEL_RESPONSE>'
Successful response submissionJSON
{
  "code": "req_example",
  "message": "Operation success",
  "data": null,
  "success": true
}

The success message is Operation success and data is null. Check both HTTP status and success. An existing non-empty answer is not replaced by another submission.

5. Verify progress

Use Process Details to confirm that each answer was recorded and evaluated. HTTP success acknowledges submission; it does not mean scoring or the final report is complete. If a response times out, inspect the trace before deciding whether to resubmit.

Manifest status values

The current manifest uses the exact values below. Interface labels may differ; use the API values when filtering traces in a script.

API statusMeaning
PROCESSINGNormally an unclaimed trace awaiting execution; also the fallback for an unrecognized state.
ClaimedThe prompt has been claimed through the public flow.
RUNNINGA current execution has claimed the trace.
ASSESSMENT_PROGRESSA response has been received and assessment is in progress.
SUCCEEDEDThe trace has been assessed.
TARGET_ERRORThe trace execution failed; inspect Process Details.
RETRY_PENDINGA retry is pending; the public claim flow must not take over the retry.

Handle unknown states conservatively. A status is not permission to claim; the server also checks ownership, execution authority, and the current reservation.