Catalog/design-bleed-trim-safe

Design

Bleed / trim / safe area API

From a trim size plus bleed and safe margins, computes the full bleed (document) size and the safe content box in mm and pixels at a DPI. Answers 'What document size do I set up for an A4 print with 3mm bleed?', 'How big is the safe area with a 5mm margin?'.

Price$0.04per request
MethodPOST
Route/v1/design/bleed-trim-safe
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
designprintbleedtrimsafe-areaprepressmarginsdocument-setup
API URLhttps://x402.hexl.dev/v1/design/bleed-trim-safe
Integration docs
Example request
{
  "trimWidthMm": 210,
  "trimHeightMm": 297,
  "bleedMm": 3,
  "safeMm": 5,
  "dpi": 300
}
Example response
{
  "dpi": 300,
  "bleedMm": 3,
  "safeMm": 5,
  "trim": {
    "mm": {
      "w": 210,
      "h": 297
    },
    "px": {
      "w": 2480,
      "h": 3508
    }
  },
  "bleedBox": {
    "mm": {
      "w": 216,
      "h": 303
    },
    "px": {
      "w": 2551,
      "h": 3579
    }
  },
  "safeBox": {
    "mm": {
      "w": 200,
      "h": 287
    },
    "px": {
      "w": 2362,
      "h": 3390
    }
  },
  "interpretation": "Set up document at 216×303mm (with bleed); keep critical content inside 200×287mm."
}
Input schema
{
  "type": "object",
  "required": [
    "trimWidthMm",
    "trimHeightMm"
  ],
  "properties": {
    "trimWidthMm": {
      "type": "number",
      "description": "Finished trim width in mm",
      "examples": [
        210
      ]
    },
    "trimHeightMm": {
      "type": "number",
      "description": "Finished trim height in mm",
      "examples": [
        297
      ]
    },
    "bleedMm": {
      "type": "number",
      "description": "Bleed per edge in mm (default 3)",
      "examples": [
        3
      ]
    },
    "safeMm": {
      "type": "number",
      "description": "Safe margin per edge in mm (default 3)",
      "examples": [
        5
      ]
    },
    "dpi": {
      "type": "number",
      "description": "DPI for pixel output (default 300)",
      "examples": [
        300
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}