---
title: "Draw a sign-in background from a network's colours"
type: reference
method: POST
path: /rest-api/white-label/login-background.do
tag: "White Label"
---

# Draw a sign-in background from a network's colours

`POST https://YOUR-NETWORK-DOMAIN/rest-api/white-label/login-background.do`

Answers ONE composition as SVG markup, built from the colours sent and the starting point chosen. Call it again for another: each answer is its own, and nothing is kept. Nothing is stored either - the answer is drawing only (no script, no foreignObject, no embedded image, no reference outside the document), it is checked against that in the browser before it is rendered, and the background is stored only when the operator uploads the PNG it was rasterised into, through the ordinary image upload. Billed like an AI assistant call. Requires the WHITE_LABEL admin permission and an Anthropic key: the user's own, the network's, or Epom's while the network's plan includes it.

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `style` | string | no | `GRADIENT` | The starting point: GRADIENT (colours blended across the frame), SHAPES (large soft overlapping shapes), GEOMETRY (a low-contrast repeating pattern) or GRAIN (a fine texture over a plain ground) |
| `colors` | array<string> | no | `#4262e0` | The network's colours as #rrggbb, the accent first; at most 8 are used and anything that is not a colour is left out |
| `note` | string | no | `calm, dark, horizontal` | One line of the operator's own on what it should feel like |

## Responses

- `200` — {svg, style}
- `400` — Field errors under 'errors': the starting point is not one on offer (errors.style), no colour among those sent is a colour (errors.colors), or the note is too long (errors.note)
- `401` — Authentication error
- `403` — Insufficient permissions, naming the missing one
- `429` — This month's AI budget is spent
- `503` — No Anthropic key is set up, or the model could not be reached, declined, or answered something that is not a drawing; try again

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/white-label/login-background.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'style=GRADIENT' \
  --data-urlencode 'colors=#4262e0' \
  --data-urlencode 'note=calm, dark, horizontal'
```

Source: https://epom.com/ad-server/docs/api/white-label/post-white-label-login-background