API tutorials
BenchDX API
Retrieve every benchmark prompt and submit the corresponding target-model response.
Use this two-request pattern for an existing BenchDX evaluation. Fetch the full prompt list, run every prompt against the target model, then post each answer with its original trace ID.
1. Get benchmark prompts
/api/evaluation/promptsAllReturns every prompt assigned to the selected BenchDX evaluation.
| Location | Name | Type | Required |
|---|---|---|---|
| Query | evaluationId | number | Yes |
| Header | Authorization | Bearer PAT | Yes |
curl -X GET \
"https://trial.aidx.pro/api/evaluation/promptsAll?evaluationId={evaluation_id}" \
-H "Authorization: Bearer {personal_access_token}"{
"code": "req_01J...",
"message": "Operation Succeed",
"data": [
{
"traceId": "trace_id_1",
"content": "prompt_1"
},
{
"traceId": "trace_id_2",
"content": "prompt_2"
}
],
"success": true
}2. Run the target model
Send each returned content value to the target model or application. Preserve the matching traceId while the target request is in flight.
3. Submit a benchmark response
/api/evaluation/responseRecords one target-model answer for a BenchDX trace.
| Location | Name | Type | Required |
|---|---|---|---|
| Form | evaluationId | number | Yes |
| Form | traceId | string | Yes |
| Form | llmResponse | string | Yes |
| Header | Authorization | Bearer PAT | Yes |
The API accepts multipart/form-data and application/x-www-form-urlencoded parameters.
curl -X POST \
"https://trial.aidx.pro/api/evaluation/response" \
-H "Authorization: Bearer {personal_access_token}" \
-F "evaluationId={evaluation_id}" \
-F "traceId={trace_id}" \
-F "llmResponse={model_response}"{
"code": "req_01J...",
"message": "Operation Succeed",
"data": "Operation success",
"success": true
}4. Verify progress
Open Process Details in AIDX and confirm traces move from Awaiting Trigger through Sent, Responded, and Evaluated. An evaluation can complete only after all required test cases are evaluated or explicitly handled.