> ## 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_3.4.2.json post /v3/process/text/reidentify
openapi: 3.0.2
info:
  title: API Reference
  description: Private AI API Reference
  termsOfService: https://www.private-ai.com/terms-of-use/
  contact:
    url: https://www.private-ai.com/contact/
    email: info@private-ai.com
  version: 3.4.2
servers:
  - url: https://api.private-ai.com/deid
    description: Private AI Demo Server
  - url: http://localhost:8080
    description: Local Server
security: []
paths:
  /v3/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_v3_process_text_reidentify_post
      parameters:
        - required: false
          schema:
            title: X-Api-Key
            type: string
            default: ''
          name: x-api-key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReIdentifyTextRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                title: Response 200 Reidentify Text V3 Process Text Reidentify Post
                type: array
                items:
                  type: string
        '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:
      title: ReIdentifyTextRequest
      required:
        - processed_text
        - entities
      type: object
      properties:
        processed_text:
          title: Processed Text
          type: array
          items:
            type: string
          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:
          title: Entities
          type: array
          items:
            $ref: '#/components/schemas/ReIdentifyTextRequestEntity'
          description: A list of all entities found in the text.
        model:
          title: Model
          type: string
          description: >-
            The LLM that provides the completions. E.g. `gpt3.5-turbo`. While
            optional,                                             this is used
            to improve the re-identification process by accounting for the
            model's                                             unique behaviour
            surrounding redaction markers
      additionalProperties: false
    UserErrorResponseModel:
      title: UserErrorResponseModel
      required:
        - detail
      type: object
      properties:
        detail:
          title: Detail
          anyOf:
            - $ref: '#/components/schemas/ErrorMessage'
            - $ref: '#/components/schemas/ValidationErrorModel'
          description: >-
            The details of the error, usually relating to an input validation
            error
    InternalErrorResponseModel:
      title: InternalErrorResponseModel
      required:
        - detail
      type: object
      properties:
        detail:
          title: Detail
          type: string
          description: >-
            The details of the error, usually relating to an unhandled
            processing error
    ReIdentifyTextRequestEntity:
      title: ReIdentifyTextRequestEntity
      required:
        - processed_text
        - text
      type: object
      properties:
        processed_text:
          title: Processed Text
          type: string
          description: >-
            The redaction marker in `processed_text` corresponding to the
            entity. E.g. `NAME_1`
        text:
          title: Text
          type: string
          description: The entity text. E.g. `Sansa`
      additionalProperties: false
    ErrorMessage:
      title: ErrorMessage
      type: string
      description: An error message
    ValidationErrorModel:
      title: ValidationErrorModel
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        description:
          title: Description
          type: string
          description: User-friendly error message description.
        loc:
          title: Loc
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
          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:
          title: Msg
          type: string
          description: The error message.
        type:
          title: Type
          type: string
          description: The type of error that has been encountered.

````