TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Generate a real, valid PNG image

GEThttps://api.testingapis.com/api/formats/pngSign in to see this endpoint's URL

Parameters 2

NameTypeDescription
sizequery · integer (int32)Width and height in pixels. Default 128; values outside 1–512 are clamped, not rejected. Default: 128.
patternquery · stringgradient (default) or checkerboard. Case-insensitive; unknown values fall back to gradient. Default: "gradient".

Responses

200
An image/png body.
400
size is not an integer.

Example

Request
curl -X GET "https://api.testingapis.com/api/formats/png?size=64" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
Content-Type: image/png

<binary body: 7,871 bytes, image/png>

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.