Developer QR Code API Guide
The QR Code API allows users to programmatically generate high quality QR codes, or integrate high quantity fast QR Code generation. It provides a simple and efficient way to create QR codes for various use cases, such as automated payments, integration into apps, product label generation, and many more. The API supports different customization options, including size, color, shape, border, type, etc. Developers can integrate it into their applications by making HTTP requests and providing an API key for authentication, or using our libraries.
API Key
The API key for your account can be created on the account page. The API key can be included in requests either as a URL parameter, for example: https://genqrcode.com/api/public/generate?apikey=YOUR_API_KEY, or within the `GenQRCode-apikey` header. For the rest of this guide, we will assume the usage of the header, as this is the safer option, but both methods can be used interchangeably. The API key should be considered a secret, and you should not share it with anyone.
Rate limiting
Rate limiting is enforced to ensure fair usage of the API. The Free tier includes 180 tokens per hour. Normal QR codes cost 1 token each, with a maximum hourly limit of 180 tokens, equating to 1 QR Code every 20 seconds. Additionally, the fast call endpoints will cost 1/50th of a token, which equates to 2.5 QR Codes per second. These fast endpoints are recommended when no customization of the QR Code is required. If the token limit is exceeded, a status code of 429 will be returned, indicating that the request has been rate-limited.
The usage of multiple accounts to circumvent these limits is forbidden. If higher limits are needed, please contact us for the pricing.
Libraries
Static QR Code API
QR Code types
The QR Code type is the base of every QR Code. It determines how the data is encoded and how the QR Code behaves when scanned. Choosing the right type is essential, as it affects the functionality of your QR Code. Below, you'll find all the available types to choose from.
Text
Parameter | Type | Optional | Description |
---|---|---|---|
type | Int | false | Use 0 For a Text QR Code |
text | String | false | The text inside the QR Code. |
WiFi
Parameter | Type | Optional | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
type | Int | false | Use 1 For a WiFi QR Code | ||||||
network | String | false | The Wi-Fi network name. | ||||||
password | String | true | The Wi-Fi password. | ||||||
hidden | String | true | Whether the Wi-Fi network is hidden. | ||||||
encryption | String | true |
The encryption used for the Wi-Fi network.
Possible values
|
SMS
Parameter | Type | Optional | Description |
---|---|---|---|
type | Int | false | Use 2 For a SMS QR Code |
text | String | false | The text message. |
number | String | false | The phone number. |
Parameter | Type | Optional | Description |
---|---|---|---|
type | Int | false | Use 3 For a Email QR Code |
String | true | The email address in the "To" field. | |
subject | String | true | The Subject of the email. |
message | String | true | The message of the email. |
Phone
Parameter | Type | Optional | Description |
---|---|---|---|
type | Int | false | Use 4 For a Phone QR Code |
number | String | false | The phone number. |
Crypto
Parameter | Type | Optional | Description |
---|---|---|---|
type | Int | false | Use 5 For a Crypto QR Code |
cryptotype | String | false | The Crypto type to send. |
address | String | false | The Crypto address of the recipient. |
amount | String | true | The amount of crypto to send. |
vCard
Parameter | Type | Optional | Description |
---|---|---|---|
type | Int | false | Use 6 For a vCard QR Code |
vc_first_name | String | false | The first name of the vCard. |
vc_last_name | String | false | The last name of the vCard. |
vc_company | String | true | The company. |
vc_job | String | true | The job. |
vc_street | String | true | The street. |
vc_city | String | true | The city. |
vc_state | String | true | The state. |
vc_zip | String | true | The zip code. |
vc_country | String | true | The country. |
vc_phone | String | true | The phone number. |
vc_mobile | String | true | The mobile phone number. |
vc_fax | String | true | The fax number. |
vc_website | String | true | The website url. |
vc_email | String | true | The email address. |
Parameter | Type | Optional | Description |
---|---|---|---|
type | Int | false | Use 7 For a Whatsapp QR Code |
number | String | false | The phone number. |
text | String | true | The whatsapp text message. |
vEvent
Parameter | Type | Optional | Description |
---|---|---|---|
type | Int | false | Use 8 For a vEvent QR Code |
ve_summary | String | true | The summary of the vEvent. |
ve_description | String | true | The description of the vEvent. |
ve_location | String | true | The location of the vEvent. |
ve_timezone | String | true | The timezone of the start and end time of the vEvent. For example use "Europe/Amsterdam" for the Amsterdam timezone. |
ve_url | String | true | The url of the vEvent. |
ve_start | String | true | The end time of the vEvent. For example use "20250101T083000" for 1 January 2025 at 8:30. |
ve_end | String | true | The start time of the vEvent. For example use "20250101T093000" for 1 January 2025 at 9:30. |
Geo
Parameter | Type | Optional | Description |
---|---|---|---|
type | Int | false | Use 9 For a Geo QR Code |
ge_latitude | String | false | The latitude to encode. |
ge_longitude | String | false | The longitude to encode. |
Example text QR Code
URL | https://api.genqrcode.com/public/generate |
---|---|
Request method | POST |
Headers | GenQRCode-apikey: API_KEY |
Body | { "type": 0, "text": "https://genqrcode.com" } |
Response | ![]() |
Example Wi-Fi QR Code
URL | https://api.genqrcode.com/public/generate |
---|---|
Request method | POST |
Headers | GenQRCode-apikey: API_KEY |
Body | { "type": 1, "network": "GenQRCode", "password": false, "hidden": false, "encryption": "wpa" } |
Response | ![]() |
General parameters
Here are all the customizable general params described on how to use them.
Parameter | Type | Default value | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
imageformat | String | png |
The image format of the QR Code.
Possible values
|
||||||||||||||||||||
bordersize | Int | 4 | Border size around the QR Code. | ||||||||||||||||||||
width | Int | 500 | Width of the QR Code. Maximum size of 2000. | ||||||||||||||||||||
height | Int | 500 | Height of the QR Code. Maximum size of 2000. |
Color parameters
Here are all the customizable color params described on how to use them.
Parameter | Type | Default value | Description |
---|---|---|---|
color | String | #000000 | The color of the QR code. The format should be either #RRGGBB or #RRGGBBAA. The RGBA values are in hexadecimal format, ranging from 00 to FF. |
custom_color_pattern | String | 1 | The pattern of colors to use. For example, if the colors are #ff0000, #00ff00, and #0000ff, and the pattern is 1,2,3,3,2,1, the colors will alternate according to that pattern. An example will be provided later in the guide. |
background_color | String | #FFFFFF | The background color of the QR code. To make the QR code's background transparent, set the alpha channel to 00. For example, #00000000. |
inner_eye_color | String | #000000 | The color of the inner eyes of the QR Code. |
outer_eye_color | String | #000000 | The color of the outer eyes of the QR Code. |
frame_color | String | #000000 | The color of the frame around the QR Code. A frame needs to be enabled for this to take effect. |
Example Color QR Code
URL | https://api.genqrcode.com/public/generate |
---|---|
Request method | POST |
Headers | GenQRCode-apikey: API_KEY |
Body | { "type": 0, "text": "https://genqrcode.com", "color": "#ff0000", "background_color": "#aaffaa", "inner_eye_color": "#ffaaaa", "outer_eye_color": "#ffaaff" } |
Response | ![]() |
Example color pattern QR Code
URL | https://api.genqrcode.com/public/generate |
---|---|
Request method | POST |
Headers | GenQRCode-apikey: API_KEY |
Body | { "type": 0, "text": "https://genqrcode.com", "color": "#e81416,#faeb36,#79c314,#487de7,#4b369d,#70369d", "custom_color_pattern": "1,1,2,2,3,3,4,4,5,5,6,6" } |
Response | ![]() |
Frame, Shape and Logo parameters
Here are all the customizable frame, shape and logo params described on how to use them.
Parameter | Type | Default value | Description |
---|---|---|---|
style | Int | 0 |
Style of the QR Code squares.
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
inner_eye_style | Int | 0 |
Style of the QR Code inner eyes.
0
1
2
3
4
5
6
7
|
outer_eye_style | Int | 0 |
Style of the QR Code outer eyes.
0
1
2
3
4
5
6
|
frame_style | Int | 0 |
Style of the frame around the QR Code.
0
1
2
3
4
5
6
7
8
9
10
11
12
13
|
frame_text | String | SCAN ME | The text inside the frame. A frame with text must be configured before this becomes visible. |
logo | String |
The logo to use inside the QR Code.
youtube
![]()
wifi
![]()
google-maps
![]()
facebook
![]()
spotify
![]()
threads
![]()
zoom
![]()
instagram
![]()
linkedin
![]()
genqrcode
![]()
google-drive
![]()
airbnb
![]()
skype
![]()
snapchat
![]()
twitter
![]()
x-twitter
![]()
reddit
![]() |
|
logo_remove_background | Boolean | false | Whether the background behind the logo should be removed. |
Example logo and shape QR Code
URL | https://api.genqrcode.com/public/generate |
---|---|
Request method | POST |
Headers | GenQRCode-apikey: API_KEY |
Body | { "type": 0, "text": "https://x.com/genqrcode", "style": 22, "inner_eye_style": 1, "outer_eye_style": 4, "frame": 10, "frame_text": "My X Page", "logo": "x-twitter", "logo_remove_background":true } |
Response | ![]() |
Example Custom logo
To use a custom logo, we need to upload our logo using a multipart form data request. The result can be used in the logo field.
URL | https://api.genqrcode.com/public/upload/logo |
---|---|
Request method | POST |
Headers | GenQRCode-apikey: API_KEY Content-Type: multipart/form-data |
Response | 586d0136af8a06e4a2b50cf9f2af0b72 |
Fast QR Code API
The Fast QR Code API cost only 1/50 tokens of the normal API. The QR Codes are optimised for speed and download size. While it support all of the QR Code Types, it only supports a few customization parameters.
Fast QR Code Parameters
Here are all the fast QR Code parameters described on how to use them.
Parameter | Type | Default value | Description | ||||
---|---|---|---|---|---|---|---|
imageformat | String | png |
The image format of the QR Code.
Possible values
|
||||
bordersize | Int | 4 | Border size around the QR Code. | ||||
width | Int | 500 | Width of the QR Code. It will automatically resize to the closest configured size to avoid any resizing artifacts. Maximum size of 4000. | ||||
height | Int | 500 | Height of the QR Code. It will automatically resize to the closest configured size to avoid any resizing artifacts. Maximum size of 4000. |
Example fast text QR Code
URL | https://api.genqrcode.com/public/fastgenerate |
---|---|
Request method | POST |
Headers | GenQRCode-apikey: API_KEY |
Body | { "imageformat": "png", "type": 0, "text": "https://genqrcode.com" } |
Response | ![]() |
Fast Batch QR Code API
Example fast batch text QR Code
URL | https://api.genqrcode.com/public/fastbatch |
---|---|
Request method | POST |
Headers | GenQRCode-apikey: API_KEY |
Body | { "QR Code 1": { "text": "https://genqrcode.com", "type": 0, "width": 500, "bordersize": 4, "imageformat": "png", "height": 500 }, "QR Code 2": { "text": "https://genqrcode.com/dynamicview", "type": 0, "width": 500, "bordersize": 4, "imageformat": "png", "height": 500 }, "QR Code 3": { "text": "https://genqrcode.com/pricing", "type": 0, "width": 500, "bordersize": 4, "imageformat": "png", "height": 500 } } |
Response | QR Codes in a zip file. |