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

# Generate Appearance Palette

> Natural-language brief → coordinated StoreAppearance palette (preview).

Reuses the tenant's AI provider/key (same machine as ``/generate``). The
server is the real validation gate: strict hex per color, whitelist of known
keys, core-base completeness, best-effort WCAG contrast fix. Returns only the
valid subset for the admin to preview + save (nothing is persisted here).



## OpenAPI

````yaml https://api.vellaro.io/openapi.json post /api/v1/admin/ai/appearance/palette
openapi: 3.1.0
info:
  title: Vellaro API
  description: Vellaro 2026 — E-commerce API
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags: []
paths:
  /api/v1/admin/ai/appearance/palette:
    post:
      tags:
        - admin:ai
      summary: Generate Appearance Palette
      description: >-
        Natural-language brief → coordinated StoreAppearance palette (preview).


        Reuses the tenant's AI provider/key (same machine as ``/generate``). The

        server is the real validation gate: strict hex per color, whitelist of
        known

        keys, core-base completeness, best-effort WCAG contrast fix. Returns
        only the

        valid subset for the admin to preview + save (nothing is persisted
        here).
      operationId: generate_appearance_palette_api_v1_admin_ai_appearance_palette_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaletteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_PaletteResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PaletteRequest:
      properties:
        instruction:
          type: string
          maxLength: 600
          title: Instruction
        current:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Current
        sector:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Sector
        store_name:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Store Name
      type: object
      required:
        - instruction
      title: PaletteRequest
      description: >-
        Natural-language brief → coordinated StoreAppearance palette.


        ``instruction`` covers both the first generation ("voglio un tema
        caldo…")

        and the refine ("più caldo", "meno saturo"). On refine the client also
        sends

        ``current`` — the palette currently in the form — which the server
        injects

        into the prompt as the base to modify. ``sector`` / ``store_name`` are

        optional brand context; when omitted the server resolves what it can.
    ApiResponse_PaletteResponse_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/PaletteResponse'
            - type: 'null'
        meta:
          anyOf:
            - $ref: '#/components/schemas/PaginationMeta'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      title: ApiResponse[PaletteResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PaletteResponse:
      properties:
        palette:
          additionalProperties:
            type: string
          type: object
          title: Palette
        explanation:
          type: string
          title: Explanation
        provider:
          type: string
          title: Provider
        model:
          type: string
          title: Model
      type: object
      required:
        - palette
        - explanation
        - provider
        - model
      title: PaletteResponse
    PaginationMeta:
      properties:
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - page
        - page_size
        - total
        - total_pages
      title: PaginationMeta
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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