---
title: "Generate a template from a URL"
method: POST
path: "/v1/templates/from-url"
tags: ["Templates"]
---

# Generate a template from a URL

`POST /v1/templates/from-url`

## Request

- Base URL: `https://app.getshareglow.com`
- URL: `https://app.getshareglow.com/v1/templates/from-url`
- Auth: HTTP bearer

Scans the site's brand (colors, fonts, logo) and picks a layout with AI. Cached per domain; costs one AI generation on a cache miss.

## Request body

- object
  - `url` string, uri, required
  - `force` boolean: Skip the domain cache.

## Response `200`

Template choice

- object
  - `layoutId` string
  - `variables` object
  - `template` object: The ready-to-save branded template (layers and variables); POST it to your templates or render it with the layout id.
  - `brandKit` object
  - `model` string, nullable
  - `cached` boolean

## Other responses

- `400`: Validation failed (`bad_request`, `invalid_url`, ...).
- `401`: Missing, unknown or revoked API key.
- `402`: A plan cap or feature gate blocked the call (`plan_limit_exceeded`; `details` names the resource and limit).
- `403`: The API key is valid but lacks the scope this endpoint needs (images, templates, scan, links, monitors or ai).
- `413`: The JSON body is over 1 MB (`payload_too_large`).
- `429`: Daily call limit reached. Retry after the `Retry-After` seconds.

---

[API](https://skmtc.dev/getshareglow/apis/shareglow-api.md) · [All operations](https://skmtc.dev/getshareglow/apis/shareglow-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getshareglow/apis/shareglow-api/revisions/3ea838c40d3c?raw)
