{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/jamframe-com/json-schema/jamframe-com-render-item-schema.json",
  "title": "RenderItem",
  "description": "One render from the workspace's render log.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/jamframe-com-openapi.yml#/components/schemas/RenderItem",
  "type": "object",
  "required": [
    "id",
    "createdAt",
    "designId",
    "designName",
    "source",
    "format",
    "pages",
    "credits",
    "status",
    "durationMs",
    "outputs",
    "error",
    "cached"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "The render id (`renderId` in the render response)."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "designId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The template rendered. `null` when it has since been deleted."
    },
    "designName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The template's current name. `null` when it has been deleted."
    },
    "source": {
      "type": "string",
      "enum": [
        "api",
        "editor",
        "signed-url",
        "dynamic-url",
        "form",
        "workflow",
        "shopify",
        "webflow"
      ],
      "description": "`api` for this API (including integrations such as Zapier and\nMake), `editor` for the web app's test render, `signed-url` and\n`dynamic-url` for the public render URLs, `form` for a template's\npublic form, `workflow` for a workflow's runs, `shopify` for the\nShopify app, `webflow` for the Webflow app.\n"
    },
    "cached": {
      "type": "boolean",
      "description": "Served from the render cache (signed and dynamic URLs): nothing\nwas rendered, `credits` is 0, and `outputs` are the cached\nrender's files.\n"
    },
    "format": {
      "type": "string",
      "enum": [
        "png",
        "jpeg",
        "webp",
        "pdf",
        "mp4"
      ]
    },
    "pages": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of template pages rendered (0 when a render job failed before rendering)."
    },
    "credits": {
      "type": "integer",
      "minimum": 0,
      "description": "Credits charged. Always 0 for a failed render."
    },
    "status": {
      "type": "string",
      "enum": [
        "succeeded",
        "failed"
      ]
    },
    "durationMs": {
      "type": "integer",
      "description": "Server-side render time in milliseconds."
    },
    "outputs": {
      "type": "array",
      "description": "The stored files, in page order: one per page for images, one\nfor a PDF or an MP4. Empty for failed renders and for `base64`\nrenders, which store nothing. Each read answers fresh links;\nfiles are deleted 8 days after the render (31 for signed and\ndynamic URLs).\n",
      "items": {
        "$ref": "#/$defs/RenderOutputFile"
      }
    },
    "error": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 300,
      "description": "Why a failed render failed (shortened to 300 characters). `null` otherwise."
    }
  },
  "$defs": {
    "RenderOutputFile": {
      "type": "object",
      "required": [
        "url",
        "page"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "A link to the file, signed for this read. It works until `expiresAt`."
        },
        "page": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "description": "The template page this file shows; for a PDF, its first page."
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "description": "When `url` stops working (5 minutes after the read)."
        }
      }
    }
  }
}