{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/collager-ai/json-schema/collager-ai-create-collage-request-schema.json",
  "title": "CreateCollageRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/collager-ai-openapi.yml#/components/schemas/CreateCollageRequest",
  "type": "object",
  "required": [
    "shape",
    "photo_urls"
  ],
  "properties": {
    "shape": {
      "$ref": "#/$defs/Shape"
    },
    "photo_urls": {
      "type": "array",
      "minItems": 1,
      "maxItems": 300,
      "items": {
        "type": "string",
        "format": "uri"
      },
      "description": "Photos (JPEG/PNG/WEBP). Fewer photos than cells - photos repeat."
    },
    "gap_pct": {
      "type": "number",
      "minimum": 0,
      "maximum": 40,
      "default": 6
    },
    "size_px": {
      "type": "integer",
      "minimum": 600,
      "maximum": 8000,
      "default": 3000,
      "description": "Long side of the full-resolution file (the figure keeps a 9 % white margin)."
    },
    "background": {
      "type": "string",
      "description": "white, cream, pink, gray, black or"
    },
    "webhook_url": {
      "type": "string",
      "format": "uri"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "Shape": {
      "type": "object",
      "required": [
        "type"
      ],
      "description": "Examples: {\"type\":\"heart\"}, {\"type\":\"heart\",\"cells\":70}, {\"type\":\"number\",\"text\":\"30\"}, {\"type\":\"text\",\"text\":\"LOVE\"}, {\"type\":\"love\"}, {\"type\":\"star\",\"size\":\"large\"}, {\"type\":\"grid\",\"n\":4}, {\"type\":\"mask_url\",\"url\":\"https://...\"}. GET /shapes lists them.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "heart",
            "number",
            "text",
            "love",
            "circle",
            "star",
            "flower",
            "daisy",
            "yinyang",
            "grid",
            "mask_url"
          ]
        },
        "cells": {
          "type": "integer",
          "enum": [
            27,
            34,
            70,
            79,
            91,
            164
          ],
          "description": "Heart only. Omitted - the smallest heart that holds all your photos."
        },
        "text": {
          "type": "string",
          "maxLength": 14
        },
        "size": {
          "type": "string",
          "enum": [
            "small",
            "medium",
            "large"
          ]
        },
        "n": {
          "type": "integer",
          "minimum": 2,
          "maximum": 12
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "mask_url - black-and-white picture, each black pixel is one photo cell."
        }
      }
    }
  }
}