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.