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

# Reidentify Text

> This route is intended to improve integrations with LLMs such as ChatGPT. Entities that are removed prior to sending to the LLM can be re-injected into the response from the LLM to improve user experience.



## OpenAPI

````yaml /openapi/privateai_4.3.0.json post /process/text/reidentify
openapi: 3.1.0
info:
  title: API Reference
  description: Private AI API Reference
  termsOfService: https://www.getlimina.ai/en/terms-of-use
  contact:
    url: https://www.getlimina.ai/en/contact-us
    email: info@getlimina.ai
  version: 4.3.0
servers:
  - url: https://api.private-ai.com/community
    description: Private AI Community API
  - url: https://api.private-ai.com/cloud
    description: Private AI Cloud API
  - url: http://localhost:8080
    description: Local Server
security: []
paths:
  /process/text/reidentify:
    post:
      summary: Reidentify Text
      description: >-
        This route is intended to improve integrations with LLMs such as
        ChatGPT. Entities that are removed prior to sending to the LLM can be
        re-injected into the response from the LLM to improve user experience.
      operationId: reidentify_text_process_text_reidentify_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReidentifyTextRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  type: string
                type: array
                title: Response 200 Reidentify Text Process Text Reidentify Post
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponseModel'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalErrorResponseModel'
        4XX:
          description: Client Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponseModel'
components:
  schemas:
    ReidentifyTextRequest:
      properties:
        processed_text:
          items:
            type: string
          type: array
          title: Processed Text
          description: >-
            The text with redaction markers. The markers will be replaced with
            the entity texts.                                                
            E.g. `Hi [NAME_1], nice to meet you.`
        entities:
          items:
            $ref: '#/components/schemas/ReidentifyTextRequestEntity'
          type: array
          title: Entities
          description: A list of all entities found in the text.
        model:
          type: string
          title: Model
          description: >-
            The LLM that provides the completions. E.g. `gpt3.5-turbo`. Whilst
            optional,                                             this is used
            to improve the re-identification process by accounting for the
            model's                                             unique behaviour
            surrounding redaction markers
        reidentify_sensitive_fields:
          type: boolean
          title: Reidentify Sensitive Fields
          description: >-
            When this parameter is set to False, the re-identifier will mask
            fields ['BANK_ACCOUNT', 'CREDIT_CARD', 'CREDIT_CARD_EXPIRATION',
            'CVV', 'ROUTING_NUMBER', 'ACCOUNT_NUMBER', 'DRIVER_LICENSE',
            'HEALTHCARE_NUMBER', 'PASSPORT_NUMBER', 'PASSWORD', 'SSN',
            'VEHICLE_ID'] with '#' instead of re-identifying
            them.                                                         The
            last quarter of CREDIT_CARD will be re-identified. When the
            parameter is set to True, all fields will be
            re-identified.                                                         
          default: true
        project_id:
          type: string
          maxLength: 60
          pattern: ^[a-zA-Z0-9\-_\:]*$
          title: Project Id
          description: >-
            Used to categorize requests for reporting purposes. Limited to
            alphanumeric characters or the following special characters :_-
          default: main
      additionalProperties: false
      type: object
      required:
        - processed_text
        - entities
      title: ReidentifyTextRequest
    UserErrorResponseModel:
      properties:
        detail:
          anyOf:
            - $ref: '#/components/schemas/ErrorMessage'
            - $ref: '#/components/schemas/ValidationErrorModel'
          title: Detail
          description: >-
            The details of the error, usually relating to an input validation
            error
      type: object
      required:
        - detail
      title: UserErrorResponseModel
    InternalErrorResponseModel:
      properties:
        detail:
          type: string
          title: Detail
          description: >-
            The details of the error, usually relating to an unhandled
            processing error
      type: object
      required:
        - detail
      title: InternalErrorResponseModel
    ReidentifyTextRequestEntity:
      properties:
        processed_text:
          type: string
          title: Processed Text
          description: >-
            The redaction marker in `processed_text` corresponding to the
            entity. E.g. `NAME_1`
        text:
          type: string
          title: Text
          description: The entity text. E.g. `Sansa`
      additionalProperties: false
      type: object
      required:
        - processed_text
        - text
      title: ReidentifyTextRequestEntity
    ErrorMessage:
      type: string
      title: ErrorMessage
      description: An error message
    ValidationErrorModel:
      properties:
        description:
          type: string
          title: Description
          description: User-friendly error message description.
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Loc
          description: >-
            The location where the error has occurred. This could be location of
            a character if the error is a parsing error, or it could be a value
            in the request if there is a validation error.
        msg:
          type: string
          title: Msg
          description: The error message.
        type:
          type: string
          title: Type
          description: The type of error that has been encountered.
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationErrorModel

````