v4

latestOpenAPI 3.1.02026-08-019681,1012.0 MB
code-metric-generation

Create Code Metric Generation

Generate scorer code from a user message (natural language, existing code, or combination).

Creates a background job that calls an LLM with the code metric generation system prompt. Returns a generation ID for polling.

Response: 202 Accepted with generation ID.

post/code-metric-generations

Request body

user_messagestring required

Natural language, code, or combination

node_typestring nullable

Selected scoreable node type (llm, retriever, trace, agent, workflow, tool, session)

output_type'boolean' | 'categorical' | 'count' | 'discrete' | 'freeform' | 'percentage' | 'multilabel' | 'retrieved_chunk_list_boolean' | 'boolean_multilabel'

Enumeration of output types.

model_namestring nullable

Model alias to use for generation. Defaults to best available.

Response

Successful Response

idstring uuid4 required
status'generating' | 'completed' | 'failed' required