API referenceStyle Guide

Extract brand style

Renders url in a browser, reads its computed fonts, colours and shapes, and stores its logos, self-hosted font files, two screenshots and up to six of its own images (the hero, the og:image or twitter:image, and the largest content images) as brand assets. Synchronous; allow up to four minutes.

POST
/v1/brands/{brandId}/style-guide/extractions
bearerAuth
headerAuthorizationBearer <token>

An organization API key (koast_sk_…) with the API surface enabled, or an OAuth access token issued by Koast (koast_at_…) whose audience covers this API. REST access requires an active Agency plan.

brandId*integer

The brand the request acts on. Every brand-scoped resource lives under its brand.

Idempotency-Key?string

Retrying with the same key within 24 hours returns the first response without acting again.

Lengthlength <= 255
application/json
  1. body
url*string

The website to read, such as "koast.ai" or a full https address.

Length1 <= length <= 2048

Response Body

Extract brand style

application/json
  1. response
url*string
finalUrl*string
title*string|null
description*string|null
navLinks*array<>
Itemsitems <= 20
fonts*
colors*
shapes*
logos*array<>
screenshots*array<>
images*array<>

The site's own images: product shots, app screens, the hero and its social image, stored as brand assets. Pass a url as an imageUrl reference to generate-creatives, or use it as an src in render-creative html.

Itemsitems <= 6
modelImages*array<>

Images shown to you after this call

Itemsitems <= 12
[key: string]?unknown
curl -X POST "https://example.com/v1/brands/0/style-guide/extractions" \  -H "Authorization: Bearer koast_sk_..." \  -H "Content-Type: application/json" \  -d '{    "url": "string"  }'
{  "url": "string",  "finalUrl": "string",  "title": "string",  "description": "string",  "navLinks": [    {      "text": "string",      "url": "string",      "property1": null,      "property2": null    }  ],  "fonts": {    "heading": {      "family": "string",      "weight": 0,      "stack": "string",      "property1": null,      "property2": null    },    "body": {      "family": "string",      "weight": 0,      "stack": "string",      "property1": null,      "property2": null    },    "faces": [      {        "family": "string",        "weight": "string",        "style": "string",        "assetId": -9007199254740991,        "assetUrl": "string",        "source": "string",        "property1": null,        "property2": null      }    ],    "googleFontsCss": [      "string"    ],    "property1": null,    "property2": null  },  "colors": {    "themeColor": "string",    "cssVariables": {      "property1": "string",      "property2": "string"    },    "background": "string",    "text": "string",    "headings": "string",    "links": "string",    "buttons": [      {        "background": "string",        "color": "string",        "borderRadius": "string",        "border": "string",        "property1": null,        "property2": null      }    ],    "property1": null,    "property2": null  },  "shapes": {    "buttonRadius": "string",    "cardRadius": "string",    "shadows": [      "string"    ],    "property1": null,    "property2": null  },  "logos": [    {      "assetId": -9007199254740991,      "url": "string",      "format": "svg",      "onDark": true,      "property1": null,      "property2": null    }  ],  "screenshots": [    {      "assetId": -9007199254740991,      "url": "string",      "label": "string",      "property1": null,      "property2": null    }  ],  "images": [    {      "assetId": -9007199254740991,      "url": "string",      "label": "string",      "property1": null,      "property2": null    }  ],  "modelImages": [    {      "url": "string",      "label": "string",      "property1": null,      "property2": null    }  ],  "property1": null,  "property2": null}

Required scope: write. CLI: koast extract-brand-style, see Style Guide commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.