curl --request GET \
--url https://pictum.dev/v1/qrcode.{format}import requests
url = "https://pictum.dev/v1/qrcode.{format}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://pictum.dev/v1/qrcode.{format}', 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://pictum.dev/v1/qrcode.{format}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pictum.dev/v1/qrcode.{format}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pictum.dev/v1/qrcode.{format}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pictum.dev/v1/qrcode.{format}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>"
}{
"message": "QR code data must be valid base64-encoded UTF-8 text."
}Render a QR code
Render non-empty UTF-8 text as a deterministic SVG, JPEG, PNG, or WebP QR code with optional RGBA foreground and background colors. SVG, PNG, and WebP preserve transparency; JPEG composites transparent colors onto white. Base64 is not encryption; never include secrets because request URLs and responses may be logged or publicly cached.
curl --request GET \
--url https://pictum.dev/v1/qrcode.{format}import requests
url = "https://pictum.dev/v1/qrcode.{format}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://pictum.dev/v1/qrcode.{format}', 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://pictum.dev/v1/qrcode.{format}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pictum.dev/v1/qrcode.{format}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pictum.dev/v1/qrcode.{format}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pictum.dev/v1/qrcode.{format}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>"
}{
"message": "QR code data must be valid base64-encoded UTF-8 text."
}Path Parameters
Output image file extension.
svg, jpg, png, webp Query Parameters
Canonical standard Base64 encoding of 1–512 bytes of UTF-8 text.
4 - 684Square raster size in pixels. Defaults to 256 for JPEG, PNG, and WebP and is ignored for SVG.
64 <= x <= 2048Keep clear space around the QR modules for reliable scanning. Defaults to true.
QR module color as a six-digit RGB or eight-digit RGBA hex value.
^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$QR background color as a six-digit RGB or eight-digit RGBA hex value. Transparency is composited onto white for JPEG output.
^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$Response
Deterministic QR code image.
The response is of type string.