---
title: "Upload or reference artwork and validate it for a product placement"
method: POST
path: "/v1/artworks/validate"
---

# Upload or reference artwork and validate it for a product placement

`POST /v1/artworks/validate`

## Request

- Base URL: `https://pod.agentmade.dev`
- URL: `https://pod.agentmade.dev/v1/artworks/validate`
- Auth: none declared

## Request body

- ValidateArtwork
  - `artwork` object: New artwork to upload: exactly one of svg, base64 or url.
    - `svg` string: Inline SVG markup. Best for logos and text.
    - `base64` string: Base64-encoded PNG, JPEG or SVG file contents, no data: prefix. Only for files up to about 2 MB; for larger files use url, file or upload_link.
    - `url` string, uri: Public HTTPS URL of a PNG, JPEG or SVG file.
    - `filename` string
  - `artwork_id` string: Re-validate artwork uploaded earlier, or validate the file of an upload link.
  - `file` object: A file that your client gives you as a file object (for example in ChatGPT).
    - `download_url` string, uri, required: Temporary HTTPS link to the file.
    - `file_id` string, required: Client file id.
    - `mime_type` string
    - `file_name` string
  - `upload_link` true: Set true when you cannot send the file in this call. The answer gives an artwork_id and a one-time upload_url: upload with curl, or give the link to the person. Then call validate_artwork with the artwork_id.
  - `product_id` string, required: Product to print on.
  - `color` string: Product colour, for the contrast check.
  - `size` string: Garment size, e.g. "XL". Print areas can differ by size; without it the smallest size is checked.
  - `placement` string: Print location on the product, e.g. "front" or "back". See get_product for the list.
  - `preset` string: Named position inside the placement, e.g. "center_chest", "left_chest", "full_front". Defaults to the placement default.
  - `width_mm` number: Exact printed width of the visible artwork in millimetres. Height follows the aspect ratio.
  - `height_mm` number: Maximum printed height in millimetres.
  - `top_mm` number: Distance from the top of the print area to the top of the artwork.
  - `left_mm` number: Distance from the left edge of the print area. Default: horizontally centred.

## Response `201`

Validation result

- ValidateArtworkResult
  - `artwork_id` string: Only in the upload_link answer: the reserved id for the file.
  - `upload_url` string: Only in the upload_link answer: the one-time upload link.
  - `expires_at` string
  - `artwork` object
    - `artwork_id` string, required: Use in quote and create_mockup.
    - `format` string, required
    - `width_px` number, required
    - `height_px` number, required
    - `transparent_background` boolean, required
  - `validation` object
    - `status` 'PASS' | 'WARN' | 'FAIL', required: PASS: prints well. WARN: tell the user, then continue if they agree. FAIL: fix the artwork, then validate again.
    - `placement` string, required
    - `preset` string, nullable, required
    - `print_box` object, required: Position and size of the printed artwork inside the print area, in mm.
      - `left_mm` number, required
      - `top_mm` number, required
      - `width_mm` number, required
      - `height_mm` number, required
    - `print_area_mm` object, required
      - `width` number, required
      - `height` number, required
    - `effective_dpi` number, nullable, required: Resolution at the printed size. Null for vector artwork.
    - `checks` object[], required
      - `id` string, required
      - `status` 'PASS' | 'WARN' | 'FAIL', required
      - `message` string, required
    - `summary` string, required: Status and the checks in short lines; relay the gist to the user.
  - `next_step` string, required: What the agent should do next, in plain language.

## Other responses

- `4XX`: Error with a machine-readable code and a hint for the next step
- `5XX`: Error with a machine-readable code and a hint for the next step

---

[API](https://skmtc.dev/agentmade/apis/agentmade-print-on-demand-api.md) · [All operations](https://skmtc.dev/agentmade/apis/agentmade-print-on-demand-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentmade/apis/agentmade-print-on-demand-api/revisions/542fad1de43b?raw)
