Configure Score
Configure scoring for a Table sheet. This endpoint updates the configuration and returns whether recalculation is required; it does not queue score calculation. Requests are scoped to the workspace associated with the API key; table, sheet, column, cell, operation, and version IDs must belong to that workspace.
column_ids or column_names for standard boolean or numeric scoring. Column names must be unique in the sheet.
Use score_type with score_config for explicit configuration. Supported scoring modes are auto, boolean, numeric, and custom; score_type is required when you pass score_config.
For custom scoring, pass code and optionally code_language (PYTHON by default, or JAVASCRIPT). Boolean scoring also supports true_values, false_values, and assertion_aggregation (all, any, or mean).
This endpoint updates the configuration and returns requires_recalculation; call the recalculation endpoint to queue score calculation.
Changing score configuration creates a new sheet version. The response returns version, the current sheet version count after the configuration update.Authorizations
Headers
Your PromptLayer API key. The key's workspace scopes table resources for this request.
Body
Scoring mode. Required when score_config is provided.
auto, boolean, numeric, custom Explicit score configuration.
Column IDs to score.
Column titles to score. Titles must be unique in the sheet.
Custom scoring code.
1 - 50000PYTHON, JAVASCRIPT Values treated as true for boolean scoring.
Values treated as false for boolean scoring.
Aggregation mode for assertion-style boolean scoring.
all, any, mean Response
Score configuration updated.
Returned as null by this endpoint. Use the recalculation endpoint to queue score calculation.
Always true after updating the score configuration.

