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

# Create a pronunciation rule



## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/tts/intervention/entries
openapi: 3.0.0
info:
  title: VoxNexus API
  version: 1.0.0
  description: VoxNexus API Documentation
  contact:
    name: API Support
    url: https://voxnexus.ai/support
    email: support@voxnexus.ai
servers:
  - url: https://api.voxnexus.ai
security: []
paths:
  /v1/tts/intervention/entries:
    post:
      tags:
        - tts-intervention
      summary: Create a pronunciation rule
      operationId: createInterventionEntry
      parameters:
        - in: query
          name: model_id
          required: true
          schema:
            type: string
          description: >-
            Used only to resolve the provider; rules belong to the authenticated
            user.
        - in: query
          name: voice_id
          required: true
          schema:
            type: string
          description: >-
            Used only to resolve the provider; rules belong to the authenticated
            user.
        - in: query
          name: language
          required: false
          schema:
            type: string
          description: >-
            Used only to resolve the provider; rules belong to the authenticated
            user.
        - in: query
          name: intervention_group_id
          required: false
          schema:
            $ref: '#/components/schemas/InterventionGroupID'
          description: >-
            Select a group owned by the authenticated user. For GET, PATCH, and
            DELETE, omission selects default. For POST, query or body may select
            the group; both must match if supplied, and omission of both selects
            default. PATCH and DELETE verify that the rule belongs to this
            group.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InterventionEntryInput'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InterventionEntry'
        '400':
          description: Invalid parameters or intervention not supported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Rule conflict or rule limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Request rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Intervention service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    InterventionGroupID:
      type: string
      minLength: 1
      maxLength: 64
      pattern: ^[A-Za-z0-9_-]+$
      description: >-
        Opaque group ID owned by the authenticated user; default is the built-in
        group. Use the ID returned by group creation.
      example: default
    InterventionEntryInput:
      type: object
      additionalProperties: false
      properties:
        intervention_group_id:
          allOf:
            - $ref: '#/components/schemas/InterventionGroupID'
          description: >-
            Optional group selection. If query and body both specify a group
            they must match; defaults to default when both are omitted.
        match_type:
          type: string
          enum:
            - literal
            - regex
          default: literal
        action:
          type: string
          enum:
            - replace
            - phoneme
            - spellout
          default: replace
        lang:
          type: string
          maxLength: 64
          description: >-
            Canonical rule language in BCP 47 language[-Script]. Region aliases
            normalize to their language scope; zh is Chinese of any script,
            zh-Hans and zh-Hant restrict the script, and und means any language
            by product convention.
          default: und
        pattern:
          type: string
          description: >-
            Literal patterns allow up to 64 characters; regex patterns allow up
            to 256.
          minLength: 1
          maxLength: 256
        replacement:
          type: string
          description: >-
            Required and nonempty for replace or phoneme; must be null or
            omitted for spellout. Regex rules cannot use phoneme.
          nullable: true
          maxLength: 256
        case_sensitive:
          type: boolean
          description: >-
            Applies only to literal rules. For regex, specify case handling in
            the pattern.
          default: true
        whole_word:
          type: boolean
          description: >-
            Applies only to literal rules. For regex, specify boundaries in the
            pattern.
          default: true
        priority:
          type: integer
          minimum: -32768
          maximum: 32767
          default: 0
        status:
          type: string
          enum:
            - draft
            - active
            - inactive
          default: draft
        note:
          type: string
          maxLength: 1024
          default: ''
      required:
        - pattern
    InterventionEntry:
      type: object
      additionalProperties: false
      properties:
        intervention_group_id:
          allOf:
            - $ref: '#/components/schemas/InterventionGroupID'
          description: Group that owns this rule.
        match_type:
          type: string
          enum:
            - literal
            - regex
          default: literal
        action:
          type: string
          enum:
            - replace
            - phoneme
            - spellout
          default: replace
        lang:
          type: string
          maxLength: 64
          description: >-
            Canonical rule language in BCP 47 language[-Script]. Region aliases
            normalize to their language scope; zh is Chinese of any script,
            zh-Hans and zh-Hant restrict the script, and und means any language
            by product convention.
          enum:
            - zh
            - zh-Hans
            - zh-Hant
            - en
            - fr
            - und
          default: und
        pattern:
          type: string
          description: >-
            Literal patterns allow up to 64 characters; regex patterns allow up
            to 256.
          minLength: 1
          maxLength: 256
        replacement:
          type: string
          description: >-
            Required and nonempty for replace or phoneme; must be null or
            omitted for spellout. Regex rules cannot use phoneme.
          nullable: true
          maxLength: 256
        case_sensitive:
          type: boolean
          description: >-
            Applies only to literal rules. For regex, specify case handling in
            the pattern.
          default: true
        whole_word:
          type: boolean
          description: >-
            Applies only to literal rules. For regex, specify boundaries in the
            pattern.
          default: true
        priority:
          type: integer
          minimum: -32768
          maximum: 32767
          default: 0
        status:
          type: string
          enum:
            - draft
            - active
            - inactive
          default: draft
        note:
          type: string
          maxLength: 1024
          default: ''
        id:
          type: integer
          format: int64
          minimum: 1
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - intervention_group_id
        - match_type
        - action
        - lang
        - pattern
        - replacement
        - case_sensitive
        - whole_word
        - priority
        - status
        - note
        - id
        - created_at
        - updated_at
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: Invalid request parameters
        code:
          type: string
          description: Error code
          example: INVALID_REQUEST
        details:
          type: string
          description: Detailed error information (optional)
          example: Detailed error information
        request_id:
          type: string
          description: Request ID (optional)
          example: req_1234567890
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Authenticate using X-Api-Key header

````

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