Skip to main content
POST
Generate a QR code from text, a URL, or another compact value. PNG is the default response. SVG is available when you need a vector result, and base64 returns a PNG data URI inside the normal JSON envelope. In the Playground, select png or svg to receive an image response, or select base64 to inspect the JSON data-URI response. Generated artifacts are real and can consume Development-project credits.
Live Testing Guide: Before using Try it, create a Development project, then enter its Client ID and Client Secret. Configure the relevant provider for that project before sending the request.

API endpoint

POST

Request fields

When logo_url is supplied, AvraAPI fetches the image while producing the code. Use a public image you control; the logo must be reachable, use HTTP or HTTPS, and stay within the 512 KB logo limit. The QR error-correction level is raised automatically so the centred logo remains scannable.

Request example

curl

Media response

For png, the successful response body is the PNG itself with Content-Type: image/png. For svg, it is SVG media with Content-Type: image/svg+xml. Both include Content-Length, Cache-Control: no-store, Content-Disposition: inline, and X-APIX-Request-ID response headers. There is no JSON success envelope for those image formats. Save the binary response or pass it directly to your own image pipeline; do not parse it as JSON.

Base64 JSON response

Use format: "base64" only when a JSON data URI suits your application. It is a PNG data URI, not raw Base64 bytes.
curl

Error codes

See the REST API guide for shared credentials, privacy, and response-handling rules.

Playground resources

The generated reference below lists this endpoint’s API standard details: request fields, authorizations, and response schema. The complete integration guide, request and response examples, and endpoint-specific error handling are above.

Authorizations

X-API-KEY
string
header
required

Your Development project's Client ID. Enter your own value in the Documentation Playground.

X-API-SECRET
string
header
required

Your Development project's Client Secret. Mintlify does not proxy these requests; the browser sends them directly to AvraAPI. Never enter a Production secret in the Documentation Playground.

Headers

X-ENV
enum<string>
default:development

Selects the Development credential environment. The Documentation Playground exposes Development values only; normal backend integrations may use their documented Production credentials outside this tool.

Available options:
dev,
development
Accept
string

Requests a JSON response where the selected operation supports JSON.

Example:

"application/json"

X-Privacy-Mode
boolean
default:false

Optional privacy override. Turn this on to request that AvraAPI suppress request-payload storage in observability logs for this request.

Example:

true

Body

application/json
data
string
required

Text, URL, vCard, or other data to encode.

Required string length: 1 - 4096
format
enum<string>
default:png
Available options:
png,
svg,
base64
size
integer
default:300

Output size in pixels.

Required range: 50 <= x <= 2000
margin
integer
default:2

Quiet-zone margin in modules.

Required range: 0 <= x <= 20
foreground_color
string
default:000000
Pattern: ^#?[0-9a-fA-F]{6}$
background_color
string
default:ffffff
Pattern: ^#?[0-9a-fA-F]{6}$
logo_url
string<uri> | null

A publicly accessible HTTP or HTTPS image. Used for PNG and Base64 output only.

Maximum string length: 2048
logo_size_percent
integer
default:20

Width of the centred logo as a percentage of the QR width.

Required range: 5 <= x <= 40
privacy_mode
boolean

Optional request-level privacy setting. X-Privacy-Mode is the universal header override.

Response

QR output in the requested format.

The response is of type file.

Last modified on October 1, 2026