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

# Analyze Amazon research evidence

> Run free deterministic price, economics, tagged-review and opportunity-gate analyses.

This operation creates no Run and makes no Provider call. Source tokens are checked against the current Workspace and Key policy. Prices use one time-weighted series with explicit gaps, thresholds and definition boundaries. Costs remain supplied assumptions; unknown costs stay null. Review counts describe only the deduplicated sample. Opportunity ratings are analyst judgments subject to evidence gates, including comparable price series. source\_charge\_usd reports existing data costs separately from the free analysis.


## OpenAPI

````yaml /openapi.json post /v1/solutions/gtm/amazon_research/analyze
openapi: 3.1.0
info:
  title: Glasser
  version: 0.0.1
  description: >-
    One key, no contract, pay per call, across paid APIs bought wholesale. Every
    response carries x-request-id; every error body carries the same envelope.
servers:
  - url: https://api.glasser.ai
security: []
tags:
  - name: Solutions
  - name: Endpoints
  - name: Runs
  - name: Balance
paths:
  /v1/solutions/gtm/amazon_research/analyze:
    post:
      tags:
        - Solutions
      summary: Analyze Amazon research evidence
      description: >-
        Free deterministic analysis of authorized price history, supplied unit
        economics, tagged review samples or opportunity evidence gates. This
        operation creates no Runs and calls no Providers. Price and review
        result tokens are authenticated against the current Workspace and Key
        policy. Supplied costs, qualitative tags and evidence judgments stay
        explicitly attributed to the caller. Unknown costs remain unknown;
        missing evidence prevents launch readiness. charge_usd is always 0.00;
        source_charge_usd reports the existing data Runs separately.
      operationId: gtm-amazon-analysis
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    analysis:
                      type: string
                      enum:
                        - price_history
                    token:
                      type: string
                      minLength: 1
                      maxLength: 16384
                    price_type:
                      type: string
                      enum:
                        - AMAZON
                        - NEW
                        - LISTPRICE
                    from_at:
                      anyOf:
                        - type: string
                          description: ISO-8601 UTC timestamp
                          format: date-time
                        - type: 'null'
                    to_at:
                      anyOf:
                        - type: string
                          description: ISO-8601 UTC timestamp
                          format: date-time
                        - type: 'null'
                    minimum_change_percent:
                      anyOf:
                        - type: string
                          description: >-
                            Exact non-negative percentage value (15.00 means
                            15%), with 2 to 6 decimal places.
                          pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          maxLength: 24
                        - type: 'null'
                    minimum_change_amount:
                      anyOf:
                        - type: string
                          description: >-
                            Exact non-negative decimal amount in the specified
                            currency, with 2 to 6 decimal places. No currency
                            conversion.
                          pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          maxLength: 24
                        - type: 'null'
                    group_tolerance_amount:
                      anyOf:
                        - type: string
                          description: >-
                            Exact non-negative decimal amount in the specified
                            currency, with 2 to 6 decimal places. No currency
                            conversion.
                          pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          maxLength: 24
                        - type: 'null'
                    minimum_available_hours:
                      anyOf:
                        - type: integer
                          minimum: 1
                        - type: 'null'
                    unavailable_break_hours:
                      anyOf:
                        - type: integer
                          minimum: 1
                        - type: 'null'
                  required:
                    - analysis
                    - token
                    - price_type
                  additionalProperties: false
                - type: object
                  properties:
                    analysis:
                      type: string
                      enum:
                        - economics
                    currency:
                      type: string
                      pattern: ^[A-Z]{3}$
                    base:
                      type: object
                      properties:
                        selling_price:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        cogs:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        inbound_freight:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        duties:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        referral_fee:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        fulfillment_fee:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        returns_warranty:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        discounts:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        advertising:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                      required:
                        - selling_price
                        - cogs
                        - inbound_freight
                        - duties
                        - referral_fee
                        - fulfillment_fee
                        - returns_warranty
                        - discounts
                        - advertising
                      additionalProperties: false
                    downside:
                      type: object
                      properties:
                        selling_price:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        cogs:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        inbound_freight:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        duties:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        referral_fee:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        fulfillment_fee:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        returns_warranty:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        discounts:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                        advertising:
                          anyOf:
                            - type: string
                              description: >-
                                Exact non-negative decimal amount in the
                                specified currency, with 2 to 6 decimal places.
                                No currency conversion.
                              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              maxLength: 24
                            - type: 'null'
                      required:
                        - selling_price
                        - cogs
                        - inbound_freight
                        - duties
                        - referral_fee
                        - fulfillment_fee
                        - returns_warranty
                        - discounts
                        - advertising
                      additionalProperties: false
                    evidence_notes:
                      type: array
                      items:
                        type: string
                  required:
                    - analysis
                    - currency
                    - base
                    - downside
                    - evidence_notes
                  additionalProperties: false
                - type: object
                  properties:
                    analysis:
                      type: string
                      enum:
                        - reviews
                    country:
                      type: string
                      minLength: 1
                    tokens:
                      type: array
                      items:
                        type: string
                        minLength: 1
                        maxLength: 16384
                    supplied_reviews:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 1
                          asin:
                            type: string
                            pattern: ^[A-Z0-9]{10}$
                          url:
                            anyOf:
                              - type: string
                              - type: 'null'
                          title:
                            anyOf:
                              - type: string
                              - type: 'null'
                          text:
                            type: string
                            minLength: 1
                          rating:
                            anyOf:
                              - anyOf:
                                  - type: number
                                  - type: string
                                    enum:
                                      - Infinity
                                      - '-Infinity'
                                      - NaN
                              - type: 'null'
                          published_at:
                            anyOf:
                              - type: string
                              - type: 'null'
                          date_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          verified_purchase:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                          vine:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                          language:
                            anyOf:
                              - type: string
                              - type: 'null'
                          variation_asin:
                            anyOf:
                              - type: string
                              - type: 'null'
                          variant_attributes:
                            type: array
                            items:
                              type: string
                        required:
                          - id
                          - asin
                          - url
                          - title
                          - text
                          - rating
                          - published_at
                          - date_text
                          - verified_purchase
                          - vine
                          - language
                          - variation_asin
                          - variant_attributes
                        additionalProperties: false
                    sampling_design:
                      type: string
                      enum:
                        - recent_pages
                        - user_supplied
                        - rating_stratified
                        - random
                        - time_stratified
                    sampling_notes:
                      type: string
                    themes:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            minLength: 1
                          kind:
                            type: string
                            enum:
                              - product_defect
                              - shipping
                              - seller_authenticity
                              - price
                              - support
                              - user_care
                              - purchase_reason
                              - other
                          supporting_review_ids:
                            type: array
                            items:
                              type: string
                              minLength: 1
                          counterexample_review_ids:
                            type: array
                            items:
                              type: string
                              minLength: 1
                          interpretation:
                            anyOf:
                              - type: string
                              - type: 'null'
                          action_to_test:
                            anyOf:
                              - type: string
                              - type: 'null'
                          ambiguity:
                            anyOf:
                              - type: string
                              - type: 'null'
                          confidence:
                            type: string
                            enum:
                              - low
                              - medium
                              - high
                              - unknown
                        required:
                          - name
                          - kind
                          - supporting_review_ids
                          - counterexample_review_ids
                          - interpretation
                          - action_to_test
                          - ambiguity
                          - confidence
                        additionalProperties: false
                  required:
                    - analysis
                    - country
                    - tokens
                    - supplied_reviews
                    - sampling_design
                    - sampling_notes
                    - themes
                  additionalProperties: false
                - type: object
                  properties:
                    analysis:
                      type: string
                      enum:
                        - opportunity
                    country:
                      type: string
                      minLength: 1
                    candidate:
                      type: string
                      minLength: 1
                    requested_stage:
                      type: string
                      enum:
                        - stop
                        - investigate
                        - insufficient
                        - launch_case
                    ratings:
                      anyOf:
                        - type: object
                          properties:
                            demand_signal:
                              type: integer
                              minimum: 0
                              maximum: 3
                            competition_room:
                              type: integer
                              minimum: 0
                              maximum: 3
                            differentiation_evidence:
                              type: integer
                              minimum: 0
                              maximum: 3
                            overall_opportunity:
                              type: integer
                              minimum: 0
                              maximum: 3
                          required:
                            - demand_signal
                            - competition_room
                            - differentiation_evidence
                            - overall_opportunity
                          additionalProperties: false
                        - type: 'null'
                    evidence:
                      type: object
                      properties:
                        demand_sources:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        independent_demand:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        comparable_asins:
                          type: array
                          items:
                            type: string
                            pattern: ^[A-Z0-9]{10}$
                        comparable_offer_gap:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        pain_sources:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        independent_pain_evidence:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        price_history:
                          type: array
                          items:
                            type: object
                            properties:
                              asin:
                                type: string
                                pattern: ^[A-Z0-9]{10}$
                              country:
                                type: string
                                minLength: 1
                              price_type:
                                type: string
                                enum:
                                  - AMAZON
                                  - NEW
                                  - LISTPRICE
                              source:
                                type: string
                                minLength: 1
                              series_verified:
                                anyOf:
                                  - type: boolean
                                  - type: 'null'
                            required:
                              - asin
                              - country
                              - price_type
                              - source
                              - series_verified
                            additionalProperties: false
                        solution_validated:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        category_requirements_checked:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                      required:
                        - demand_sources
                        - independent_demand
                        - comparable_asins
                        - comparable_offer_gap
                        - pain_sources
                        - independent_pain_evidence
                        - price_history
                        - solution_validated
                        - category_requirements_checked
                      additionalProperties: false
                    economics:
                      anyOf:
                        - type: object
                          properties:
                            analysis:
                              type: string
                              enum:
                                - economics
                            currency:
                              type: string
                              pattern: ^[A-Z]{3}$
                            base:
                              type: object
                              properties:
                                selling_price:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                cogs:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                inbound_freight:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                duties:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                referral_fee:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                fulfillment_fee:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                returns_warranty:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                discounts:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                advertising:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                              required:
                                - selling_price
                                - cogs
                                - inbound_freight
                                - duties
                                - referral_fee
                                - fulfillment_fee
                                - returns_warranty
                                - discounts
                                - advertising
                              additionalProperties: false
                            downside:
                              type: object
                              properties:
                                selling_price:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                cogs:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                inbound_freight:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                duties:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                referral_fee:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                fulfillment_fee:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                returns_warranty:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                discounts:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                                advertising:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact non-negative decimal amount in the
                                        specified currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                      maxLength: 24
                                    - type: 'null'
                              required:
                                - selling_price
                                - cogs
                                - inbound_freight
                                - duties
                                - referral_fee
                                - fulfillment_fee
                                - returns_warranty
                                - discounts
                                - advertising
                              additionalProperties: false
                            evidence_notes:
                              type: array
                              items:
                                type: string
                          required:
                            - analysis
                            - currency
                            - base
                            - downside
                            - evidence_notes
                          additionalProperties: false
                        - type: 'null'
                    next_validation:
                      type: string
                      minLength: 1
                  required:
                    - analysis
                    - country
                    - candidate
                    - requested_stage
                    - ratings
                    - evidence
                    - economics
                    - next_validation
                  additionalProperties: false
        required: true
      responses:
        '200':
          description: AmazonAnalysisResult
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AmazonAnalysisResult'
        '400':
          description: ValidationFailed
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ValidationFailedEncoded'
                  - $ref: '#/components/schemas/ValidationFailedEncoded'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedEncoded'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenEncoded'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundEncoded'
        '429':
          description: RateLimited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitedEncoded'
      security:
        - bearer: []
components:
  schemas:
    AmazonAnalysisResult:
      type: object
      properties:
        analysis:
          type: string
          enum:
            - price_history
            - economics
            - reviews
            - opportunity
        result_status:
          type: string
          enum:
            - success
            - no_result
            - pending
            - error
        output:
          anyOf:
            - anyOf:
                - type: object
                  properties:
                    asin:
                      anyOf:
                        - type: string
                        - type: 'null'
                    amazon_domain:
                      anyOf:
                        - type: string
                        - type: 'null'
                    currency:
                      anyOf:
                        - type: string
                        - type: 'null'
                    price_type:
                      type: string
                      enum:
                        - AMAZON
                        - NEW
                        - LISTPRICE
                    from_at:
                      anyOf:
                        - type: string
                        - type: 'null'
                    to_at:
                      anyOf:
                        - type: string
                        - type: 'null'
                    provider_updated_at:
                      anyOf:
                        - type: string
                        - type: 'null'
                    definition_break_at:
                      anyOf:
                        - type: string
                        - type: 'null'
                    thresholds:
                      type: object
                      properties:
                        minimum_change_percent:
                          type: string
                          description: >-
                            Exact non-negative percentage value (15.00 means
                            15%), with 2 to 6 decimal places.
                          pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          maxLength: 24
                        minimum_change_amount:
                          type: string
                          description: >-
                            Exact signed decimal amount in the output currency,
                            with 2 to 6 decimal places. No currency conversion.
                          pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                        group_tolerance_amount:
                          type: string
                          description: >-
                            Exact signed decimal amount in the output currency,
                            with 2 to 6 decimal places. No currency conversion.
                          pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                        minimum_available_hours:
                          type: integer
                        unavailable_break_hours:
                          type: integer
                      required:
                        - minimum_change_percent
                        - minimum_change_amount
                        - group_tolerance_amount
                        - minimum_available_hours
                        - unavailable_break_hours
                      additionalProperties: false
                    median_method:
                      type: string
                      enum:
                        - lower_time_weighted_median
                    percent_rounding:
                      type: string
                      enum:
                        - toward_zero_6_decimals
                    segments_evaluated:
                      type: integer
                    limitations:
                      type: array
                      items:
                        type: string
                    episodes:
                      type: array
                      items:
                        type: object
                        properties:
                          direction:
                            type: string
                            enum:
                              - increase
                              - decrease
                          first_observed_at:
                            type: string
                          end_at:
                            type: string
                          end_reason:
                            type: string
                            enum:
                              - price_changed
                              - unavailable_gap
                              - definition_changed
                              - observation_end
                          open_at_observation_end:
                            type: boolean
                          start_before_window:
                            type: boolean
                          price:
                            type: string
                            description: >-
                              Exact signed decimal amount in the output
                              currency, with 2 to 6 decimal places. No currency
                              conversion.
                            pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          price_min:
                            type: string
                            description: >-
                              Exact signed decimal amount in the output
                              currency, with 2 to 6 decimal places. No currency
                              conversion.
                            pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          price_max:
                            type: string
                            description: >-
                              Exact signed decimal amount in the output
                              currency, with 2 to 6 decimal places. No currency
                              conversion.
                            pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          baseline_price:
                            type: string
                            description: >-
                              Exact signed decimal amount in the output
                              currency, with 2 to 6 decimal places. No currency
                              conversion.
                            pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          previous_available_price:
                            anyOf:
                              - type: string
                                description: >-
                                  Exact signed decimal amount in the output
                                  currency, with 2 to 6 decimal places. No
                                  currency conversion.
                                pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              - type: 'null'
                          amount_vs_baseline:
                            type: string
                            description: >-
                              Exact signed decimal amount in the output
                              currency, with 2 to 6 decimal places. No currency
                              conversion.
                            pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                          percent_vs_baseline:
                            anyOf:
                              - type: string
                                description: >-
                                  Exact signed percentage value (15.00 means
                                  15%), with 2 to 6 decimal places.
                                pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              - type: 'null'
                          amount_vs_previous:
                            anyOf:
                              - type: string
                                description: >-
                                  Exact signed decimal amount in the output
                                  currency, with 2 to 6 decimal places. No
                                  currency conversion.
                                pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              - type: 'null'
                          percent_vs_previous:
                            anyOf:
                              - type: string
                                description: >-
                                  Exact signed percentage value (15.00 means
                                  15%), with 2 to 6 decimal places.
                                pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                              - type: 'null'
                          baseline_from_at:
                            type: string
                          baseline_available_duration_ms:
                            type: integer
                          calendar_duration_ms:
                            type: integer
                          available_duration_ms:
                            type: integer
                          window_available_duration_ms:
                            type: integer
                          has_unavailable_gaps:
                            type: boolean
                          reverted_at:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - direction
                          - first_observed_at
                          - end_at
                          - end_reason
                          - open_at_observation_end
                          - start_before_window
                          - price
                          - price_min
                          - price_max
                          - baseline_price
                          - previous_available_price
                          - amount_vs_baseline
                          - percent_vs_baseline
                          - amount_vs_previous
                          - percent_vs_previous
                          - baseline_from_at
                          - baseline_available_duration_ms
                          - calendar_duration_ms
                          - available_duration_ms
                          - window_available_duration_ms
                          - has_unavailable_gaps
                          - reverted_at
                        additionalProperties: false
                  required:
                    - asin
                    - amazon_domain
                    - currency
                    - price_type
                    - from_at
                    - to_at
                    - provider_updated_at
                    - definition_break_at
                    - thresholds
                    - median_method
                    - percent_rounding
                    - segments_evaluated
                    - limitations
                    - episodes
                  additionalProperties: false
                - type: object
                  properties:
                    currency:
                      type: string
                    input_origin:
                      type: string
                      enum:
                        - user_supplied
                    base:
                      type: object
                      properties:
                        inputs:
                          type: object
                          properties:
                            selling_price:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            cogs:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            inbound_freight:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            duties:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            referral_fee:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            fulfillment_fee:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            returns_warranty:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            discounts:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            advertising:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                          required:
                            - selling_price
                            - cogs
                            - inbound_freight
                            - duties
                            - referral_fee
                            - fulfillment_fee
                            - returns_warranty
                            - discounts
                            - advertising
                          additionalProperties: false
                        total_cost:
                          anyOf:
                            - type: string
                              description: >-
                                Exact signed decimal amount in the output
                                currency, with 2 to 6 decimal places. No
                                currency conversion.
                              pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                            - type: 'null'
                        contribution_margin:
                          anyOf:
                            - type: string
                              description: >-
                                Exact signed decimal amount in the output
                                currency, with 2 to 6 decimal places. No
                                currency conversion.
                              pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                            - type: 'null'
                        contribution_margin_percent:
                          anyOf:
                            - type: string
                              description: >-
                                Exact signed percentage value (15.00 means 15%),
                                with 2 to 6 decimal places.
                              pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                            - type: 'null'
                        missing_inputs:
                          type: array
                          items:
                            type: string
                      required:
                        - inputs
                        - total_cost
                        - contribution_margin
                        - contribution_margin_percent
                        - missing_inputs
                      additionalProperties: false
                    downside:
                      type: object
                      properties:
                        inputs:
                          type: object
                          properties:
                            selling_price:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            cogs:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            inbound_freight:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            duties:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            referral_fee:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            fulfillment_fee:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            returns_warranty:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            discounts:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                            advertising:
                              anyOf:
                                - type: string
                                  description: >-
                                    Exact non-negative decimal amount in the
                                    specified currency, with 2 to 6 decimal
                                    places. No currency conversion.
                                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                  maxLength: 24
                                - type: 'null'
                          required:
                            - selling_price
                            - cogs
                            - inbound_freight
                            - duties
                            - referral_fee
                            - fulfillment_fee
                            - returns_warranty
                            - discounts
                            - advertising
                          additionalProperties: false
                        total_cost:
                          anyOf:
                            - type: string
                              description: >-
                                Exact signed decimal amount in the output
                                currency, with 2 to 6 decimal places. No
                                currency conversion.
                              pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                            - type: 'null'
                        contribution_margin:
                          anyOf:
                            - type: string
                              description: >-
                                Exact signed decimal amount in the output
                                currency, with 2 to 6 decimal places. No
                                currency conversion.
                              pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                            - type: 'null'
                        contribution_margin_percent:
                          anyOf:
                            - type: string
                              description: >-
                                Exact signed percentage value (15.00 means 15%),
                                with 2 to 6 decimal places.
                              pattern: ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                            - type: 'null'
                        missing_inputs:
                          type: array
                          items:
                            type: string
                      required:
                        - inputs
                        - total_cost
                        - contribution_margin
                        - contribution_margin_percent
                        - missing_inputs
                      additionalProperties: false
                    complete:
                      type: boolean
                    evidence_notes:
                      type: array
                      items:
                        type: string
                    limitations:
                      type: array
                      items:
                        type: string
                  required:
                    - currency
                    - input_origin
                    - base
                    - downside
                    - complete
                    - evidence_notes
                    - limitations
                  additionalProperties: false
                - type: object
                  properties:
                    amazon_domain:
                      type: string
                    reviews:
                      type: integer
                    asins:
                      type: array
                      items:
                        type: string
                    sampling_design:
                      type: string
                      enum:
                        - recent_pages
                        - user_supplied
                        - rating_stratified
                        - random
                        - time_stratified
                    sampling_notes:
                      type: string
                    representativeness:
                      type: string
                      enum:
                        - not_established
                    assessment_method:
                      type: string
                      enum:
                        - analyst_tagged_sample
                    themes:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            minLength: 1
                          kind:
                            type: string
                            enum:
                              - product_defect
                              - shipping
                              - seller_authenticity
                              - price
                              - support
                              - user_care
                              - purchase_reason
                              - other
                          supporting_review_ids:
                            type: array
                            items:
                              type: string
                              minLength: 1
                          counterexample_review_ids:
                            type: array
                            items:
                              type: string
                              minLength: 1
                          interpretation:
                            anyOf:
                              - type: string
                              - type: 'null'
                          action_to_test:
                            anyOf:
                              - type: string
                              - type: 'null'
                          ambiguity:
                            anyOf:
                              - type: string
                              - type: 'null'
                          confidence:
                            type: string
                            enum:
                              - low
                              - medium
                              - high
                              - unknown
                          review_mentions:
                            type: integer
                          sample_reviews:
                            type: integer
                          claim_status:
                            type: string
                            enum:
                              - customer_report
                        required:
                          - name
                          - kind
                          - supporting_review_ids
                          - counterexample_review_ids
                          - interpretation
                          - action_to_test
                          - ambiguity
                          - confidence
                          - review_mentions
                          - sample_reviews
                          - claim_status
                        additionalProperties: false
                    limitations:
                      type: array
                      items:
                        type: string
                  required:
                    - amazon_domain
                    - reviews
                    - asins
                    - sampling_design
                    - sampling_notes
                    - representativeness
                    - assessment_method
                    - themes
                    - limitations
                  additionalProperties: false
                - type: object
                  properties:
                    candidate:
                      type: string
                    country:
                      type: string
                    requested_stage:
                      type: string
                      enum:
                        - stop
                        - investigate
                        - insufficient
                        - launch_case
                    decision_stage:
                      type: string
                      enum:
                        - stop
                        - investigate
                        - insufficient
                        - launch_case
                    assessment_method:
                      type: string
                      enum:
                        - analyst_supplied_with_evidence_gates
                    ratings_input:
                      anyOf:
                        - type: object
                          properties:
                            demand_signal:
                              type: integer
                              minimum: 0
                              maximum: 3
                            competition_room:
                              type: integer
                              minimum: 0
                              maximum: 3
                            differentiation_evidence:
                              type: integer
                              minimum: 0
                              maximum: 3
                            overall_opportunity:
                              type: integer
                              minimum: 0
                              maximum: 3
                          required:
                            - demand_signal
                            - competition_room
                            - differentiation_evidence
                            - overall_opportunity
                          additionalProperties: false
                        - type: 'null'
                    ratings_applied:
                      anyOf:
                        - type: object
                          properties:
                            demand_signal:
                              type: integer
                              minimum: 0
                              maximum: 3
                            competition_room:
                              type: integer
                              minimum: 0
                              maximum: 3
                            differentiation_evidence:
                              type: integer
                              minimum: 0
                              maximum: 3
                            overall_opportunity:
                              type: integer
                              minimum: 0
                              maximum: 3
                          required:
                            - demand_signal
                            - competition_room
                            - differentiation_evidence
                            - overall_opportunity
                          additionalProperties: false
                        - type: 'null'
                    evidence:
                      type: object
                      properties:
                        demand_sources:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        independent_demand:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        comparable_asins:
                          type: array
                          items:
                            type: string
                            pattern: ^[A-Z0-9]{10}$
                        comparable_offer_gap:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        pain_sources:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        independent_pain_evidence:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        price_history:
                          type: array
                          items:
                            type: object
                            properties:
                              asin:
                                type: string
                                pattern: ^[A-Z0-9]{10}$
                              country:
                                type: string
                                minLength: 1
                              price_type:
                                type: string
                                enum:
                                  - AMAZON
                                  - NEW
                                  - LISTPRICE
                              source:
                                type: string
                                minLength: 1
                              series_verified:
                                anyOf:
                                  - type: boolean
                                  - type: 'null'
                            required:
                              - asin
                              - country
                              - price_type
                              - source
                              - series_verified
                            additionalProperties: false
                        solution_validated:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        category_requirements_checked:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                      required:
                        - demand_sources
                        - independent_demand
                        - comparable_asins
                        - comparable_offer_gap
                        - pain_sources
                        - independent_pain_evidence
                        - price_history
                        - solution_validated
                        - category_requirements_checked
                      additionalProperties: false
                    economics:
                      anyOf:
                        - type: object
                          properties:
                            currency:
                              type: string
                            input_origin:
                              type: string
                              enum:
                                - user_supplied
                            base:
                              type: object
                              properties:
                                inputs:
                                  type: object
                                  properties:
                                    selling_price:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    cogs:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    inbound_freight:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    duties:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    referral_fee:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    fulfillment_fee:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    returns_warranty:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    discounts:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    advertising:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                  required:
                                    - selling_price
                                    - cogs
                                    - inbound_freight
                                    - duties
                                    - referral_fee
                                    - fulfillment_fee
                                    - returns_warranty
                                    - discounts
                                    - advertising
                                  additionalProperties: false
                                total_cost:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact signed decimal amount in the
                                        output currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                    - type: 'null'
                                contribution_margin:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact signed decimal amount in the
                                        output currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                    - type: 'null'
                                contribution_margin_percent:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact signed percentage value (15.00
                                        means 15%), with 2 to 6 decimal places.
                                      pattern: >-
                                        ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                    - type: 'null'
                                missing_inputs:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - inputs
                                - total_cost
                                - contribution_margin
                                - contribution_margin_percent
                                - missing_inputs
                              additionalProperties: false
                            downside:
                              type: object
                              properties:
                                inputs:
                                  type: object
                                  properties:
                                    selling_price:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    cogs:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    inbound_freight:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    duties:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    referral_fee:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    fulfillment_fee:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    returns_warranty:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    discounts:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                    advertising:
                                      anyOf:
                                        - type: string
                                          description: >-
                                            Exact non-negative decimal amount in the
                                            specified currency, with 2 to 6 decimal
                                            places. No currency conversion.
                                          pattern: >-
                                            ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                          maxLength: 24
                                        - type: 'null'
                                  required:
                                    - selling_price
                                    - cogs
                                    - inbound_freight
                                    - duties
                                    - referral_fee
                                    - fulfillment_fee
                                    - returns_warranty
                                    - discounts
                                    - advertising
                                  additionalProperties: false
                                total_cost:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact signed decimal amount in the
                                        output currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                    - type: 'null'
                                contribution_margin:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact signed decimal amount in the
                                        output currency, with 2 to 6 decimal
                                        places. No currency conversion.
                                      pattern: >-
                                        ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                    - type: 'null'
                                contribution_margin_percent:
                                  anyOf:
                                    - type: string
                                      description: >-
                                        Exact signed percentage value (15.00
                                        means 15%), with 2 to 6 decimal places.
                                      pattern: >-
                                        ^-?(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                                    - type: 'null'
                                missing_inputs:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - inputs
                                - total_cost
                                - contribution_margin
                                - contribution_margin_percent
                                - missing_inputs
                              additionalProperties: false
                            complete:
                              type: boolean
                            evidence_notes:
                              type: array
                              items:
                                type: string
                            limitations:
                              type: array
                              items:
                                type: string
                          required:
                            - currency
                            - input_origin
                            - base
                            - downside
                            - complete
                            - evidence_notes
                            - limitations
                          additionalProperties: false
                        - type: 'null'
                    missing_evidence:
                      type: array
                      items:
                        type: string
                    limitations:
                      type: array
                      items:
                        type: string
                    next_validation:
                      type: string
                  required:
                    - candidate
                    - country
                    - requested_stage
                    - decision_stage
                    - assessment_method
                    - ratings_input
                    - ratings_applied
                    - evidence
                    - economics
                    - missing_evidence
                    - limitations
                    - next_validation
                  additionalProperties: false
            - type: 'null'
        charge_usd:
          type: string
          enum:
            - '0.00'
        source_charge_usd:
          anyOf:
            - type: string
              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
              description: >-
                Exact USD decimal string (min 2, max 6 decimals, one canonical
                spelling). Sum with decimal arithmetic or scale by 10^6 — never
                floats.
            - type: 'null'
        request_charge:
          type: object
          properties:
            charge_usd:
              anyOf:
                - type: string
                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                  description: >-
                    Exact USD decimal string (min 2, max 6 decimals, one
                    canonical spelling). Sum with decimal arithmetic or scale by
                    10^6 — never floats.
                - type: 'null'
              description: >-
                Charge for Runs created by this request only. Replayed Runs and
                free reads add zero. Null while a newly created Run is unsettled
                or its admission source is unknown. This is not the historical
                total in charge_usd or runs[].charge_usd.
            created_run_ids:
              type: array
              items:
                type: string
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
                format: uuid
            replayed_run_ids:
              type: array
              items:
                type: string
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
                format: uuid
            unknown_run_ids:
              type: array
              items:
                type: string
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
                format: uuid
          required:
            - charge_usd
            - created_run_ids
            - replayed_run_ids
            - unknown_run_ids
          additionalProperties: false
          description: >-
            Request-scoped admission and Charge evidence. Record created_run_ids
            across the user's work, then count each settled Run once. Changing
            task_id does not turn an idempotent replay into a new Run. A result
            read has zero Charge and empty admission lists.
        runs:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              run_url:
                type: string
                description: Open this Run in the console. Requires Workspace membership.
              provider:
                type: string
                pattern: ^[a-z0-9][a-z0-9-]*$
              endpoint:
                type: string
                pattern: ^\/.+$
              endpoint_version:
                type: integer
                exclusiveMinimum: 0
              status:
                type: string
                enum:
                  - QUEUED
                  - RUNNING
                  - COMPLETED
                  - FAILED
                  - STOPPED
                description: >-
                  QUEUED or RUNNING: still in progress. COMPLETED: a Provider
                  response is available, including non-2xx responses. FAILED:
                  read failure. STOPPED: stopped before dispatch. Read
                  charge_usd separately from status.
              failure:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - TIMED_OUT
                          - INTERNAL
                      message:
                        type: string
                    required:
                      - kind
                      - message
                    additionalProperties: false
                  - type: 'null'
                description: Why the Run failed. Non-null only when status is FAILED.
              input:
                type: object
                properties:
                  omitted:
                    type: boolean
                    enum:
                      - true
                required:
                  - omitted
                additionalProperties: false
              output:
                type: object
                properties:
                  omitted:
                    type: boolean
                    enum:
                      - true
                required:
                  - omitted
                additionalProperties: false
              response_file:
                type: object
                properties:
                  body_field:
                    type: string
                    enum:
                      - output
                      - provider_response.error
                  state:
                    type: string
                    enum:
                      - available
                      - link_pending
                      - expired
                      - unavailable
                  download_url:
                    anyOf:
                      - type: string
                      - type: 'null'
                  link_expires_at:
                    anyOf:
                      - type: string
                        description: ISO-8601 UTC timestamp
                        format: date-time
                      - type: 'null'
                  file_expires_at:
                    type: string
                    description: ISO-8601 UTC timestamp
                    format: date-time
                  bytes:
                    type: integer
                    minimum: 0
                  sha256:
                    type: string
                  content_type:
                    type: string
                    enum:
                      - application/json
                required:
                  - body_field
                  - state
                  - download_url
                  - link_expires_at
                  - file_expires_at
                  - bytes
                  - sha256
                  - content_type
                additionalProperties: false
                description: >-
                  Complete large Provider body, delivered as a JSON file.
                  Glasser applies a 32 MiB runtime resource guard to captured
                  bodies and serialized files. body_field identifies the
                  replaced field; output is null or provider_response.error is
                  omitted. Download URLs expire after at most one hour.
                  Authenticated Get Run refreshes the URL while the file is
                  available, for 7 days. Reads and downloads do not execute or
                  charge another Run. If state is link_pending, read the same
                  Run to prepare the link without another execution or charge.
                  The URL grants temporary read access: share it only with
                  intended recipients.
              provider_response:
                anyOf:
                  - type: object
                    properties:
                      http_status:
                        type: integer
                        minimum: 100
                        maximum: 599
                        description: >-
                          HTTP status returned by the Provider. Check this even
                          when the Run is COMPLETED.
                    required:
                      - http_status
                    additionalProperties: false
                  - type: 'null'
              charge_usd:
                anyOf:
                  - type: string
                    pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                    description: >-
                      Exact USD decimal string (min 2, max 6 decimals, one
                      canonical spelling). Sum with decimal arithmetic or scale
                      by 10^6 — never floats.
                  - type: 'null'
                description: >-
                  Final charge as an exact USD decimal string. Null while QUEUED
                  or RUNNING. A FAILED Run can have a non-zero charge under the
                  Endpoint's Price.
              charge_basis:
                anyOf:
                  - type: object
                    properties:
                      clause:
                        type: string
                        enum:
                          - rule
                          - NO_RESULT
                          - PROVIDER_ERROR
                          - TIMED_OUT
                          - INTERNAL
                      quantity:
                        anyOf:
                          - type: integer
                            minimum: 0
                          - type: 'null'
                    required:
                      - clause
                      - quantity
                    additionalProperties: false
                  - type: 'null'
                description: >-
                  Price clause used to calculate the charge. Null before
                  settlement or when no Provider attempt was made.
              stoppable:
                type: boolean
                description: >-
                  Whether a stop request can currently be accepted. This does
                  not guarantee that the Run can stop before dispatch.
              stop_requested_at:
                anyOf:
                  - type: string
                    description: ISO-8601 UTC timestamp
                    format: date-time
                  - type: 'null'
                description: >-
                  When a stop was requested. The Run can still continue if
                  dispatch had already started.
              created_at:
                type: string
                description: ISO-8601 UTC timestamp
                format: date-time
              started_at:
                anyOf:
                  - type: string
                    description: ISO-8601 UTC timestamp
                    format: date-time
                  - type: 'null'
              completed_at:
                anyOf:
                  - type: string
                    description: ISO-8601 UTC timestamp
                    format: date-time
                  - type: 'null'
              task_id:
                anyOf:
                  - type: string
                  - type: 'null'
              metadata:
                type: object
                additionalProperties:
                  type: string
                  minLength: 1
                  maxLength: 500
                maxProperties: 20
                propertyNames:
                  type: string
                  pattern: ^[a-z][a-z0-9_]{0,39}$
                description: >-
                  Your stored tracking fields. Use them to filter Runs. They
                  never go to the Provider or affect routing, Price, or
                  idempotency.


                  - Up to 20 keys: lowercase letters, digits, and underscores;
                  start with a letter; at most 40 characters.

                  - Values: strings of 1–500 characters.

                  - user_id: your End user's opaque ID, never their email
                  address or name.
            required:
              - id
              - run_url
              - provider
              - endpoint
              - endpoint_version
              - status
              - failure
              - input
              - output
              - provider_response
              - charge_usd
              - charge_basis
              - stoppable
              - stop_requested_at
              - created_at
              - started_at
              - completed_at
              - task_id
              - metadata
            additionalProperties: false
        source_result_urls:
          type: array
          items:
            type: string
        error:
          anyOf:
            - type: object
              properties:
                code:
                  type: string
                message:
                  type: string
              required:
                - code
                - message
              additionalProperties: false
            - type: 'null'
      required:
        - analysis
        - result_status
        - output
        - charge_usd
        - source_charge_usd
        - runs
        - source_result_urls
        - error
      additionalProperties: false
    ValidationFailedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - validation_failed
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    UnauthorizedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    ForbiddenEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - forbidden
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    NotFoundEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - not_found
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    RateLimitedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - rate_limited
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
  securitySchemes:
    bearer:
      type: http
      scheme: Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.