PATCH
/api/v1/evals/{runId}Update eval run status
Updates the status of an eval run (used by workers or the SDK EvaluationLogger.finish path). Completed runs (passed/failed/error) are immutable (409). Optional summary carries the final score (clamped 0-1) and totalLatency.
Authentication
Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/settings/api-keys.
Parameters
runId in pathrequiredstringRequest body required
Example
{
"status": "pending",
"summary": {
"score": 0,
"totalLatency": 0
}
}Schema
{
"application/json": {
"schema": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"enum": [
"pending",
"running",
"passed",
"failed",
"error"
]
},
"summary": {
"type": "object",
"properties": {
"score": {
"type": "number",
"description": "Overall score; clamped to 0-1."
},
"totalLatency": {
"type": "number",
"description": "Total run latency (stored as duration)."
}
}
}
}
}
}
}Response
All status codes
200Updated eval run.
400(no description)
401(no description)
403NOT_ORG_MEMBER — caller not a member of the run's org.
404(no description)
409IMMUTABLE_RUN — run already completed.
429(no description)
500Internal Server Error — DB_ERROR.
Code samples
cURL
# {runId} is shown with an EXAMPLE value — replace it with real values.
curl -X PATCH \
https://evalguard.ai/api/v1/evals/00000000-0000-0000-0000-000000000000 \
-H "Authorization: Bearer $EVALGUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "status": "pending", "summary": { "score": 0, "totalLatency": 0 } }'TypeScript
// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — runEval,
// getEval, runSecurityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:
// {runId} is shown with an EXAMPLE value — replace it with real values.
const res = await fetch("https://evalguard.ai/api/v1/evals/00000000-0000-0000-0000-000000000000", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"status": "pending",
"summary": {
"score": 0,
"totalLatency": 0
}
}),
});
console.log(res.status, await res.json());Python
# The Python SDK (pip install evalguardai) exposes TYPED methods on
# EvalGuardClient — run_eval, get_eval, … — not a generic request().
# For an arbitrary endpoint, call it directly:
# {runId} is shown with an EXAMPLE value — replace it with real values.
import os
import requests
headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}
headers["Content-Type"] = "application/json"
response = requests.request(
"PATCH",
"https://evalguard.ai/api/v1/evals/00000000-0000-0000-0000-000000000000",
headers=headers,
json={
"status": "pending",
"summary": {
"score": 0,
"totalLatency": 0
}
},
)
print(response.status_code, response.json())Go
package main
import (
"context"
"fmt"
"net/http"
"os"
"strings"
)
// {runId} is shown with an EXAMPLE value — replace it with real values.
func main() {
body := strings.NewReader(`{"status":"pending","summary":{"score":0,"totalLatency":0}}`)
req, _ := http.NewRequestWithContext(context.Background(), "PATCH", "https://evalguard.ai/api/v1/evals/00000000-0000-0000-0000-000000000000", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
fmt.Println(resp.Status)
}Errors
400401403404409429500