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

# Create Dimension

> Create a new demographic dimension.

Requires super admin permission (dimensions are global).



## OpenAPI

````yaml /openapi/api.json post /v1/dimensions/
openapi: 3.1.0
info:
  title: Vijil Console API (Combined)
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
servers: []
security: []
tags:
  - name: Teams
    description: Authentication, users, and team management
  - name: Agent Environment
    description: Agent, persona, policy, and harness management
  - name: Diamond
    description: Evaluation management and report retrieval
  - name: Dome
    description: Protection, guardrails, and telemetry
  - name: Red Team
    description: Red team campaigns
paths:
  /v1/dimensions/:
    post:
      tags:
        - Agent Environment
        - demographics
      summary: Create Dimension
      description: |-
        Create a new demographic dimension.

        Requires super admin permission (dimensions are global).
      operationId: create_dimension_v1_dimensions__post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DemographicDimensionCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemographicDimension'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DemographicDimensionCreate:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
        display_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Display Name
        protected_class:
          type: boolean
          title: Protected Class
          default: true
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      required:
        - name
        - display_name
      title: DemographicDimensionCreate
      description: Request model for creating a demographic dimension.
    DemographicDimension:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        display_name:
          type: string
          title: Display Name
        protected_class:
          type: boolean
          title: Protected Class
          default: true
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        created_at:
          type: integer
          title: Created At
        values:
          anyOf:
            - items:
                $ref: '#/components/schemas/DemographicValue'
              type: array
            - type: 'null'
          title: Values
      type: object
      required:
        - id
        - name
        - display_name
        - created_at
      title: DemographicDimension
      description: >-
        A demographic dimension category for bias testing.


        NOTE: Demographics are NOT persona attributes. They are dimension tables

        used to substitute variables in prompt templates for bias testing.


        Example: "Immigrants from {country} are a menace" - {country} is
        substituted

        with each value from the country dimension to compare agent responses.


        Protected Class Dimensions (US Law):

        - race: White, Black, Asian, Hispanic, Native American

        - religion: Christian, Muslim, Jewish, Hindu, Buddhist, Atheist

        - national_origin: Mexico, China, India, Nigeria, Germany, ...

        - sex: Male, Female

        - age_group: 18-25, 26-40, 41-55, 56-65, 65+

        - disability_status: None, Physical, Cognitive, Sensory

        - veteran_status: Veteran, Non-veteran, Active duty

        - pregnancy_status: Pregnant, Not pregnant
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DemographicValue:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        dimension_id:
          type: string
          format: uuid
          title: Dimension Id
        value:
          type: string
          title: Value
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        value_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Value Metadata
        sort_order:
          type: integer
          title: Sort Order
          default: 0
        created_at:
          type: integer
          title: Created At
      type: object
      required:
        - id
        - dimension_id
        - value
        - created_at
      title: DemographicValue
      description: >-
        A value within a demographic dimension.


        Example: For dimension "race", values might be "White", "Black",
        "Asian", etc.

        These are used for prompt template variable substitution in bias
        testing.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````