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

# Advanced AI image Detection

> Runs an advanced forensic analysis on a public image URL. The API authenticates the caller with a bearer token, checks the user's credit balance, analyzes the image, charges 500 credits after a successful analysis, and returns a structured forensic report.



## OpenAPI

````yaml POST /v2/advanced-image-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/advanced-image-detection:
    post:
      description: >-
        Runs an advanced forensic analysis on a public image URL. The API
        authenticates the caller with a bearer token, checks the user's credit
        balance, analyzes the image, charges 500 credits after a successful
        analysis, and returns a structured forensic report.
      requestBody:
        description: The Advanced Image Detection request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedImageDetectionRequest'
        required: true
      responses:
        '200':
          description: Advanced Image Detection response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedImageDetectionResponse'
        '400':
          description: >-
            Bad Request — image_url is missing, empty, malformed, not a string,
            or fails public URL validation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: Invalid URL provided
                  description:
                    type: string
                    default: The URL provided is not a valid public image URL.
        '401':
          description: >-
            Unauthorized — the Authorization header is missing, malformed, or
            the token is unknown.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: Unauthorized
                  description:
                    type: string
                    default: >-
                      Missing or invalid authentication token, please provide a
                      valid token in the Authorization header.
        '403':
          description: Forbidden — the user does not have at least 500 credits.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: Insufficient credits
                  description:
                    type: string
                    default: >-
                      The user does not have enough credits to perform this
                      action.
        '500':
          description: >-
            Internal Server Error — the analysis pipeline failed or did not
            produce a successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    default: >-
                      Error while analyzing image, please try again later or
                      contact support
components:
  schemas:
    AdvancedImageDetectionRequest:
      type: object
      required:
        - image_url
      properties:
        image_url:
          description: >-
            Public HTTP or HTTPS URL of the image to analyze. The API rejects
            empty values, non-string values, URLs without a hostname, URLs with
            embedded credentials, `localhost`, `.localhost`, and direct private
            or reserved IP addresses.
          type: string
          example: https://example.com/image.png
    AdvancedImageDetectionResponse:
      type: object
      properties:
        status:
          type: integer
          description: >-
            Internal analysis status from the image analysis pipeline. The
            external HTTP status for a successful API request is 200 OK.
          example: 200
        cost:
          type: integer
          description: >-
            Number of credits charged for this API request. Current value is
            500.
          example: 500
        language:
          type: string
          description: Language used for the generated analysis text.
          example: en
        title:
          type: string
          description: Short generated title describing the analyzed image.
          example: Portrait of a Person
        tags:
          type: array
          description: >-
            Tags extracted or inferred from the image metadata and analysis
            pipeline.
          items:
            type: string
          example:
            - portrait
            - face
        tool_used:
          type: array
          description: >-
            List of internal forensic tool IDs used during the analysis.
            Possible values include `classify_image`, `extract_metadata`,
            `ela_image`, `residual_noise_maps`, `edge_anomaly_heat_map`, and
            `cfa_pattern_analysis`.
          items:
            type: string
          example:
            - classify_image
            - extract_metadata
            - ela_image
        label:
          type: string
          description: Final classification label for the image.
          enum:
            - AI-Generated
            - Human
          example: AI-Generated
        confidence:
          type: string
          description: Confidence level for the final classification.
          enum:
            - High
            - Moderate
            - Low
          example: High
        authenticity:
          type: string
          description: Final authenticity assessment.
          enum:
            - Authentic
            - Manipulated
          example: Manipulated
        conclusion:
          type: string
          description: Short final conclusion summarizing the forensic result.
          example: The image shows strong indicators of AI generation.
        analysis:
          type: string
          description: >-
            Complete human-readable forensic analysis, including a summary of
            the tools used and their findings.
        tools_used_analysis:
          type: array
          description: >-
            Per-tool analysis results. Each item contains the tool ID, a
            generated explanation of that tool's result, and the underlying tool
            output.
          items:
            type: object
            properties:
              id:
                type: string
                description: >-
                  Internal ID of the forensic tool. Examples:
                  `extract_metadata`, `classify_image`, `ela_image`.
                example: extract_metadata
              analysis:
                type: string
                description: >-
                  Natural-language explanation of what the tool result
                  indicates.
                example: The metadata is stripped of EXIF and C2PA information.
              result:
                description: >-
                  Structured tool output when the tool returns data, such as
                  metadata or classification scores. For generated image
                  artifacts (e.g. ELA heatmaps), this is a temporary presigned
                  S3 URL valid for 5 minutes.
                oneOf:
                  - type: object
                  - type: string
        balance:
          type: integer
          description: >-
            User's remaining credit balance after the successful request is
            charged.
          example: 9500
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````