> ## 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.

# AI text detection

> The Human Score is a metric used by Winston AI to estimate the likelihood that a given piece of content was generated by an AI tool versus being written by a human.



## OpenAPI

````yaml POST /v2/ai-content-detection
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/ai-content-detection:
    post:
      description: >-
        The Human Score is a metric used by Winston AI to estimate the
        likelihood that a given piece of content was generated by an AI tool
        versus being written by a human.
      requestBody:
        description: The Ai content detection request V2
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiContentDetection'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiContentDetection-response'
        '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:
    AiContentDetection:
      type: object
      required:
        - text
      properties:
        text:
          description: >-
            The text to scan. It is required except if you supply a website or a
            file. Minimum 300 characters. Texts under 600 characters may produce
            unreliable results and should be avoided. Maximum 150 000 characters
            per request.
          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
        version:
          description: >-
            The model version to use. Our latest and most accurate version is
            "4.14". Using "latest" will make sure you are always using the
            latest version. Options: 4.14, 4.13, 4.12, 4.11, 4.10, 4.9, 4.8,
            4.7, 4.6, 4.5, 4.4, 4.3, 4.2, 4.1, 4.0, 3.1, 3.0, 2.0, latest.
            Default: 4.14. Note: Version 3.1 is identical to 3.0 but preserves
            newline characters in the returned sentences, while 3.0 removes
            them.
          type: string
        sentences:
          description: >-
            Whether the response should include an array of sentences and their
            scores. Default: true.
          type: boolean
        language:
          description: >-
            2 letter language code. Default: auto. 

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

             Supported languages:

            English (en), French (fr), Spanish (es), Portuguese (pt), Dutch
            (nl), German (de), Polish (pl), Italian (it), Romanian (ro),
            Indonesian (id), Tagalog (tl), Russian (ru), Bulgarian (bg) and
            Chinese simplified (zh).
          type: string
          default: auto
    AiContentDetection-response:
      type: object
      properties:
        status:
          description: >-
            This is a standard HTTP status code. A 200 status means the request
            was successful.
          type: integer
        score:
          description: >-
            A "human" score between 0 and 100. A low score means our system
            believes that the text is written by AI, and a higher score means
            that the system believes that the text is written by a Human.
          type: integer
        sentences:
          description: >-
            This is an array of sentence objects. Each object contains two
            fields: text and score. Please note that assessments on smaller
            samples are less accurate than the general score.
          type: object
          properties:
            text:
              description: >-
                The text field contains the actual text of the sentence that was
                analyzed.
              type: string
            score:
              description: >-
                The score field within each sentence object indicates the
                sentiment score assigned to that particular sentence by the AI.
              type: integer
        input:
          description: >-
            The type of input we scan based on the input you provided. It can be
            `text | file | website` .
          type: string
        attack_detected:
          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.
        readability_score:
          description: >-
            A readability score between 0 and 100 that indicates how easy it is
            to read and understand the text based on the provided language. A
            higher score means the text is more readable and easier to
            understand.
          type: integer
        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 one credit.
          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
        version:
          description: >-
            The model version used to generate the prediction based on the input
            you provided.
          type: string
        language:
          description: >-
            The language of the text detected. It can be `en | fr | es | pt | nl
            | de | pl | it | ro | id | tl | ru | bg | zh`.
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````