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

# Create Evaluation Chart

> Create a new evaluation chart for an evaluation or evaluation group



## OpenAPI

````yaml https://api.dev-sgp.scale.com/openapi-versions/v5/openapi.json post /v5/evaluation-charts
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/evaluation-charts:
    post:
      tags:
        - Evaluation Charts
      summary: Create Evaluation Chart
      description: Create a new evaluation chart for an evaluation or evaluation group
      operationId: POST-V5-/v5/evaluation-charts
      parameters:
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluationChartCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluationChart'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    EvaluationChartCreateRequest:
      anyOf:
        - $ref: '#/components/schemas/CreateChartInEvaluationRequest'
        - $ref: '#/components/schemas/CreateChartInEvaluationGroupRequest'
      title: EvaluationChartCreateRequest
    EvaluationChart:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the evaluation chart
        object:
          type: string
          const: evaluation_chart
          title: Object
          default: evaluation_chart
        evaluation_id:
          title: Evaluation Id
          description: Evaluation ID
          type: string
        evaluation_group_id:
          title: Evaluation Group Id
          description: Evaluation group ID
          type: string
        title:
          type: string
          title: Title
          description: Chart title
        type:
          $ref: '#/components/schemas/EvaluationChartTypeEnum'
          description: Chart type
        account_id:
          type: string
          title: Account Id
          description: Account that owns this chart
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the chart was created
        deleted_at:
          title: Deleted At
          description: When the chart was soft-deleted
          type: string
          format: date-time
        columns:
          title: Columns
          description: Column mappings. Populated with 'columns' view.
          items:
            $ref: '#/components/schemas/EvaluationChartColumnResponse'
          type: array
      type: object
      required:
        - id
        - title
        - type
        - account_id
        - created_at
      description: Response model for evaluation chart
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreateChartInEvaluationRequest:
      properties:
        target:
          $ref: '#/components/schemas/EvaluationChartTarget'
          description: Evaluation or evaluation group that owns the chart
        title:
          type: string
          maxLength: 128
          title: Title
          description: Chart title
        type:
          $ref: '#/components/schemas/EvaluationChartTypeEnum'
          description: Chart type
        columns:
          items:
            $ref: '#/components/schemas/EvaluationChartColumn'
          type: array
          minItems: 1
          title: Columns
          description: >-
            Column mappings. Columns must include evaluation_id when targeting
            an evaluation group.
      type: object
      required:
        - target
        - title
        - type
        - columns
      title: CreateChartInEvaluationRequest
      description: Create a chart scoped to a single evaluation.
    CreateChartInEvaluationGroupRequest:
      properties:
        target:
          $ref: '#/components/schemas/EvaluationChartTarget'
          description: Evaluation or evaluation group that owns the chart
        title:
          type: string
          maxLength: 128
          title: Title
          description: Chart title
        type:
          $ref: '#/components/schemas/EvaluationChartTypeEnum'
          description: Chart type
        columns:
          items:
            $ref: '#/components/schemas/EvaluationChartColumn'
          type: array
          minItems: 1
          title: Columns
          description: >-
            Column mappings. Columns must include evaluation_id when targeting
            an evaluation group.
      type: object
      required:
        - target
        - title
        - type
        - columns
      title: CreateChartInEvaluationGroupRequest
      description: Create a chart scoped to an evaluation group.
    EvaluationChartTypeEnum:
      type: string
      enum:
        - bar
        - histogram
      title: EvaluationChartTypeEnum
      description: Chart types for evaluation visualizations
    EvaluationChartColumnResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the column mapping
        object:
          type: string
          const: evaluation_chart.column
          title: Object
          default: evaluation_chart.column
        evaluation_id:
          title: Evaluation Id
          description: Evaluation ID (null for single-eval charts)
          type: string
        column_name:
          type: string
          title: Column Name
          description: Column name
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When this column mapping was created
        deleted_at:
          title: Deleted At
          description: When this column mapping was soft-deleted
          type: string
          format: date-time
        account_id:
          type: string
          title: Account Id
          description: Account that owns this column mapping
      type: object
      required:
        - id
        - column_name
        - created_at
        - account_id
      description: Response model for chart column
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    EvaluationChartTarget:
      properties:
        id:
          type: string
          title: Id
          description: ID of the evaluation or evaluation group
        type:
          $ref: '#/components/schemas/EvaluationChartTargetType'
          description: 'Target type: evaluation or evaluation_group'
      type: object
      required:
        - id
        - type
      title: EvaluationChartTarget
      description: Target entity that owns the chart
    EvaluationChartColumn:
      properties:
        evaluation_id:
          title: Evaluation Id
          description: Evaluation ID (required when targeting an evaluation group)
          type: string
        column_name:
          type: string
          title: Column Name
          description: Column name from the evaluation dataset
      type: object
      required:
        - column_name
      title: EvaluationChartColumn
      description: Column mapping for the chart
    EvaluationChartTargetType:
      type: string
      enum:
        - evaluation
        - evaluation_group
      title: EvaluationChartTargetType
      description: Scopes a chart to a single evaluation or an evaluation group
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````