Pixloomdocs

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

FieldTypeNotes
idstringWhat you pass as style.
namestringFor showing a human.
descriptionstring or null
tagsarray of stringLoose grouping, such as painterly or photographic.
isPresetbooleantrue 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.

FieldTypeNotes
idstringThe slug, which is what you pass as style.
categorystringOne of photo, illustration, artistic, technical, fantasy, general.
tierstringThe plan this style needs: free, starter, pro, or business.
previewUrlstring or nullA sample image, or null if that style has no sample yet.

Cached like the keyed call, an hour fresh and a day stale.

Responses

StatusBody
200The list above.
401Missing or invalid key.
403Account 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.

On this page