> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview the prompt a judge configuration produces

> Assembles the prompt for a configuration that has not been saved, with `{placeholders}` in place of a test case. Reads no model and calls none, so it consumes no credits. A configuration usually produces two shapes, because turn count comes from the session.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /metrics/preview-prompt
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /metrics/preview-prompt:
    post:
      tags:
        - metrics
      summary: Preview the prompt a judge configuration produces
      description: >-
        Assembles the prompt for a configuration that has not been saved, with
        `{placeholders}` in place of a test case. Reads no model and calls none,
        so it consumes no credits. A configuration usually produces two shapes,
        because turn count comes from the session.
      operationId: previewMetricPrompt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewMetricPromptBody'
      responses:
        '200':
          description: Assembled prompts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricPromptPreview'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    PreviewMetricPromptBody:
      type: object
      properties:
        metricSource:
          type: string
          enum:
            - FULL_PROMPT
            - PARTIAL_PROMPT
          description: Only the sources whose judge prompt Galtea builds can be previewed.
        definition:
          type: string
          nullable: true
          minLength: 1
          description: Selects the evaluator implementation. Absent means a custom judge.
          example: custom_judge
        judgePrompt:
          type: string
          nullable: true
          maxLength: 20000
          description: Required by a custom judge. An empty one is refused with a 400.
        evaluationParams:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 64
          maxItems: 20
          default: []
        areEvalParamsTop:
          type: boolean
          default: true
          description: Whether the parameters block precedes the judge prompt.
      required:
        - metricSource
    MetricPromptPreview:
      type: object
      properties:
        prompts:
          type: array
          items:
            $ref: '#/components/schemas/AssembledPrompt'
      required:
        - prompts
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
    AssembledPrompt:
      type: object
      properties:
        turnScope:
          type: string
          enum:
            - one_turn
            - many_turns
            - any
          description: >-
            Which conversations this shape applies to. Turn count comes from the
            session, not the metric, so most metrics have both a one_turn and a
            many_turns shape; `any` means this metric is only ever sent one way.
        systemPrompt:
          type: string
          description: >-
            The system message Galtea writes. For some models the
            structured-output library adds schema instructions to it; see
            `outputSchema`.
        userPrompt:
          type: string
          description: >-
            Sent as the user message, with `{placeholders}` where a test case
            supplies the values.
        outputSchema:
          type: object
          additionalProperties:
            nullable: true
          description: The JSON schema the judge must answer with.
      required:
        - turnScope
        - systemPrompt
        - userPrompt
        - outputSchema
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.