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

# Compile enabled classifiers into the live router config

> Bake the enabled keyword classifiers into the router YAML (as
``keyword_rules``) and write a new config version, so the router routes on
them. Embedding classifiers are reported but not yet emitted.



## OpenAPI

````yaml post /api/airouter/classifiers/publish
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/airouter/classifiers/publish:
    post:
      tags:
        - AI Router
      summary: Compile enabled classifiers into the live router config
      description: >-
        Bake the enabled keyword classifiers into the router YAML (as

        ``keyword_rules``) and write a new config version, so the router routes
        on

        them. Embedding classifiers are reported but not yet emitted.
      operationId: publish_classifiers_api_airouter_classifiers_publish_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishClassifiersResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    PublishClassifiersResponse:
      properties:
        ok:
          type: boolean
          title: Ok
        version:
          type: integer
          title: Version
        config_path:
          type: string
          title: Config Path
        compiled_count:
          type: integer
          title: Compiled Count
          description: Number of keyword classifiers written to the config.
        skipped_embedding:
          type: integer
          title: Skipped Embedding
          description: Embedding classifiers not yet wired into the router.
          default: 0
      type: object
      required:
        - ok
        - version
        - config_path
        - compiled_count
      title: PublishClassifiersResponse
      description: Result of compiling enabled classifiers into the live router config.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````