{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dotsy-ai/json-schema/dotsy-ai-put-asset-request-schema.json",
  "title": "PutAssetRequest",
  "description": "Exactly one of `bodyBase64` or `importFromUrl` is required.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dotsy-ai-assets-api-openapi.yml#/components/schemas/PutAssetRequest",
  "type": "object",
  "properties": {
    "bodyBase64": {
      "type": "string",
      "description": "The file's bytes, base64-encoded. Send this or `importFromUrl`, not both."
    },
    "bodySha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "SHA-256 (64 hex characters) of the bytes you send. A mismatch answers 400 `body_sha256_mismatch` before anything is written."
    },
    "contentType": {
      "type": "string",
      "minLength": 1,
      "description": "The file's MIME type. Defaults to the one implied by the key's extension."
    },
    "importFromUrl": {
      "type": "string",
      "format": "uri",
      "description": "Fetch the file from this URL instead of sending `bodyBase64`. Send this or `bodyBase64`, not both."
    },
    "intent": {
      "type": "string",
      "enum": [
        "hero",
        "column",
        "inline",
        "logo"
      ],
      "description": "The layout role of an image, which sets its size: `hero` (up to 2,400 px) and `column` (1,200 px) also store a smaller `-800` variant; `inline` (800 px) and `logo` (512 px) do not. Defaults to `logo` under `logos/` or `icons/`, otherwise `column`."
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "description": "Display title (up to 500 characters). Defaults to the file name."
    },
    "optimize": {
      "type": "boolean",
      "description": "Default true. `false` stores a raster image exactly as sent, at the key you gave, instead of re-encoding it as WebP."
    }
  }
}