Skip to content
Utilerio
All endpoints

CSS Gradient & Shadow Generator

POST/api/v1/tools/css-gradient-shadow-generator

Build a linear or radial gradient, or a multi-layer box-shadow, with a live preview and copyable CSS.

Authentication

Requires an API key in the X-API-Key header.

Try it

POST/api/v1/tools/css-gradient-shadow-generator

Parameters

modestringoptional

Which CSS to build. Default gradient.

gradientshadow
gradientTypestringoptional

Gradient shape (mode=gradient). Default linear.

linearradial
angleintegeroptional

Angle in degrees for a linear gradient (mode=gradient). Default 0.

stopsstringoptional

Array of {color, position} gradient stops, position 0-100 (mode=gradient).

layersstringoptional

Array of {x, y, blur, spread, color, inset} shadow layers (mode=shadow).

Request body

{
  "mode": "gradient",
  "gradientType": "linear",
  "angle": 90,
  "stops": [
    {
      "color": "#6366f1",
      "position": 0
    },
    {
      "color": "#ec4899",
      "position": 100
    }
  ]
}

Response codes

  • 200Success.
  • 400Invalid request — check your body or parameters.
  • 401Missing or invalid API key.
  • 403The API key is not scoped to this endpoint.
  • 429Rate limit exceeded — retry after a short wait.

Language

cURL

Request

curl -X POST https://utilerio.com/api/v1/tools/css-gradient-shadow-generator \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"gradient","gradientType":"linear","angle":90,"stops":[{"color":"#6366f1","position":0},{"color":"#ec4899","position":100}]}'

Response

{ "css": "linear-gradient(90deg, #6366f1 0%, #ec4899 100%)" }