---
title: "Build the layered PSB for print (takes longer than the JPEG)"
method: POST
path: "/mosaics/{id}/layered"
tags: ["mosaics"]
---

# Build the layered PSB for print (takes longer than the JPEG)

`POST /mosaics/{id}/layered`

## Request

- Base URL: `https://api.collager.ai/v1`
- URL: `https://api.collager.ai/v1/mosaics/{id}/layered`
- Auth: HTTP bearer

Unlocks the job first if needed (one credit); the PSB itself currently costs nothing extra (may be priced separately later). psb_status becomes building, then ready with psb_url (webhook mosaic.layered_ready).

## Path parameters

- `id` string, required

## Response `202`

Accepted.

- Mosaic
  - `id` string, required
  - `object` 'mosaic', required
  - `status` 'collecting' | 'fetching' | 'queued' | 'processing' | 'preview_ready' | 'unlocked' | 'failed', required: fetching - we are downloading your links; queued/processing - in the build farm.
  - `upload_url` string, uri, nullable: With collect_uploads - the page where your users add photos.
  - `photos_received` integer, nullable: With collect_uploads - photos uploaded so far.
  - `preview_url` string, uri, nullable: Watermarked preview, set from preview_ready on. Link valid 24 h.
  - `hd_url` string, uri, nullable: Clean full-resolution file, set after unlock. Link valid 24 h.
  - `psb_status` 'building' | 'ready' | 'failed' | 'null', nullable
  - `psb_url` string, uri, nullable: Layered PSB for print, when built. Link valid 24 h.
  - `layout_url` string, uri, nullable: GET it with your key - every tile with photo, position, size, colour. JSON by default, XML with ?format=xml. Set from preview_ready on.
  - `tiles_archive_url` string, uri, nullable: ZIP of the tile images as placed in the mosaic (v0.1). Large sets - read access to a storage folder by agreement.
  - `viewer_url` string, uri, nullable: Interactive zoom viewer page (v0.1).
  - `width` integer, nullable
  - `height` integer, nullable
  - `tiles_used` integer, nullable
  - `tiles_failed` integer: Links we could not download (they are skipped).
  - `style` object, nullable
  - `credits_left` integer: Returned by unlock.
  - `credits_charged` integer: Returned by unlock - 1 the first time, 0 on repeats.
  - `error` JobError
    - `code` string, required
    - `message` string, required
  - `metadata` object
  - `expires_at` string, date-time, required: When photos and results are deleted automatically (30 days after creation).
  - `created_at` string, date-time, required

## Other responses

- `402`: Error.
- `403`: Error.
- `409`: Error.

---

[API](https://skmtc.dev/collager/apis/collager-ai-photo-mosaic-photo-collage-api.md) · [All operations](https://skmtc.dev/collager/apis/collager-ai-photo-mosaic-photo-collage-api/llms.txt) · [OpenAPI document](https://skmtc.dev/collager/apis/collager-ai-photo-mosaic-photo-collage-api/revisions/719c6e7aaf09?raw)
