Replace Span Score

Retrieve, update, and delete individual log scores Endpoints: GET /api/logs/{log_id}/scores/{score_id}/ - Retrieve a specific score PATCH /api/logs/{log_id}/scores/{score_id}/ - Update a specific score DELETE /api/logs/{log_id}/scores/{score_id}/ - Delete a specific score Args (PATCH): - numerical_value (Optional): Updated numerical score value - string_value (Optional): Updated string score value - boolean_value (Optional): Updated boolean score value - categorical_value (Optional): Updated categorical score values (list of strings) Returns (GET): { "id": "eval_result_unique_id", "created_at": "2024-01-15T10:30:00Z", "type": "llm", "environment": "test", "numerical_value": 4.5, "string_value": "Good quality", "boolean_value": true, "categorical_value": ["excellent"], "is_passed": false, "cost": 0.0, "evaluator_id": null, "evaluator_slug": "custom_evaluator", "log_id": "log_unique_id", "dataset_id": null } Returns (PATCH): { "id": "eval_result_unique_id", "created_at": "2024-01-15T10:30:00Z", "type": "llm", "environment": "test", "numerical_value": 4.8, "string_value": "Excellent quality", "boolean_value": true, "categorical_value": ["excellent"], "is_passed": false, "cost": 0.0, "evaluator_id": null, "evaluator_slug": "custom_evaluator", "log_id": "log_unique_id", "dataset_id": null }

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

OR
AuthorizationBearer

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

Path parameters

log_idstringRequired
score_idstringRequired

Request

This endpoint expects an object.
organizationintegerRequired
unique_organization_idstringOptional<=255 characters
updated_byinteger or nullOptional
typeenumOptional
  • llm - Llm
  • code - Code
  • human - Human
  • function - Function
  • human_numerical - Human Numerical
  • human_categorical - Human Categorical
  • human_boolean - Human Boolean
  • human_text - Human Text
  • custom - Custom
environmentstringOptional1-30 characters
numerical_valuedoubleOptional
string_valuestringOptional>=1 character
boolean_valueboolean or nullOptional
categorical_valuelist of stringsOptional
json_valuestringOptional>=1 character
is_passedbooleanOptional
costdoubleOptional
evaluator_idstringOptional>=1 character
evaluator_slugstringOptional<=255 characters
scorerstringOptional1-255 characters
log_idstringOptional>=1 character
prompt_idstringOptional>=1 character
prompt_version_numberintegerOptional
dataset_idstringOptional>=1 character
statusenumOptional
  • pending - Pending
  • completed - Completed
  • failed - Failed
error_messagestring or nullOptional

Response

idstringRead-only
created_atdatetimeRead-only
typeenum
  • llm - Llm
  • code - Code
  • human - Human
  • function - Function
  • human_numerical - Human Numerical
  • human_categorical - Human Categorical
  • human_boolean - Human Boolean
  • human_text - Human Text
  • custom - Custom
environmentstring<=30 characters
numerical_valuedouble
string_valuestring
boolean_valueboolean or null
categorical_valuelist of strings
json_valuestring
is_passedboolean
costdouble
evaluator_idstring
evaluator_slugstring<=255 characters
scorerstring<=255 characters
log_idstring
prompt_idstring
prompt_version_numberinteger
dataset_idstring
statusenum
  • pending - Pending
  • completed - Completed
  • failed - Failed
error_messagestring or null