---
title: "generateDesign"
method: POST
path: "/v1/designs/generate"
tags: ["design-builder"]
---

# generateDesign

`POST /v1/designs/generate`

## Request

- Base URL: `https://design-builder-api.sls.epilot.io`
- URL: `https://design-builder-api.sls.epilot.io/v1/designs/generate`
- Auth: HTTP bearer

Generates a design (palette, text colours, font, logo and border radius) from a public
website with AI. The result is cached per organization and URL for 30 days.

## Request body

- GenerateDesignReq
  - `url` string, uri, required: Public website to derive the design from

## Response `200`

A design generated earlier for this design and URL

- GenerateDesignRes
  - `design` GeneratedDesign, required: Partial design to merge into the design being edited
    - `style` object, required
      - `logo` LogoData, required
        - `main` FileData
          - `name` string, required
          - `display_name` string
          - `file_type` 'LOGO' | 'FONT' | 'IMAGE'
          - `s3_object_key` string, required
          - `url` string, required
          - `file_id` string: ID of the source file entity in the epilot file-entity system. Set when the file was picked from the File Manager (rather than uploaded directly to the design-builder bucket). Consumers resolve the live `public_url` via this reference. The org id is derived from the journey's owning org at render time (same convention as journey image blocks), so blueprint cross-org installs work without any extra remapping.
      - `palette` PaletteData, required
        - `primary` string, required
        - `secondary` string, required
        - `error` string, required
        - `background` string, required
        - `paper` string, required
        - `navbar` string, required
        - `portal_login_background` string
      - `typography` TypographyData, required
        - `font` FontData, required
          - `font_id` string, required
          - `font_name` string, required
          - `font_family` string
          - `font_weight_regular` string
          - `font_weight_medium` string
          - `font_weight_bold` string
          - `urls` FontResponseUrl[], required
            - `type` 'WOFF2' | 'WOFF' | 'TTF' | 'EOT'
            - `url` string
        - `primary` string, required
        - `secondary` string, required
    - `theme` object, required
      - `shape` object, required
        - `borderRadius` string, required
  - `cached` boolean, required: True when the design was generated earlier for this design and URL

## Other responses

- `201`: A newly generated design
- `400`: The URL is not a valid http(s) URL (`invalid_url`) or points to a private network (`blocked_url`)
- `401`: Authentication Errors
- `403`: The caller may not edit designs
- `422`: The website could not be fetched (`fetch_failed`)
- `502`: The design could not be generated (`generation_failed`)
- `504`: The generation did not finish in time

## Changes

- **2026-10-16** `93e9d74842aa`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/epilot/apis/design-builder-api-v2/changes/v1/designs/generate/post.md)

---

[API](https://skmtc.dev/epilot/apis/design-builder-api-v2.md) - [All operations](https://skmtc.dev/epilot/apis/design-builder-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/epilot/apis/design-builder-api-v2/revisions/93e9d74842aa?raw)
