Aztec Code Generator
curl --request POST \
--url https://api.iotools.cloud/v1/tool/aztec-code-generator \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputText": "https://iotools.cloud",
"errorCorrection": "23",
"moduleSize": "4"
}
'import requests
url = "https://api.iotools.cloud/v1/tool/aztec-code-generator"
payload = {
"inputText": "https://iotools.cloud",
"errorCorrection": "23",
"moduleSize": "4"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({inputText: 'https://iotools.cloud', errorCorrection: '23', moduleSize: '4'})
};
fetch('https://api.iotools.cloud/v1/tool/aztec-code-generator', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.iotools.cloud/v1/tool/aztec-code-generator",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputText' => 'https://iotools.cloud',
'errorCorrection' => '23',
'moduleSize' => '4'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.iotools.cloud/v1/tool/aztec-code-generator"
payload := strings.NewReader("{\n \"inputText\": \"https://iotools.cloud\",\n \"errorCorrection\": \"23\",\n \"moduleSize\": \"4\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.iotools.cloud/v1/tool/aztec-code-generator")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputText\": \"https://iotools.cloud\",\n \"errorCorrection\": \"23\",\n \"moduleSize\": \"4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.iotools.cloud/v1/tool/aztec-code-generator")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputText\": \"https://iotools.cloud\",\n \"errorCorrection\": \"23\",\n \"moduleSize\": \"4\"\n}"
response = http.request(request)
puts response.read_body{
"tool": "aztec-code-generator",
"tool_version": "1.0.1",
"outputs": {
"svg": "<svg viewBox=\"0 0 184 184\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M0 184L8 184L8 176L0 176ZM24 184L40 184L40 176L24 176ZM64 184L80 184L80 176L64 176ZM96 184L120 184L120 176L96 176ZM152 184L160 184L160 176L152 176ZM168 184L176 184L176 176L168 176ZM88 176L96 176L96 168L88 168ZM128 176L152 176L152 168L144 168L144 152L136 152L136 168L128 168ZM0 168L8 168L8 152L0 152ZM40 168L48 168L48 160L40 160ZM64 168L72 168L72 144L80 144L80 152L88 152L88 144L104 144L104 160L112 160L112 144L120 144L120 160L128 160L128 144L176 144L176 152L184 152L184 136L176 136L176 128L152 128L152 136L144 136L144 120L152 120L152 112L144 112L144 104L152 104L152 96L144 96L144 80L160 80L160 64L152 64L152 72L144 72L144 64L152 64L152 56L144 56L144 48L176 48L176 40L160 40L160 32L176 32L176 40L184 40L184 24L152 24L152 32L144 32L144 40L88 40L88 32L112 32L112 24L104 24L104 16L112 16L112 8L104 8L104 0L96 0L96 8L88 8L88 16L96 16L96 24L80 24L80 8L72 8L72 16L64 16L64 32L80 32L80 40L48 40L48 32L56 32L56 24L24 24L24 32L8 32L8 40L24 40L24 72L16 72L16 56L8 56L8 40L0 40L0 64L8 64L8 80L16 80L16 88L24 88L24 96L32 96L32 72L40 72L40 96L32 96L32 104L40 104L40 144L48 144L48 160L64 160ZM96 168L104 168L104 160L96 160ZM160 168L168 168L168 160L160 160ZM88 160L96 160L96 152L88 152ZM168 160L176 160L176 152L168 152ZM8 152L16 152L16 144L8 144ZM24 152L32 152L32 144L24 144ZM16 144L24 144L24 136L16 136ZM48 136L48 48L136 48L136 136ZM56 128L128 128L128 56L56 56ZM8 120L24 120L24 112L32 112L32 104L24 104L24 96L16 96L16 104L0 104L0 112L8 112ZM64 120L64 64L120 64L120 120ZM72 112L112 112L112 72L72 72ZM152 112L160 112L160 104L152 104ZM80 104L80 80L104 80L104 104ZM160 104L176 104L176 88L168 88L168 96L160 96ZM8 96L16 96L16 88L8 88ZM88 96L96 96L96 88L88 88ZM152 96L160 96L160 88L152 88ZM0 88L8 88L8 80L0 80ZM176 88L184 88L184 80L176 80ZM168 80L176 80L176 72L168 72ZM176 72L184 72L184 64L176 64ZM160 64L176 64L176 56L160 56ZM0 32L8 32L8 24L0 24ZM120 32L128 32L128 24L144 24L144 16L152 16L152 8L136 8L136 0L128 0L128 8L120 8L120 16L112 16L112 24L120 24ZM0 16L8 16L8 8L16 8L16 0L0 0ZM16 16L24 16L24 8L16 8ZM32 16L48 16L48 8L56 8L56 0L40 0L40 8L32 8ZM160 16L168 16L168 8L176 8L176 0L160 0ZM24 8L32 8L32 0L24 0ZM112 8L120 8L120 0L112 0Z\" fill=\"#000000\" fill-rule=\"evenodd\" />\n</svg>\n"
},
"credits_used": 3,
"credits_remaining": null
}{
"type": "https://iotools.cloud/docs/errors/validation_error",
"title": "Invalid request",
"status": 400,
"code": "validation_error",
"detail": "One or more inputs are invalid — see `fields`.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11",
"fields": {
"inputString": "Required"
}
}{
"type": "https://iotools.cloud/docs/errors/invalid_api_key",
"title": "Invalid API key",
"status": 401,
"code": "invalid_api_key",
"detail": "Provide 'Authorization: Bearer <key>'.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}{
"type": "https://iotools.cloud/docs/errors/insufficient_credits",
"title": "Insufficient credits",
"status": 402,
"code": "insufficient_credits",
"detail": "This call costs 1 credit and 0 remain in this month's allowance.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11",
"credits_used": 0,
"credits_remaining": 0
}{
"type": "https://iotools.cloud/docs/errors/tool_not_allowed",
"title": "Tool not available over the API",
"status": 403,
"code": "tool_not_allowed",
"detail": "\"Background Remover\" is available on iotools.cloud but has no API endpoint.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}{
"type": "https://iotools.cloud/docs/errors/tool_not_found",
"title": "Tool not found",
"status": 404,
"code": "tool_not_found",
"detail": "No tool with that slug. See GET /v1/tools/list.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}{
"type": "https://iotools.cloud/docs/errors/payload_too_large",
"title": "Payload too large",
"status": 413,
"code": "payload_too_large",
"detail": "Request body exceeds this tool's size limit.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}{
"type": "https://iotools.cloud/docs/errors/rate_limited",
"title": "Rate limit exceeded",
"status": 429,
"code": "rate_limited",
"detail": "Too many requests. Retry in 30s.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11",
"retry_after": 30
}{
"type": "https://iotools.cloud/docs/errors/processing_error",
"title": "Tool failed to run",
"status": 500,
"code": "processing_error",
"detail": "The tool failed to run. Please try again.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11",
"credits_used": 0
}{
"type": "https://iotools.cloud/docs/errors/tool_disabled",
"title": "Tool temporarily disabled",
"status": 503,
"code": "tool_disabled",
"detail": "This tool is temporarily unavailable. Try again shortly.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}Generators
Aztec Code Generator
Generate an Aztec Code 2D barcode from text, a URL, or any short string — configurable error correction and module size, output as a scalable SVG. Runs entirely in your browser.
POST
/
v1
/
tool
/
aztec-code-generator
Aztec Code Generator
curl --request POST \
--url https://api.iotools.cloud/v1/tool/aztec-code-generator \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputText": "https://iotools.cloud",
"errorCorrection": "23",
"moduleSize": "4"
}
'import requests
url = "https://api.iotools.cloud/v1/tool/aztec-code-generator"
payload = {
"inputText": "https://iotools.cloud",
"errorCorrection": "23",
"moduleSize": "4"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({inputText: 'https://iotools.cloud', errorCorrection: '23', moduleSize: '4'})
};
fetch('https://api.iotools.cloud/v1/tool/aztec-code-generator', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.iotools.cloud/v1/tool/aztec-code-generator",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputText' => 'https://iotools.cloud',
'errorCorrection' => '23',
'moduleSize' => '4'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.iotools.cloud/v1/tool/aztec-code-generator"
payload := strings.NewReader("{\n \"inputText\": \"https://iotools.cloud\",\n \"errorCorrection\": \"23\",\n \"moduleSize\": \"4\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.iotools.cloud/v1/tool/aztec-code-generator")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputText\": \"https://iotools.cloud\",\n \"errorCorrection\": \"23\",\n \"moduleSize\": \"4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.iotools.cloud/v1/tool/aztec-code-generator")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputText\": \"https://iotools.cloud\",\n \"errorCorrection\": \"23\",\n \"moduleSize\": \"4\"\n}"
response = http.request(request)
puts response.read_body{
"tool": "aztec-code-generator",
"tool_version": "1.0.1",
"outputs": {
"svg": "<svg viewBox=\"0 0 184 184\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M0 184L8 184L8 176L0 176ZM24 184L40 184L40 176L24 176ZM64 184L80 184L80 176L64 176ZM96 184L120 184L120 176L96 176ZM152 184L160 184L160 176L152 176ZM168 184L176 184L176 176L168 176ZM88 176L96 176L96 168L88 168ZM128 176L152 176L152 168L144 168L144 152L136 152L136 168L128 168ZM0 168L8 168L8 152L0 152ZM40 168L48 168L48 160L40 160ZM64 168L72 168L72 144L80 144L80 152L88 152L88 144L104 144L104 160L112 160L112 144L120 144L120 160L128 160L128 144L176 144L176 152L184 152L184 136L176 136L176 128L152 128L152 136L144 136L144 120L152 120L152 112L144 112L144 104L152 104L152 96L144 96L144 80L160 80L160 64L152 64L152 72L144 72L144 64L152 64L152 56L144 56L144 48L176 48L176 40L160 40L160 32L176 32L176 40L184 40L184 24L152 24L152 32L144 32L144 40L88 40L88 32L112 32L112 24L104 24L104 16L112 16L112 8L104 8L104 0L96 0L96 8L88 8L88 16L96 16L96 24L80 24L80 8L72 8L72 16L64 16L64 32L80 32L80 40L48 40L48 32L56 32L56 24L24 24L24 32L8 32L8 40L24 40L24 72L16 72L16 56L8 56L8 40L0 40L0 64L8 64L8 80L16 80L16 88L24 88L24 96L32 96L32 72L40 72L40 96L32 96L32 104L40 104L40 144L48 144L48 160L64 160ZM96 168L104 168L104 160L96 160ZM160 168L168 168L168 160L160 160ZM88 160L96 160L96 152L88 152ZM168 160L176 160L176 152L168 152ZM8 152L16 152L16 144L8 144ZM24 152L32 152L32 144L24 144ZM16 144L24 144L24 136L16 136ZM48 136L48 48L136 48L136 136ZM56 128L128 128L128 56L56 56ZM8 120L24 120L24 112L32 112L32 104L24 104L24 96L16 96L16 104L0 104L0 112L8 112ZM64 120L64 64L120 64L120 120ZM72 112L112 112L112 72L72 72ZM152 112L160 112L160 104L152 104ZM80 104L80 80L104 80L104 104ZM160 104L176 104L176 88L168 88L168 96L160 96ZM8 96L16 96L16 88L8 88ZM88 96L96 96L96 88L88 88ZM152 96L160 96L160 88L152 88ZM0 88L8 88L8 80L0 80ZM176 88L184 88L184 80L176 80ZM168 80L176 80L176 72L168 72ZM176 72L184 72L184 64L176 64ZM160 64L176 64L176 56L160 56ZM0 32L8 32L8 24L0 24ZM120 32L128 32L128 24L144 24L144 16L152 16L152 8L136 8L136 0L128 0L128 8L120 8L120 16L112 16L112 24L120 24ZM0 16L8 16L8 8L16 8L16 0L0 0ZM16 16L24 16L24 8L16 8ZM32 16L48 16L48 8L56 8L56 0L40 0L40 8L32 8ZM160 16L168 16L168 8L176 8L176 0L160 0ZM24 8L32 8L32 0L24 0ZM112 8L120 8L120 0L112 0Z\" fill=\"#000000\" fill-rule=\"evenodd\" />\n</svg>\n"
},
"credits_used": 3,
"credits_remaining": null
}{
"type": "https://iotools.cloud/docs/errors/validation_error",
"title": "Invalid request",
"status": 400,
"code": "validation_error",
"detail": "One or more inputs are invalid — see `fields`.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11",
"fields": {
"inputString": "Required"
}
}{
"type": "https://iotools.cloud/docs/errors/invalid_api_key",
"title": "Invalid API key",
"status": 401,
"code": "invalid_api_key",
"detail": "Provide 'Authorization: Bearer <key>'.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}{
"type": "https://iotools.cloud/docs/errors/insufficient_credits",
"title": "Insufficient credits",
"status": 402,
"code": "insufficient_credits",
"detail": "This call costs 1 credit and 0 remain in this month's allowance.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11",
"credits_used": 0,
"credits_remaining": 0
}{
"type": "https://iotools.cloud/docs/errors/tool_not_allowed",
"title": "Tool not available over the API",
"status": 403,
"code": "tool_not_allowed",
"detail": "\"Background Remover\" is available on iotools.cloud but has no API endpoint.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}{
"type": "https://iotools.cloud/docs/errors/tool_not_found",
"title": "Tool not found",
"status": 404,
"code": "tool_not_found",
"detail": "No tool with that slug. See GET /v1/tools/list.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}{
"type": "https://iotools.cloud/docs/errors/payload_too_large",
"title": "Payload too large",
"status": 413,
"code": "payload_too_large",
"detail": "Request body exceeds this tool's size limit.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}{
"type": "https://iotools.cloud/docs/errors/rate_limited",
"title": "Rate limit exceeded",
"status": 429,
"code": "rate_limited",
"detail": "Too many requests. Retry in 30s.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11",
"retry_after": 30
}{
"type": "https://iotools.cloud/docs/errors/processing_error",
"title": "Tool failed to run",
"status": 500,
"code": "processing_error",
"detail": "The tool failed to run. Please try again.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11",
"credits_used": 0
}{
"type": "https://iotools.cloud/docs/errors/tool_disabled",
"title": "Tool temporarily disabled",
"status": 503,
"code": "tool_disabled",
"detail": "This tool is temporarily unavailable. Try again shortly.",
"request_id": "e4042b29-8f1e-4c7a-9b52-6f0d1a3c7e11"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Tool output
Show child attributes
Show child attributes
The tool's slug, echoing the {slug} in the request path.
Output-contract version for this tool.
Credits this call consumed, after any settlement refund. 0 when metering is disabled.
Credits left in the current monthly allowance, or null when metering is disabled.
Correlation id, also sent as x-request-id.
Was this page helpful?
⌘I