List styles
GET /api/v1/styles returns every style you can pass to a generation.
curl https://pixloom.dev/api/v1/styles \
-H "Authorization: Bearer sk_live_..."{
"styles": [
{ "id": "a91c...", "name": "House look", "description": "Our brand palette", "tags": ["brand"], "isPreset": false },
{ "id": "watercolor", "name": "Watercolor", "description": "Soft washes on paper", "tags": ["painterly"], "isPreset": true }
]
}Works with either kind of key, so the script tag can populate a style picker in the browser.
Your own styles come first, then our presets. Pass any id from this list as the style field on generate, the style parameter on render, or data-pixloom-style in the embed script.
Fields
| Field | Type | Notes |
|---|---|---|
id | string | What you pass as style. |
name | string | For showing a human. |
description | string or null | |
tags | array of string | Loose grouping, such as painterly or photographic. |
isPreset | boolean | true for ours, false for yours. |
Caching
The response is cacheable for an hour, and stale copies stay usable for a day. Presets barely change. If you just made a style in the dashboard and do not see it, that hour is why.
The presets, without a key
GET /api/v1/styles/public returns our presets to anyone, no key and no account. It is what the styles gallery on this site is built from.
curl https://pixloom.dev/api/v1/styles/public{
"styles": [
{
"id": "watercolor",
"name": "Watercolor",
"description": "Soft washes on paper",
"category": "artistic",
"tags": ["painterly"],
"tier": "free",
"previewUrl": "https://...webp"
}
],
"count": 31
}Your own styles are not in here, because there is no key to say whose they are. Use the keyed call above for those.
| Field | Type | Notes |
|---|---|---|
id | string | The slug, which is what you pass as style. |
category | string | One of photo, illustration, artistic, technical, fantasy, general. |
tier | string | The plan this style needs: free, starter, pro, or business. |
previewUrl | string or null | A sample image, or null if that style has no sample yet. |
Cached like the keyed call, an hour fresh and a day stale.
Responses
| Status | Body |
|---|---|
200 | The list above. |
401 | Missing or invalid key. |
403 | Account not approved. |
There is no failure mode where this returns an error for a valid key. If your custom styles cannot be read for some reason, you get the presets on their own rather than a 500, so a style picker never comes up empty.