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

# Create Run Gold Label

> Create a new gold label for a run

Create a new gold label for a specific run. A gold label can contain either a text value or an object value, but not both. When using object values, you can optionally specify if it's a partial gold label.


## OpenAPI

````yaml POST /v1/run/{id}/gold-labels
openapi: 3.1.0
info:
  title: re-factor API Reference
  version: 1.0.0
  description: API specification for re-factor system based on schema definitions
servers: []
security:
  - BearerAuth: []
paths:
  /v1/run/{id}/gold-labels:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The ID of the run
    post:
      summary: Create gold label for a run
      description: Create a new gold label for a specific run
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - output_resource_name
              properties:
                output_resource_name:
                  type: string
                text_value:
                  type: string
                object_value:
                  type: object
                  additionalProperties: true
                object_value_is_partial:
                  type: boolean
      responses:
        '201':
          description: Gold label created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunGoldLabel'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    RunGoldLabel:
      type: object
      required:
        - id
        - account_id
        - run_id
        - output_resource_name
        - created_at
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the gold label
        account_id:
          type: string
          description: ID of the account that owns this gold label
        run_id:
          type: string
          format: uuid
          description: ID of the run this gold label belongs to
        output_resource_name:
          type: string
          description: Name of the output resource this gold label is for
        text_value:
          type: string
          nullable: true
          description: Text value for the gold label
        object_value:
          type: object
          nullable: true
          additionalProperties: true
          description: Object value for the gold label
        object_value_is_partial:
          type: boolean
          nullable: true
          description: Whether the object value is a partial gold label
        created_by:
          type: string
          nullable: true
          description: ID of the user who created the gold label
        created_at:
          type: string
          format: date-time
          description: When the gold label was created
        updated_by:
          type: string
          nullable: true
          description: ID of the user who last updated the gold label
        updated_at:
          type: string
          format: date-time
          description: When the gold label was last updated
  responses:
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
    NotFoundError:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````