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

# Plagiarism

> Winston AI's plagiarism API is a powerful tool designed to check text for plagiarism by scouring the internet for similar content. It queries multiple websites and compares the input text with the content found on these websites. This can be particularly useful in academic settings, content creation, legal scenarios or any other situation where originality of content is required.



## OpenAPI

````yaml POST /v2/plagiarism
openapi: 3.0.1
info:
  title: Winston AI API
  description: Winston AI API specification
  license:
    name: MIT
  version: 4.11.4
servers:
  - url: https://api.gowinston.ai/
security:
  - bearerAuth: []
paths:
  /v2/plagiarism:
    post:
      description: >-
        Winston AI's plagiarism API is a powerful tool designed to check text
        for plagiarism by scouring the internet for similar content. It queries
        multiple websites and compares the input text with the content found on
        these websites. This can be particularly useful in academic settings,
        content creation, legal scenarios or any other situation where
        originality of content is required.
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlagiarismV2'
        required: true
      responses:
        '200':
          description: Plagiarism response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plagiarism-response-v2'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: BAD_REQUEST
                  description:
                    type: string
                    default: >-
                      The request was invalid and could not be processed. Make
                      sure you pass valid arguments.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: UNAUTHORIZED
                  description:
                    type: string
                    default: >-
                      Pass a valid API key in the Authorization header as a
                      Bearer token.
        '402':
          description: Payment Required (insufficient credits)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: PAYMENT_REQUIRED
                  description:
                    type: string
                    default: >-
                      Insufficient credits. Make sure you have enough credits to
                      make the request.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: FORBIDDEN
                  description:
                    type: string
                    default: >-
                      The request was forbidden. Make sure you pass a valid URL
                      or document that we can access.
        '415':
          description: Unsupported Media Type
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: UNSUPPORTED_MEDIA_TYPE
                  description:
                    type: string
                    default: >-
                      The request content type is not supported. Make sure you
                      pass a valid content type.
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: TOO_MANY_REQUESTS
                  description:
                    type: string
                    default: You have exceeded the rate limit. Please try again later.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: INTERNAL_SERVER_ERROR
                  description:
                    type: string
                    default: An unexpected error occurred. Please try again later.
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: SERVICE_UNAVAILABLE
                  description:
                    type: string
                    default: >-
                      The service is currently unavailable. Please try again
                      later.
components:
  schemas:
    PlagiarismV2:
      required:
        - text
      type: object
      properties:
        text:
          description: >-
            The text to be scanned. This is required unless you provide a
            website or file. Each request must contain at least 100 characters
            and no more than 120,000 characters.
          type: string
        file:
          description: >-
            A publicly accessible URL to a file to scan. The file must be
            publicly available online (not a local file path) so our API can
            access it. The file must be in plain .pdf, .doc or .docx format. The
            file has priority over the text, so if you give a text and a file,
            it's the file that will be scanned.
          type: string
        website:
          description: >-
            A website URL to scan. If you supply a website, the API will fetch
            the content of the website and scan it. The website must be publicly
            accessible. It's important to know that the website has priority
            over the text and the file, so if you give a text, a file and a
            website, it's the website that will be scanned.
          type: string
        excluded_sources:
          description: >-
            An array of sources to exclude from the scan. The excluded sources
            won't be taken into account for the plagiarism scan score. Sources
            can either be a domain name like `example.com` or a url like
            `https://example.com`. If you specify a domain name, the API will
            exclude all the urls belonging to that domain and all subdomains.
            Sources are case-sensitive.
          type: array
          items:
            type: string
        language:
          description: |-
            2 letter language code. Default: auto. 

             If you put 'auto', the API will automatically detect the language of the text. 

             The plagiarism-checking endpoint currently supports 47 languages: 
             English (en), French (fr), German (de), Spanish (es), Portuguese (pt), Dutch (nl), Italian (it), Chinese (zh), Norwegian (no), Swedish (sv), Danish (da), Finnish (fi), Icelandic (is), Irish (ga), Polish (pl), Czech (cs), Slovak (sk), Romanian (ro), Hungarian (hu), Bulgarian (bg), Croatian (hr), Greek (el), Turkish (tr), Hebrew (he), Arabic (ar), Vietnamese (vi), Malay (ms), Thai (th), Korean (ko), Japanese (ja), Russian (ru), Kazakh (kk), Georgian (ka), Tagalog (tl), Hindi (hi), Bengali (bn), Persian (fa), Urdu (ur), Indonesian (id), Malayalam (ml), Tamil (ta), Telugu (te), Kannada (kn), Marathi (mr), Gujarati (gu), Ukrainian (uk) and Albanian (sq).
          type: string
          default: auto
        country:
          description: >-
            The country code of the country where the text was written. We
            accept all country codes. Default: us.
          type: string
          default: us
    Plagiarism-response-v2:
      type: object
      properties:
        status:
          type: number
          description: >-
            HTTP status code representing the result of the plagiarism scan
            request.
        scanInformation:
          type: object
          description: Some basic scan information about the request.
          properties:
            service:
              type: string
              description: Name of the service used for the request.
            scanTime:
              type: string
              description: Timestamp when the scan was conducted.
            inputType:
              description: >-
                The type of input we scan based on the input you provided. It
                can be `text | file | website` .
              type: string
            language:
              type: string
              description: The language of the text detected.
        result:
          type: object
          description: >-
            The result field is the main object that contains the results of the
            plagiarism scan.
          properties:
            score:
              type: number
              description: >-
                Plagiarism score indicating the percentage of plagiarized
                content in the scanned text.
            sourceCounts:
              type: number
              description: >-
                Number of sources identified during the scan that contain
                plagiarized content.
            textWordCounts:
              type: number
              description: Total number of words in the scanned text.
            totalPlagiarismWords:
              type: number
              description: Total number of words identified as plagiarized.
            identicalWordCounts:
              type: number
              description: >-
                Number of words identified as plagiarized that are identical to
                the source content.
            similarWordCounts:
              type: number
              description: >-
                Number of words identified as plagiarized that are similar to
                the source content.
        sources:
          type: array
          description: >-
            The sources field is an array which contains one or more objects,
            each corresponding to a different website where matching content has
            been found.
          items:
            type: object
            properties:
              score:
                type: number
                description: The plagiarism percentage score for this specific source.
              canAccess:
                type: boolean
                description: Indicates if we were able to access the source content.
              url:
                type: string
                description: URL of the source where plagiarism was found.
              title:
                type: string
                description: Title of the source document.
              plagiarismWords:
                type: number
                description: >-
                  Number of words in the input text identified as plagiarized
                  from this source found.
              identicalWordCounts:
                type: number
                description: >-
                  Number of words identified as plagiarized that are identical
                  to the source content.
              similarWordCounts:
                type: number
                description: >-
                  Number of words identified as plagiarized that are similar to
                  the source content.
              totalNumberOfWords:
                type: number
                description: Total number of words in the input text.
              author:
                type: string
                description: Author of the source document.
                nullable: true
              description:
                type: string
                description: Description or summary of the source content.
                nullable: true
              publishedDate:
                type: number
                description: Timestamp of when the source was published.
                nullable: true
              source:
                type: string
                description: Name of the source or publication.
                nullable: true
              citation:
                type: boolean
                description: Indicates if the source is cited in the input text.
              plagiarismFound:
                type: array
                description: >-
                  List of plagiarism sequence found in the input text from this
                  source.
                items:
                  type: object
                  properties:
                    startIndex:
                      type: number
                      description: Starting index of the plagiarized sequence in the text.
                    endIndex:
                      type: number
                      description: Ending index of the plagiarized sequence in the text.
                    sequence:
                      type: string
                      description: The plagiarized text sequence.
                      nullable: true
              is_excluded:
                type: boolean
                description: >-
                  Indicates if this source should be excluded from the final
                  results.
        attackDetected:
          type: object
          description: >-
            An object with two boolean properties indicating if the text
            contains zero-width spaces or homoglyph attacks.
          properties:
            zero_width_space:
              type: boolean
              description: Indicates if the text contains zero-width spaces.
            homoglyph_attack:
              type: boolean
              description: Indicates if the text contains homoglyph attacks.
        text:
          type: string
          description: The input text that was used for the plagiarism scan.
        similarWords:
          type: array
          description: List of similar words found in the input text.
          items:
            type: object
            properties:
              index:
                type: number
                description: Starting index of the similar word in the document.
              word:
                type: string
                description: The similar word.
        citations:
          type: array
          description: >-
            The citations is an array which contains one or more objects, each
            corresponding to a different website where the website was cited in
            the provided text.
          items:
            type: string
        indexes:
          type: array
          description: List of plagiarism sequences found in the input text.
          items:
            type: object
            properties:
              startIndex:
                type: number
                description: Starting index of the plagiarized sequence in the document.
              endIndex:
                type: number
                description: Ending index of the plagiarized sequence in the document.
              sequence:
                type: string
                description: The plagiarized text sequence.
                nullable: true
        credits_used:
          description: >-
            The credits_used field represents the number of credits consumed for
            processing your request. Each word that is processed by the API
            consumes two credits.
          type: integer
        credits_remaining:
          description: >-
            The credits_remaining field shows how many credits you have left in
            your account after your request has been processed.
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````