Home  ›  Tool API  ›  QR Code API

QR Code API

Generate a QR code from JSON

Free QR code generator API for URLs, text, and WiFi. POST /api/qrcode returns a PNG data URL. Browser tool + curl, Python, JavaScript. No API key required to start. Free QR code API for agents.

Transparent usage terms REST + MCP Real browser tool

Working examples

Copy it into your stack.

Send text or a URL with an optional size. The JSON response contains a PNG data URL that can be displayed or saved directly.

Copyable requests

curl
curl -X POST https://agentmediatools.com/api/qrcode \
  -H "Content-Type: application/json" \
  -d '{"text":"https://example.com","size":512}'
JavaScript
const res = await fetch("https://agentmediatools.com/api/qrcode", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    text: "https://example.com",
    size: 512
  })
});

const { dataUrl } = await res.json();
console.log(dataUrl);
Python
import requests

response = requests.post(
    "https://agentmediatools.com/api/qrcode",
    json={"text": "https://example.com", "size": 512},
)

data_url = response.json()["dataUrl"]
print(data_url)

Example JSON response

{
  "dataUrl": "data:image/png;base64,iVBORw0KGgo...",
  "text": "https://example.com"
}

Download URLs are temporary. Save results to your own storage when the workflow needs durable retention.

Frequently asked questions

Is there a free QR code API?

Yes. POST /api/qrcode needs no API key for basic free-tier use and returns a PNG data URL.

Can agents create QR codes?

Yes. Use the REST API or the generate_qrcode MCP tool with the text or URL to encode.

Can I make a WiFi QR code?

Yes. Pass a WIFI: payload string as the text field.

Can I customize the output?

Choose size via the API (capped at 1,000px). The browser tool also supports common size and color controls.

One tool now, one integration later

Test it in the browser. Automate it when ready.

The same Agent Media Tools account connects this operation to the wider Tool API and MCP catalog.