본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

AI PII Sanitizer 플러그인 OpenAPI 명세

원문 보기 위키 갱신

AI PII Sanitizer 플러그인 OpenAPI 명세 (AI PII Sanitizer Plugin OpenAPI Specification)

이 문서는 AI PII Sanitizer 플러그인과 함께 작동하는 PII 서비스가 노출하는 API를 OpenAPI 3.1.1 사양으로 정의하고 있어요. /llm/v1/sanitize 엔드포인트는 요청 본문에서 PII(개인 식별 정보) 엔티티를 감지해 익명화된 결과를 반환해요. /llm/v1/status 엔드포인트는 서비스 상태를 확인하는 헬스 체크를 제공하고요. 익명화 방식은 합성(synthetic) 값 또는 자리표시자(placeholder) 중 선택할 수 있고, 사용자 정의 탐지 패턴도 지정할 수 있어요

출처: 문서

본문

---
openapi: 3.1.1
info:
  title: PII Server API
  description: 'This spec describes the APIs that are exposed by AI PII service that
    can work with AI Sanitizer Plugin to sanitize PII entities in the requests.

    '
  version: 1.0.0
paths:
  "/llm/v1/sanitize":
    post:
      summary: sanitize the PII entities in the request body
      description: Returns the sanitized results.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - text
              - anonymize
              - options
              properties:
                text:
                  type: string
                anonymize:
                  type: array
                  items:
                    "$ref": "#/components/schemas/PIIEntity"
                options:
                  type: object
                  properties:
                    redact_type:
                      type: string
                      enum:
                      - synthetic
                      - placeholder
                custom_patterns:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      regex:
                        type: string
                      score:
                        type: number
      responses:
        '200':
          description: Service is healthy
          content:
            application/json:
              schema:
                type: object
                properties:
                  text:
                    type: string
                  identified_pii:
                    type: array
                    items:
                      "$ref": "#/components/schemas/PIIEntity"
                  anonymized_pii:
                    type: array
                    items:
                      "$ref": "#/components/schemas/PIIEntity"
                  detected_languages:
                    type: array
                    items:
                      type: string
                  duration:
                    type: number
        '400':
          description: when error happens
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
  "/llm/v1/status":
    get:
      summary: Health check
      description: Returns the health status of the service.
      responses:
        '200':
          description: Service is healthy
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
components:
  schemas:
    PIIEntity:
      enum:
      - general
      - phone
      - creditcard
      - crypto
      - date
      - ip
      - nrp
      - ssn
      - url
      - medical
      - driverlicense
      - passport
      - bank
      - nationalid
      - custom
      - credentials
      - all
      - all_and_credentials

관련 리소스

더 알아보기 (Learn more)