v3

OpenAPI 3.1.02026-07-31350397683.8 KB
Optimize

Optimize Metric Prompt

Accept a custom metric prompt and return an optimized version using an LLM. The optimized prompt is clearer, more precise, and easier for evaluators to apply consistently.

post/v1/optimize/metric-prompt

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.

Response

Successful Response

optimized_promptstring required

The optimized version of the custom metric prompt.