Import a brush pack
POST /brush-packs
Imports supported Photoshop ABR samples as a new brush pack for your account.
Send multipart/form-data with a file part and an optional name. You need to be signed in with a session or API token; no extra permission is checked. Without one this handler currently returns a JSON 400, not the schema’s 401. A missing multipart boundary or an unusable content type can get a plain-text 400 before that check.
Each file part is limited to 256 MiB, and going over gets 400, not 413. The handler buffers the selected file, and the parser and PNG encoding need more memory on top. This is a per-part input limit, not a cap on total request size, decoded pixels, brush count or memory use. A repeated recognized field replaces the earlier value, and unknown parts are ignored. An earlier file part that’s rejected can end the request before a later one is read.
An explicit name keeps the first 200 bytes of its field, trimmed. If it’s blank or absent, the name falls back to the uploaded file’s basename without its final extension, then to Imported pack if that’s empty. The filename fallback isn’t cut to 200 bytes. Neither the file extension nor the part’s declared MIME type is checked.
The current decoder handles v6.2-style sample data, reading the first written channel as an 8-bit grayscale mask with raw or PackBits compression. It doesn’t import v6.1 samples, descriptor labels or Photoshop dynamics. The header’s major version is read but not validated, so this isn’t a complete supported-version check. Any sample-decoding error the parser returns rejects the whole import, and a file with no decoded brushes also gets 400.
Decoded masks are encoded as PNGs. Every stamp starts with spacing 0.1, no path alignment, and no label or jitter values. The original ABR isn’t kept. Each import gets new pack and stamp IDs, even when you send the same file again; identical encoded images share a storage key.
Pack and stamp rows are written in one database transaction, but the bitmap writes happen outside it. An error before COMMIT rolls back the rows but can leave stored bytes behind. A COMMIT error leaves the outcome uncertain, and retrying can create a second pack. A 201 response holds the manifest prepared during the import once it’s committed, not a later reread, and doesn’t promise that every image can be fetched.
Request Body required
Section titled “Request Body required ”object
Optional display name. The handler keeps the first 200 bytes and trims surrounding whitespace. If it’s blank or absent, the uploaded file’s basename without its final extension is used, then Imported pack; that filename fallback isn’t cut to 200 bytes. A later name part replaces an earlier one.
ABR file bytes, at most 256 MiB per file part; a larger part gets 400. A later file part replaces an earlier one if processing reaches it, and a missing file part is rejected. The filename extension and the part’s MIME type aren’t checked. Supported sample masks are re-encoded as PNG, and the ABR itself isn’t saved.
Responses
Section titled “ Responses ”The new pack and its stamp manifest after the database commit succeeds.
A pack owned by one account, with its complete stamp manifest. These endpoints create packs by importing ABR samples; the manifest doesn’t include bitmap bytes or the original ABR.
object
Database pack UUID. Every successful import creates a new one, including repeated imports of the same file.
Saved display name, taken from the explicit upload field or the filename fallback.
The uploaded file’s basename, when it isn’t empty. It’s display metadata, not a link to a kept ABR file.
When the import’s database transaction started, not when the upload finished. Catalogue reads sort on it, newest first, with no tie-breaker.
Complete metadata for the stored stamps, or an empty array. Import responses follow decoded sample order; later reads sort by creation time alone, so stamps from the same transaction may not keep that order.
Metadata for one stored stamp. Fetch its PNG from /brush-packs/stamps/{id}. Imports currently use default stroke settings instead of reading Photoshop descriptor dynamics.
object
Database stamp UUID, stable for as long as this row exists. Reimporting creates a new ID. It isn’t the ABR sample identifier or a content hash.
Optional saved label. Current ABR imports leave it out because descriptor names aren’t imported; the web client shows Stamp instead.
Decoded mask width in pixels, preserved when the PNG is encoded.
Decoded mask height in pixels, preserved when the PNG is encoded.
Distance between successive stamps, as a fraction of their effective diameter. Imports set 0.1. The database accepts values above zero up to 10; the schema’s minimum of zero is broader.
Whether the renderer rotates a stamp to follow the stroke. Current imports set false.
Optional random size variation, from 0 to 1. Current imports leave it out rather than copying Photoshop dynamics.
Optional random opacity variation, from 0 to 1. Current imports leave it out rather than copying Photoshop dynamics.
Optional random angle variation in degrees, from 0 to 360. Current imports leave it out rather than copying Photoshop dynamics.
An unusable multipart upload, a missing identity or file part, a file part over 256 MiB, a parser or sample-decoding error, or no decoded brushes. Handler failures have a JSON error body; failures setting up the multipart reader use the server’s plain-text 400. Database, storage and PNG-encoding errors can fail as server errors instead.
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}