# generateqrcode: Generate a QR Code with Custom Colors

> generateqrcode (Generate a QR Code with Custom Colors) is a 1001fx API function in the group Images: POST https://api.1001fx.com/images/generateqrcode, 3 credits per call. It works as a ready-made module in Make and n8n or as a plain HTTP call.

Generates a QR code image from a text or URL, with your own text and background color, width and error correction level.

- Group: Images
- Endpoint: `POST https://api.1001fx.com/images/generateqrcode`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: application/json
- Credits: 3 credits per call
- Ready-made in: Make and n8n
- Docs: https://1001fx.com/functions/generateqrcode

## Parameters

- `text` (string, required) – Text: The text to place in your QR Code.
- `backgroundColor` (string (HEX Color), optional) – Border Color: The border color of your bar. Defaults to #ffffff if no color is provided.
- `textColor` (string (HEX Color), optional) – Border Color: The border color of your bar. Defaults to #000000 if no color is provided.
- `width` (number, optional, max 4096) – Width: Forces a specific width for the output image. Defaults to 512.
- `errorCorrectionLevel` (enum, optional, one of `M`, `L`, `Q`, `H`, default `M`) – Error Correction Level: Error correction capability allows to successfully scan a QR Code even if the symbol is dirty or damaged. Higher levels offer a better error resistance but reduce the code's capacity. Defaults to M.

## Example: Default QR code

```bash
curl -X POST 'https://api.1001fx.com/images/generateqrcode' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"text":"https://1001fx.com"}'
```
