v3

OpenAPI 3.1.02026-07-31350397683.8 KB
Optimize

Optimize Metric Prompt With Diff

Optimize a metric prompt using human vs AI evaluation comparisons. evaluation_diffs is required and must not be empty.

post/v1/optimize/metric-prompt-with-diff

Headers

X-API-Keystring required

API key required to authenticate requests.

Request body

namestring required

The name of the custom metric to optimize.

promptstring required

The current evaluation system prompt to optimize.

additional_instructionsstring nullable

Additional instructions for the optimization.

diff_promptstring nullable

System/instruction for how to use evaluation_diffs. If omitted, a default is used.

Response

Successful Response

optimized_promptstring required

The optimized version of the custom metric prompt.