apyhub
IMAGE PROCESSING · SMART GENERATION

Generate QR Code API

What it does

QR Code Generator creates downloadable QR codes from plain text, URLs, vCard details, or Wi‑Fi credentials. Send one of those inputs in the request body, and you get back either a pre-signed cloud storage URL or a binary file, depending on the endpoint you use.

Use content to encode raw text or a URL, v_card to generate a contact QR code, or wifi_info to produce a Wi‑Fi login code. The request body also supports optional QR styling: logo for a center overlay image, foreground_color and background_color for color control, is_gradient for gradient foregrounds, and recovery_level for error correction tuning. For contact cards, v_card accepts fields such as name, phone_numbers, email, website, address, organization, and related profile details.

Choose the /link endpoint when you want a cloud-hosted image reference in the response. Choose /download when you want the QR code file returned directly as binary data. That makes QR Code Generator fit workflows like event badges, business cards, onboarding handouts, printed menus, and captive Wi‑Fi access points.

The response is simple: a URL for hosted delivery, or a file download for immediate use. If you are generating QR codes inside an app, CMS, or print pipeline, this keeps the integration focused on the data you already have and the output format you need.

▣ ENDPOINT 02 / 02
POST
Generate QR code — download file
https://api.eu.apyverse.com/apyhub/generate-qr-code/download

QUICKSTART

GUIDE

Quickstart

Download a generated QR code by sending the content to encode and a filename for the output.

curl -X POST "https://api.eu.apyverse.com/apyhub/generate-qr-code/download?output=my-invite" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "https://apyhub.com"
  }'

What you'll get back

Returns a binary file stream (string with format: binary) containing the generated QR code image.

TRY ITLIVE · 30 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Exactly one of `content`, `v_card`, or `wifi_info` must be provided.
URL of an image to overlay in the centre of the QR code.
v_card
phone_numbers*
social_profiles
Raw text or URL to encode. Max 2953 characters.
wifi_info
Must be true when foreground_color is an array. Returns 400 if true but foreground_color is not an array.
Error correction level. Lower = more content capacity, less damage tolerance.
Hex background color. Required when foreground_color is set.
Solid mode: hex string (e.g. "000000"). Gradient mode: array of two hex strings ["startColor", "endColor"]. Must be omitted together with background_color, or both provided.

About this endpoint

What it does

Generates a QR code and downloads it as a binary file. The request body supplies the QR content or a preset payload (content, v_card, or wifi_info), along with optional styling and logo settings.

Request Body

ParameterTypeMandatoryDescription
logoStringNoURL of an image to overlay in the centre of the QR code. Must be a URI.
v_cardObjectNovCard payload. Exactly one of content, v_card, or wifi_info must be provided. Includes name and phone_numbers, and may include email, notes, address, website, birthday, job_title, photo_url, organization, and social_profiles.
v_card.nameStringYesContact name.
v_card.emailStringNoEmail address. Must be an email format.
v_card.notesStringNoNotes for the contact.
v_card.addressStringNoAddress for the contact.
v_card.websiteStringNoWebsite URL. Must be a URI.
v_card.birthdayStringNoBirthday value.
v_card.job_titleStringNoJob title.
v_card.photo_urlStringNoPhoto URL. Must be a URI.
v_card.organizationStringNoOrganization name.
v_card.phone_numbersString ArrayYesPhone number list.
v_card.social_profilesObjectNoSocial profile links. Includes twitter and linkedIn.
v_card.social_profiles.twitterStringNoTwitter profile value.
v_card.social_profiles.linkedInStringNoLinkedIn profile value.
contentStringNoRaw text or URL to encode. Max 2953 characters.
wifi_infoObjectNoWi-Fi payload. Exactly one of content, v_card, or wifi_info must be provided. Includes required ssid, and may include password, auth_type, and is_hidden.
wifi_info.ssidStringYesWi-Fi network name (SSID).
wifi_info.passwordStringNoWi-Fi password.
wifi_info.auth_typeENUMNoAuthentication type. Allowed values: WEP, WPA, WPA2, WPA3, WPA-EAP, WPA2-EAP, WPA3-EAP.
wifi_info.is_hiddenBooleanNoWhether the network is hidden. Default: false.
is_gradientBooleanNoMust be true when foreground_color is an array. Returns 400 if true but foreground_color is not an array. Default: false.
recovery_levelENUMNoError correction level. Allowed values: low, medium, high, highest. Default: highest.
background_colorStringNoHex background color. Required when foreground_color is set.
foreground_colorENUMNoSolid mode: a hex string such as 000000. Gradient mode: an array of two hex strings [startColor, endColor] with exactly 2 items. Must be omitted together with background_color, or both provided.

Response

Returns a binary file download. The success response is a single binary payload, not a JSON object.

ParameterTypeMandatoryDescription
binaryStringYesBinary QR code file content returned by the endpoint.

Notes

Exactly one of content, v_card, or wifi_info must be provided. Styling fields also have coupling rules: is_gradient must be true when foreground_color is an array, background_color is required when foreground_color is set, and foreground_color / background_color must be supplied together or omitted together.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
Exactly one of `content`, `v_card`, or `wifi_info` must be provided.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.