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

# Embed watermark

> Embed an invisible watermark message into an image. The message can be up to 5 characters. Returns the watermarked image as base64.



## OpenAPI

````yaml /openapi.json post /api/embed
openapi: 3.0.3
info:
  title: SQR API
  description: >-
    Invisible watermarking, digital twin registration, and NFT minting for
    product authentication.
  version: 1.0.0
  contact:
    name: SQR Support
    url: https://yys-sqr-render-bsbe.onrender.com
servers:
  - url: https://yys-sqr-render-bsbe.onrender.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Server status
  - name: Templates
    description: Record templates and field definitions
  - name: Records
    description: Create, read, update, and sync digital twin records
  - name: Watermarking
    description: Embed and scan invisible watermarks
  - name: NFT
    description: Mint and claim ERC-721 tokens for records
  - name: API Keys
    description: Manage API keys (requires Supabase JWT)
paths:
  /api/embed:
    post:
      tags:
        - Watermarking
      summary: Embed watermark
      description: >-
        Embed an invisible watermark message into an image. The message can be
        up to 5 characters. Returns the watermarked image as base64.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - image
                - message
              properties:
                image:
                  type: string
                  description: Base64-encoded image data
                message:
                  type: string
                  maxLength: 5
                  description: Message to embed (1-5 characters)
      responses:
        '200':
          description: Watermark embedded
          content:
            application/json:
              schema:
                type: object
                properties:
                  watermarked_image:
                    type: string
                    description: Base64-encoded watermarked image
                  message:
                    type: string
                  timestamp:
                    type: string
                    format: date-time
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: Not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Pass a Supabase JWT or a 48-character hex API key as a Bearer token.

````