mosaics

Create a mosaic job

post/mosaics

Request

  • Base URL: https://api.collager.ai/v1
  • URL: https://api.collager.ai/v1/mosaics
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Repeating a POST with the same key returns the first job instead of creating a second one.

Request body

main_image_urlstring uri

The picture to recreate. Required unless collect_uploads.

tile_image_urlsstring[]

Photos for the tiles (public or pre-signed links). At least 30 tiles in total; a few hundred give a good result.

tiles_zip_urlstring uri

One ZIP archive with all tile photos (v0.1).

featured_tile_urlsstring[]

Photos that get the largest tiles and are placed first.

secondary_tile_urlsstring[]

Second featured level, slightly smaller.

layered_fileboolean

Also build the layered PSB for print (takes longer).

collect_uploadsboolean

No photos yet - the response carries upload_url, a page where your users add photos; status stays collecting until POST /mosaics/{id}/start.

webhook_urlstring uri

Called with a WebhookEvent when the preview is ready, the job fails, is unlocked or the PSB is ready.

metadataobject

Your own key-value pairs, returned unchanged.

Response

Same Idempotency-Key as an earlier request - that job is returned.

idstring 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_urlstring uri nullable

With collect_uploads - the page where your users add photos.

photos_receivedinteger nullable

With collect_uploads - photos uploaded so far.

preview_urlstring uri nullable

Watermarked preview, set from preview_ready on. Link valid 24 h.

hd_urlstring uri nullable

Clean full-resolution file, set after unlock. Link valid 24 h.

psb_status'building' | 'ready' | 'failed' | 'null' nullable
psb_urlstring uri nullable

Layered PSB for print, when built. Link valid 24 h.

layout_urlstring 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_urlstring 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_urlstring uri nullable

Interactive zoom viewer page (v0.1).

widthinteger nullable
heightinteger nullable
tiles_usedinteger nullable
tiles_failedinteger

Links we could not download (they are skipped).

styleobject nullable
credits_leftinteger

Returned by unlock.

credits_chargedinteger

Returned by unlock - 1 the first time, 0 on repeats.

metadataobject
expires_atstring date-time required

When photos and results are deleted automatically (30 days after creation).

created_atstring date-time required

Example response

{
  "id": "msc_7Hq2xV9aB3kL",
  "error": {
    "code": "too_few_tiles"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.