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

# Create brand-adherence job

> Judges how well a page (the `source_url`) adheres to a reference site's brand (the `reference_url`). Use it to score a rebuild, a generated page, or a redesign against the brand it should follow.

The job runs asynchronously: poll `GET /judge/brand-adherence/{job_id}` until the status is `completed` or `failed`, then read the verdict from `GET /judge/brand-adherence/{job_id}/result`.

Both URLs are extracted automatically, and a recent extraction of either side is reused. You do not need to create submissions first.



## OpenAPI

````yaml api-reference/openapi.json POST /judge/brand-adherence
openapi: 3.1.0
info:
  title: Taste Engine Design API
  version: 1.0.0
  description: >-
    Public REST API for the Taste Engine. Submit a URL, extract a structured
    design system from any website, search the brand corpus by aesthetic, and
    ground prompts in real brand profiles.


    All requests are authenticated with an API key sent in the `X-API-Key`
    header. Create one directly in the Engine dashboard at
    https://engine.tastelabs.com/app/api-keys.
  contact:
    name: Taste Engine Support
    email: support@thetaste.ai
servers:
  - url: https://api.tastelabs.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Account
    description: Identity of the authenticated API key holder.
  - name: Submissions
    description: >-
      Create and track extraction jobs, then retrieve the resulting design
      system.
  - name: Prompts
    description: Rewrite prompts grounded in an extracted brand profile.
  - name: Search
    description: >-
      Find brands in the curated corpus by describing an aesthetic, or by
      similarity to one of your own extractions.
  - name: Brand adherence
    description: >-
      Judge how well a page adheres to a reference site's brand: submit a pair
      of URLs, poll the job, then read the verdict.
paths:
  /judge/brand-adherence:
    post:
      tags:
        - Brand adherence
      summary: Create brand-adherence job
      description: >-
        Judges how well a page (the `source_url`) adheres to a reference site's
        brand (the `reference_url`). Use it to score a rebuild, a generated
        page, or a redesign against the brand it should follow.


        The job runs asynchronously: poll `GET /judge/brand-adherence/{job_id}`
        until the status is `completed` or `failed`, then read the verdict from
        `GET /judge/brand-adherence/{job_id}/result`.


        Both URLs are extracted automatically, and a recent extraction of either
        side is reused. You do not need to create submissions first.
      operationId: createBrandAdherence
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdherenceCreate'
            example:
              reference_url: https://stripe.com
              source_url: https://staging.example.com
      responses:
        '202':
          description: The job was accepted and queued for processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdherenceAccepted'
              example:
                job_id: 0f5b2c9a-6a1e-4b0e-9f0e-1c2d3e4f5a6b
                status: accepted
                reference_url: https://stripe.com
                source_url: https://staging.example.com
                accepted_at: '2026-08-25T12:00:00Z'
                is_public: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Reference or source submission not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail:
                  error: SUBMISSION_NOT_FOUND
                  message: Reference or source submission not found
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    AdherenceCreate:
      type: object
      description: 'A pair of URLs: the reference brand and the page to judge against it.'
      properties:
        reference_url:
          type: string
          format: uri
          description: URL of the reference site whose brand is the standard to meet.
        source_url:
          type: string
          format: uri
          description: >-
            URL of the page to judge against the reference brand, e.g. a
            rebuild, a generated page, or a redesign.
      required:
        - reference_url
        - source_url
    AdherenceAccepted:
      type: object
      properties:
        job_id:
          type: string
        status:
          $ref: '#/components/schemas/AdherenceStatus'
        reference_url:
          type: string
          format: uri
        source_url:
          type: string
          format: uri
        accepted_at:
          type: string
          format: date-time
        is_public:
          type: boolean
        cache_hit:
          $ref: '#/components/schemas/AdherenceCacheHit'
      required:
        - job_id
        - status
        - reference_url
        - source_url
        - accepted_at
    Error:
      type: object
      description: >-
        Standard error envelope for non-2xx responses: the machine-readable
        `error` code and the human-readable `message` are nested under `detail`.
        Validation errors (`422`) and search failures (`502`, `503`) shape
        `detail` differently; see those responses.
      properties:
        detail:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
              examples:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - NOT_READY
            message:
              type: string
              description: Human-readable explanation of the error.
          required:
            - error
            - message
          additionalProperties: true
      required:
        - detail
    AdherenceStatus:
      type: string
      description: Lifecycle status of a brand-adherence job.
      enum:
        - accepted
        - extracting
        - judging
        - completed
        - failed
    AdherenceCacheHit:
      type: object
      description: Per-side reuse at each pipeline layer. Reuse makes the job faster.
      properties:
        design_extraction:
          $ref: '#/components/schemas/AdherenceSideReuse'
        verifier_extraction:
          $ref: '#/components/schemas/AdherenceSideReuse'
        final_report:
          type: boolean
          description: Whether the final pair-specific report was reused.
    AdherenceSideReuse:
      type: object
      description: Which sides of the pair were served from an existing artifact.
      properties:
        reference:
          type: boolean
        source:
          type: boolean
  responses:
    Unauthorized:
      description: The API key is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail:
              error: UNAUTHORIZED
              message: Bearer token or X-API-Key required
    InsufficientCredits:
      description: >-
        The account doesn't have enough credits to run the request. Only occurs
        when credit metering is enabled.
      content:
        application/json:
          schema:
            type: object
            required:
              - detail
            properties:
              detail:
                type: object
                required:
                  - error
                  - message
                properties:
                  error:
                    type: string
                    examples:
                      - INSUFFICIENT_CREDITS
                  message:
                    type: string
                  balance:
                    type: integer
                    description: The account's current credit balance.
                  required:
                    type: integer
                    description: Credits required to run this request.
          example:
            detail:
              error: INSUFFICIENT_CREDITS
              message: Not enough credits for this request.
              balance: 0
              required: 1
    Forbidden:
      description: The API key is valid but is not allowed to call this endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail:
              error: FORBIDDEN
              message: This key is not allowed to call this endpoint.
    ValidationError:
      description: >-
        The request failed validation. `detail` is a list of issues, each naming
        the offending field in `loc`.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: array
                items:
                  type: object
                  properties:
                    loc:
                      type: array
                      items: {}
                    msg:
                      type: string
                    type:
                      type: string
          example:
            detail:
              - loc:
                  - body
                  - url
                msg: Field required
                type: missing
    InternalError:
      description: An unexpected server error occurred. The body is plain text.
      content:
        text/plain:
          example: Internal Server Error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key issued by the Taste Engine. Create one in the dashboard at
        https://engine.tastelabs.com/app/api-keys.

````