Monetized API

API Access for Teams, Automation, and CI

Use CSS-Zone as an API product: generate style payloads, export CSS artifacts, and integrate design logic directly into product workflows.

Self-service API management

Generate API keys, monitor usage, and top up credits directly in your account. No manual approval required.

Sign in to open API automation controls.

Live API tester

Paste your API key, set payload, and run a real request directly from this page.

Why teams pay for API access

  • Automate style generation instead of repeating manual builder actions.
  • Run deterministic style exports in CI and keep outputs consistent.
  • Control usage with keys, monthly limits, and per-request billing.

Typical use cases

CI/CD style generation

Build gradients, shadows, and layout presets during deploy pipelines.

Internal design tooling

Connect API endpoints to your own admin panel or internal components.

Content and template platforms

Generate CSS assets on demand for thousands of tenant projects.

Quick start

  1. Enable API Access on PRO/PREMIUM or buy API add-on credits.
  2. Create a key in your profile and store it in environment variables.
  3. Send authenticated requests and monitor usage in your dashboard.

Base URL: https://css-zone.com/api

Auth header: X-API-Key: cz_api_xxx

First request in 5 minutes

  1. Sign in and open the Self-service API management section on this page.
  2. Create a key (for example, Production CI) and store it in your secrets.
  3. Copy the cURL example below, paste your X-API-Key, and run it.
  4. Use the css field from response in your files, templates, or CI pipeline.

Core endpoints

MethodEndpointPurpose
POST/api-access/generate/gradientGenerate a production-ready gradient declaration.
POST/api-access/generate/shadowBuild layered shadow recipes from structured payload.
POST/api-access/generate/gridGenerate CSS Grid templates and placement configs.
POST/api-access/export/cssExport normalized CSS output for downstream tools.
POST/api-access/generate/style-minifierMinify stylesheet payloads with optional comment and whitespace cleanup.
POST/api-access/generate/font-minifierOptimize @font-face CSS and normalize font-display/unicode-range fields.
POST/api-access/generate/responsive-scaleGenerate responsive clamp() token scales for typography and spacing.
POST/api-access/generate/js-decompressDecompress/format JS with rename map and output stats.
POST/api-access/generate/js-unpack-bundleUnpack bundle into module list and file tree.
POST/api-access/generate/js-source-map-helperRecover source files from source map (sources/sourcesContent).
POST/api-access/generate/js-execution-traceRun isolated execution trace with call logs and console events.

Request examples

cURL

curl -X POST "https://css-zone.com/api/api-access/generate/js-decompress" \
  -H "X-API-Key: cz_api_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceCode": "const a=n=>n.map(t=>t*2);export{a};",
    "options": {
      "renameIdentifiers": true,
      "retainComments": true,
      "outputLanguage": "js"
    }
  }'

JavaScript

const response = await fetch("https://css-zone.com/api/api-access/generate/js-execution-trace", {
  method: "POST",
  headers: {
    "X-API-Key": "cz_api_xxx",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    sourceCode: "function sum(a,b){return a+b}; function run(){return sum(2,3)}",
    options: { entryFunction: "run", entryArgs: [], timeoutMs: 5000 }
  })
});

const data = await response.json();

Response example

{
  "code": "const get1 = input1 => input1.map(value1 => value1 * 2);\\nexport { get1 };",
  "stats": {
    "sourceBytes": 33,
    "outputBytes": 66,
    "sourceLines": 1,
    "outputLines": 2,
    "renamedCount": 2
  },
  "usage": {
    "periodMonth": "2026-02",
    "tier": "pro",
    "includedLimit": 5000,
    "includedUsed": 41,
    "includedRemaining": 4959,
    "billedUsed": 0,
    "totalRequests": 41,
    "creditsRemaining": 0
  }
}

Ready-to-use GitHub Actions example

Add your key to repository secrets (for example, CSS_ZONE_API_KEY), and pipeline can generate CSS automatically on push.

name: JS API Tools in CI
on:
  push:
    branches: [ main ]

jobs:
  js-decompress:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Decompress JS bundle chunk
        run: |
          curl -s -X POST "https://css-zone.com/api/api-access/generate/js-decompress" \
            -H "X-API-Key: $CSS_ZONE_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{"sourceCode":"const a=n=>n.map(t=>t*2);export{a};","options":{"renameIdentifiers":true,"outputLanguage":"js"}}' \
            > decompressed.json

      - name: Save JS artifact
        run: |
          cat decompressed.json | jq -r '.code' > output.js

Limits and billing

  • Starter API package includes monthly request quota.
  • Overages are billed per additional request block.
  • Rate limit headers are returned on every response.

Common API errors

401

Invalid or missing API key.

Check that key is active, not revoked, and sent in X-API-Key header.

402

Quota exhausted or billing issue detected.

Upgrade to PRO/PREMIUM or buy additional API credits in self-service section.

429

Rate limit exceeded. Retry after the provided delay.

Retry with delay and avoid burst traffic without queueing.

FAQ

Can I use API access in GitHub Actions?

Yes. Store your key in repository secrets and call the endpoint in workflow steps.

Do requests consume subscription limits?

Yes. API requests are billed by quota according to your active plan/add-ons.

Can we get custom enterprise limits?

Yes. Contact support for annual contracts and dedicated usage tiers.