> ## 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.

# Export a metric revision as a document

> Everything needed to re-run this revision's judge outside Galtea: the assembled system and user prompts with placeholders, the output schema, the model and the generation settings. A revision is immutable, so the document describes the revision asked for, never the head of its family. A metric whose judge prompt Galtea does not build cannot be exported.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json get /metrics/{id}/export
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/{id}/export:
    get:
      tags:
        - metrics
      summary: Export a metric revision as a document
      description: >-
        Everything needed to re-run this revision's judge outside Galtea: the
        assembled system and user prompts with placeholders, the output schema,
        the model and the generation settings. A revision is immutable, so the
        document describes the revision asked for, never the head of its family.
        A metric whose judge prompt Galtea does not build cannot be exported.
      operationId: exportMetric
      parameters:
        - schema:
            type: string
            description: Metric revision ID
            example: metric_123
          required: true
          description: Metric revision ID
          name: id
          in: path
      responses:
        '200':
          description: Metric export
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricExport'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Metric not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    MetricExport:
      type: object
      properties:
        metricId:
          type: string
        metricGroupId:
          type: string
          description: Shared by every revision of this metric.
        name:
          type: string
        source:
          type: string
          nullable: true
          enum:
            - SELF_HOSTED
            - FULL_PROMPT
            - PARTIAL_PROMPT
            - HUMAN_EVALUATION
            - GEVAL
            - DEEPEVAL
            - DETERMINISTIC
            - null
        definition:
          type: string
          nullable: true
          description: >-
            Selects the evaluator implementation. Reaches the evaluator as
            `metric_name`.
        judgePrompt:
          type: string
          nullable: true
          description: >-
            As stored. A legacy full-prompt metric ignores it in favour of its
            own built-in criteria.
        evaluationParams:
          type: array
          items:
            type: string
        areEvalParamsTop:
          type: boolean
          nullable: true
          description: >-
            Whether the parameters block precedes the judge prompt. Unset reads
            as true.
        evaluatorModelName:
          type: string
          nullable: true
          description: >-
            As stored. `gatewayModelName` is the spelling the LLM gateway
            receives.
          example: GPT-4.1
        gatewayModelName:
          type: string
          nullable: true
          description: The model name the judge is called with.
          example: gpt-4.1
        judgeGenerationSettings:
          type: object
          nullable: true
          properties:
            temperature:
              type: number
              nullable: true
              minimum: 0
              example: 0.3
            topP:
              type: number
              nullable: true
              minimum: 0
              maximum: 1
              example: 0.9
            maxOutputTokens:
              type: integer
              nullable: true
              minimum: 1
              example: 512
            reasoningEffort:
              type: string
              nullable: true
              example: low
          additionalProperties: false
        prompts:
          type: array
          items:
            $ref: '#/components/schemas/AssembledPrompt'
        createdAt:
          type: string
          format: date-time
          nullable: true
      required:
        - metricId
        - metricGroupId
        - name
        - source
        - definition
        - judgePrompt
        - evaluationParams
        - areEvalParamsTop
        - evaluatorModelName
        - gatewayModelName
        - judgeGenerationSettings
        - prompts
        - createdAt
    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.