Artistic QR Code API Integration Guidance
Artistic QR code is an innovative technological product that combines QR codes with beautiful background images, creating practical and visually appealing works. They not only possess the functionality of traditional QR codes, allowing quick scanning and recognition by smart devices, but also incorporate artistic elements to enhance visual appeal and brand recognition. Some artistic QR codes are even generated by artificial intelligence, fully leveraging modern technology to demonstrate unparalleled innovation and uniqueness. This makes artistic QR codes widely applicable in areas such as brand marketing and advertising.
In simple terms, artistic QR codes are the perfect combination of QR code scanning and artistic aesthetics. They not only provide the function of information transmission, but also enhance the user's visual experience, making each scan a delightful artistic enjoyment.
Overview of Artworks
Let's take a look at a few QR code works:
![](https://cdn.acedata.cloud/elod0j.png)
How are they? These are artistic QR codes, achieving the perfect fusion of images and QR codes and possessing more artistic appeal than ordinary QR codes. And the key is, each QR code is scannable!
How to Create?
Want to create such QR codes? How can you create such artistic QR codes?
In fact, from a technical perspective, this is relatively complex. In this AI era, the current solution for artistic QR codes is based on Stable Diffusion. By inputting prompts, we can generate corresponding images and combine the fusion of some QR code contents to achieve such an effect.
So, the main challenge here is actually: how to make the QR code visually appealing and artistic, while still being scannable. To be honest, this technology is quite challenging and requires a lot of parameter adjustments to achieve even slightly better results.
It's safe to say that 99% of people would give up at the first step.
Assuming that we really achieve this result through continuous adjustments, actually running it also requires a considerable expense. To achieve faster speeds, you might need a high-performance GPU, which could easily cost tens of thousands of dollars.
Some friends might say: I don't want to expend so much effort, I don't want to spend so much money, I just want to create an artistic QR code, or I want to integrate this capability into my product. If there's an existing API for this, that would be great.
Is there? Yes, there is.
This platform provides an API for generating artistic QR codes. We can call the API and input various parameters, such as image content, QR code links, style, and more, to easily generate the desired artistic QR code. Additionally, the first application comes with a free 20-drawing allowance.
Applying for the API
To use the artistic QR code API, you can first go to the Artistic QR Code API[1] page and click the "Acquire" button:
![](https://cdn.acedata.cloud/six7gt.png)
If you are not logged in, you will be automatically redirected to the login page. After logging in, you will be directed back to the original page, then you can apply the service and get the credentials which used for calling the API, also you will be gifted some welcome credits.
Basic Usage
To utilize the most basic functionality of the artistic QR code, the following mandatory parameters need to be filled in:
type: The type of QR code, such as pure text, link, etc. content: The content of the QR code. For example, if it is a link, we can input the corresponding URL. prompt: The style drawing instruction for the QR code, it is strongly recommended to use English. For example, pizza
will create a QR code that resembles a pizza.
Next, let's generate a QR code for the Ace Data Cloud official website, with the type as a link and the content as https://platform.acedta.cloud. The prompt is filled in with the following content:
(best quality, masterpiece:1.2), underwater, ((pirate ship)), close up, zoom in, absurdes, big waves, twister, water falling, tentacles, ((glowing lights)), ((lighting storm)), fog, smoke, 4k res, 8k, highly detailed textures, cinematic shot, intricate details, side view
Fill in the above content in the test page:
![](https://cdn.acedata.cloud/u6cht9.png)
Then click on "Try":
After a while, the artistic QR code will be generated, with a result similar to the following:
{
"task_id": "efe84024-ef26-442b-bae5-9c7776be7392",
"image_url": "https://qrart.cdn.acedata.cloud/attachments/1132182283529494652/1236875773546332251/germey_main_2024-05-06__6638484955b90f37c36b4809.png?ex=663999d4&is=66384854&hm=3207523bb30440fc72c730a0aaabaeeea569dc8f4f17ea953f3c4e23bbfd8912&",
"image_width": 768,
"image_height": 768,
"seed": 2771297016945128
}
The QR code is as follows:
Now we have generated a QR code, with the main image being a ship with several flags, and these flags constitute the positioning points of the QR code.
By scanning with a phone, you can be directed to the Ace Data Cloud official website.
Additionally, the above content calling scheme can be easily converted to an API call.
Prompt Guide
Through the above operation, it can be seen that the key to artistic QR codes lies in the composition of the prompt. So, what are the considerations for composing the prompt?
In fact, these are all common Stable Diffusion prompt commands. Artistic QR codes are generated based on Stable Diffusion technology with some special optimizations, so its input prompt is exactly the same as Stable Diffusion.
If you are not familiar with Stable Diffusion, you can visit their official website to learn more: https://stablediffusionweb.com/[2], as well as prompt tutorials and guides: https://stable-diffusion-art.com/prompt-guide/[3]. Additionally, Stable Diffusion has also created a prompt generator to assist in generating prompts: https://stablediffusionweb.com/prompt-generator[4]. Furthermore, there are some prompt examples available on the following website: https://publicprompts.art/[5].
The above content is for reference only. If you want to learn more, you can independently search for information related to Stable Diffusion.
Advanced Parameters
This API also provides more advanced parameters for greater functionality customization. Here are the explanations:
preset: Preset background style. The style of the QR code background, such as surreal style, neon effect, hand-drawn style, etc. steps: Drawing iteration count. The larger the count, the stronger the artistic style of the generated QR code, with a range of 10-20 and a default of 20. qrw: QR code weight. The larger the weight, the closer the image will resemble a real QR code, but the artistic style will diminish. The range is 1.5-3, with a default of 2.0. seed: Random seed. Used to generate random QR codes. When the seed is the same, the style of the generated QR code is consistent, with a range of 1-9007199254740991. rawurl: Whether to keep the original link. If set to false, the input link is shortened to a short link to improve scanning rates. The default is true. padding_level: Inner margin of the QR code. The size of the inner margin of the QR code. aspect_ratio: Aspect ratio of the QR code. position: Position of the QR code. pixel_style: Pixel style of the QR code. marker_shape: Shape of the QR code positioning box. sub_marker: Sub-mark style of the QR code. rotate: Rotation angle of the QR code. ecl: QR code error correction level. padding_noise: QR code inner margin noise. pattern: Pre-defined QR code combination. Pre-defined QR code style combinations, such as positioning box style (square, circular, etc.), dot style (square, circular, etc.).
In the following text, we will delve into some of the advanced parameters of the artistic QR code API and introduce some of them.
Preset
The artistic QR API offers a variety of preset templates, with a parameter called preset, which can be set to the following values:
sunset: Combines warm sunset colors and soft light effects. floral: Features artistic elements of flowers and plants, emphasizing natural beauty. snowflakes: Depicts a world of ice and snow with a cold atmosphere of ice crystals and snowflakes. feathers: Presents feather and bird characteristics, creating a light and soft feeling. raindrops: Inspired by raindrops and water droplets, creating a fresh and moist effect. ultra-realism: Emphasizes extremely realistic details and textures, creating an otherworldly effect. epic-realms: Magnificent scenes and epic sensations, delivering a grand visual experience. intricate-studio: Abundant in detail and complexity, requiring careful observation to fully understand. symmetric-masterpiece: Creates exquisite balance and harmony through symmetrical elements. luminous-highway: Emphasizes nighttime illumination effects such as car lights and neon signs. celestial-journey: Explores a fantastical journey through the universe and interstellar space. neon-mech: Combines neon lights and mechanical elements to evoke a sense of futurism. ethereal-low-poly: Low-polygon style that creates an illusionary and abstract effect. golden-vista: Mainly in golden hues, presenting a spectacular visual spectacle. cinematic-expanse: Captivating cinematic scenes with an expansive feeling. cinematic-warm: Warm cinematic tones and light effects. desolate-wilderness: Depicts desolation and wilderness, creating a sense of solitude. vibrant-palette: Rich and varied colors, strong color contrasts. enigmatic-journey: Explores a journey filled with mystery and enigma. timeless-cinematic: Cinematic quality that transcends time limitations. regal-galaxy: Royal and cosmic elements of the galaxy and universe. illustrious-canvas: Creates a remarkable and attention-grabbing canvas effect. expressive-mural: Large expressive murals full of emotion and character. serene-haze: Peaceful and misty effect, creating a tranquil atmosphere.
Now let's try different parameters to see the effects, such as using sunset and raindrops as examples.
Sample curl example as below, you need to replace token
with your real credentials:
curl -X POST "https://api.acedata.cloud/qrart/generate" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "authorization: Bearer {token}"
-d '{
"type": "link",
"content": "https://platform.acedata.cloud",
"prompt": "flowers",
"preset": "raindrops"
}'
Here we set the preset to "raindrops" to create a QR code with a raindrops effect. The result is shown below:
If we change the preset to "symmetric-masterpiece" for a Symmetric Masterpiece effect, the result will look like this:
You can experiment with other settings to customize the generated artistic QR codes based on your preferences.
Aspect Ratio (aspect_ratio)
By using the aspect_ratio parameter, we can set the aspect ratio of the QR code to create different shapes, such as squares, rectangles, or screens with specific height-to-width ratios. Here are a few examples:
1:1: 1:1 aspect ratio, creating a square canvas. 16:9: 16:9 aspect ratio, suitable for widescreen displays. 9:16: 9:16 aspect ratio, suitable for vertical displays. 4:3: 4:3 aspect ratio, suitable for general displays. 3:4: 3:4 aspect ratio, suitable for general displays.
curl -X POST "https://api.acedata.cloud/qrart/generate" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "authorization: Bearer {token}"
-d '{
"type": "link",
"content": "https://platform.acedata.cloud",
"prompt": "Plate of Nigiri sushi",
"preset": "raindrops",
"aspect_ratio": "16:9"
}'
Here we attempt to generate a rectangular QR code with the given aspect ratio, as shown below:
![](https://cdn.acedata.cloud/iub3i0.png)
QR Code Position (position)
The position parameter allows us to control the position of the QR code. For example, if we want to place the QR code at a specific position within an image and integrate it with the image, we can adjust the position. The following CURL call is an example:
curl -X POST "https://api.acedata.cloud/qrart/generate" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "authorization: Bearer {token}"
-d '{
"type": "link",
"content": "https://platform.acedata.cloud",
"prompt": "one of the beautiful girls in the moonlight in the background, in the style of pixelated chaos, rococo-inspired art, dark white and sky-blue, made of plastic, delicate flowers, gongbi, wimmelbilder",
"position": "bottom",
"aspect_ratio": "9:16"
}'
The result is shown below:
Pixel Style (pixel_style)
We can also customize the pixel style of the QR code by using the pixel_style parameter, which can be set to square, rounded, dot, squircle, row, or column, each providing a unique visual effect.
Here's a preview of the styles:
![](https://cdn.acedata.cloud/89wx2i.png)
Marker Shape (marker_shape)
The marker_shape parameter allows us to customize the style of the QR code's locating markers. Available options include square, circle, plus, box, octagon, random, and tiny-plus, each giving the QR code a distinct visual appearance.
Preview of the styles:
![](https://cdn.acedata.cloud/7o44ry.png)
Sub-Marker Style (sub_marker)
The sub_marker parameter is used to define the shape of sub-markers (smaller markers) within the QR code. Options for sub-markers include square, circle, box, random, and plus.
Rotation Angle (rotate)
By using the rotate parameter, we can control the rotation angle of the QR code, allowing us to adjust its orientation. Available options are 0, 90, 180, and 270, corresponding to different rotation angles.
Artistic QR Code API: https://platform.acedata.cloud/documents/ee085d2a-a0b9-4f0e-8b4d-8da407345138
[2]https://stablediffusionweb.com: https://stablediffusionweb.com/
[3]https://stable-diffusion-art.com/prompt-guide/: https://stable-diffusion-art.com/prompt-guide/
[4]https://stablediffusionweb.com/prompt-generator: https://stablediffusionweb.com/prompt-generator
[5]https://publicprompts.art/: https://publicprompts.art/
Comments
Post a Comment