List library backgrounds
Lists the background library: backgrounds a style names with `overrides.background_ref`, each drawn by the compositor from CSS gradient layers (no image files), with its license and source. Every entry is redistributable (MIT or B3OS's own); the MIT packs name their notice in `GET /v1/render/backgrounds/packs`. Public: no API key, rate limited per client address, and answered from the edge's cache for up to 5 minutes. The whole library fits in one page, so `next_cursor` is always null.
GET
/v1/render/backgrounds
Lists the background library: backgrounds a style names with `overrides.background_ref`, each drawn by the
compositor from CSS gradient layers (no image files), with its license and source. Every entry is
redistributable (MIT or B3OS's own); the MIT packs name their notice in `GET /v1/render/backgrounds/packs`.
Public: no API key, rate limited per client address, and answered from the edge's cache for up to 5 minutes.
The whole library fits in one page, so `next_cursor` is always null.
Query Parameters
pack
string
optional
query
Only this pack's backgrounds.
Example:
"patterncraft"theme
string
optional
query
Only light or only dark backgrounds.
q
string
optional
query
Only backgrounds whose name, slug or tags contain this text (case-insensitive).
Responses
200
The backgrounds, in `ref` order.
application/jsonobject
string
REQUIRED
Enum:
listdata
object[]
REQUIRED
Array of:
ref
string
REQUIRED
`<pack>/<slug>`, the value of `overrides.background_ref`.
object
string
REQUIRED
Enum:
render.backgroundkind
string
REQUIRED
`css`: drawn by the compositor from gradient layers.
Enum:
csspack
string
REQUIRED
slug
string
REQUIRED
name
string
REQUIRED
description
string
theme
string
REQUIRED
Enum:
light, darktags
string[]
REQUIRED
Array of:
string
palette
string[]
REQUIRED
The main colors, as the source lists them.
Array of:
string
tokens
object
REQUIRED
Color tokens and their defaults; `overrides.background_tokens` sets new colors for them.
license
string
REQUIRED
`MIT` or `own` (B3OS's own work).
source
object
REQUIRED
Where the background comes from.
url
string (uri)
REQUIRED
path
string
commit
string
id
string
via
string
thumbnail_url
string (uri)
REQUIRED
A 360x200 WebP drawn by the compositor, a B3OS static asset under `https://beta.b3os.org/assets/presets/library/`.
style
object
REQUIRED
The `style` value that draws this background.
overrides
object
REQUIRED
background_ref
string
REQUIRED
next_cursor
string | null
REQUIRED
400
The request failed validation (`invalid_request`, `invalid_url`).
429
A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500
Something failed inside B3OS (`internal`). Retry with backoff.
503
The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X GET 'https://beta-api.b3os.org/v1/render/backgrounds' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/render/backgrounds', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta-api.b3os.org/v1/render/backgrounds', headers=headers)print(response.json())
200
Response
{ "object": "list", "data": [ { "ref": "patterncraft/top-amber-glow", "object": "render.background", "kind": "css", "pack": "patterncraft", "slug": "top-amber-glow", "name": "Top Amber Glow", "description": "White with a warm amber radial glow from the top", "theme": "light", "tags": [ "amber", "warm", "top", "glow", "light", "energetic" ], "palette": [ "#ffffff", "#f59e0b" ], "tokens": { "accent": "#f59e0b" }, "license": "MIT", "source": { "url": "https://github.com/megh-bari/pattern-craft", "path": "src/data/patterns.ts", "commit": "d36a8d515d507381447871fa41ea511e90defb44", "id": "top-amber-glow" }, "thumbnail_url": "https://beta.b3os.org/assets/presets/library/patterncraft/top-amber-glow.webp", "style": { "overrides": { "background_ref": "patterncraft/top-amber-glow" } } } ], "next_cursor": null}
API Playground
Try this endpoint
GET
/v1/render/backgrounds