Skip to main content
POST
/
v1
/
score
Create Score
curl --request POST \
  --url https://api.agentmark.co/v1/score \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'X-Agentmark-App-Id: <x-agentmark-app-id>' \
  --data '
{
  "resourceId": "span_abc123",
  "score": 0.95,
  "label": "high_quality",
  "reason": "Response addresses all user requirements clearly.",
  "name": "quality",
  "type": "llm_eval"
}
'
{
  "message": "Score created successfully",
  "id": "550e8400-e29b-41d4-a716-446655440000"
}

Authorizations

Authorization
string
header
required

Your AgentMark API key. Create one in the dashboard under Settings > API Keys.

Example: Authorization: Bearer am_live_abc123

Headers

X-Agentmark-App-Id
string
required

Your application ID. Found in the dashboard under Settings > General.

Example:

"app_abc123"

Body

application/json
resourceId
string
required

ID of the span or trace to score.

Example:

"span_abc123"

score
number
required

Numerical score value.

Example:

0.95

label
string
required

Label for the score.

Example:

"high_quality"

reason
string
required

Explanation for the score.

Example:

"Response addresses all user requirements clearly."

name
string
required

Name of the score metric.

Example:

"quality"

type
string
default:""

Score type identifier.

Example:

"llm_eval"

Response

Score created.

message
string
Example:

"Score created successfully"

id
string<uuid>
Example:

"550e8400-e29b-41d4-a716-446655440000"