format · png

PNG Export

High-resolution raster images

Export high-resolution PNG files with transparent backgrounds. Every request automatically generates 1×, 2×, and 3× variants for HiDPI screens.

Features

Multi-resolution

1×, 2×, and 3× automatically from every request.

Transparent background

Alpha channel preserved by default.

Custom size

Specify width and height; output is pixel-perfect at requested dimensions.

Lossless compression

PNGs are compressed with no quality loss.

Example Request

bash
curl -X POST https://api.assetforge.io/v1/generate \
  -H "Authorization: Bearer af_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "tech startup logo, bold geometric",
    "formats": ["png"],
    "width": 512,
    "height": 512,
    "background": "transparent"
  }'

Example Response

json
{
  "assets": [
    {
      "format": "png",
      "url": "https://cdn.assetforge.io/.../logo.png",
      "size_bytes": 8192,
      "width": 512,
      "height": 512
    },
    {
      "format": "png",
      "url": "https://cdn.assetforge.io/.../logo@2x.png",
      "size_bytes": 16384,
      "width": 1024,
      "height": 1024
    },
    {
      "format": "png",
      "url": "https://cdn.assetforge.io/.../logo@3x.png",
      "size_bytes": 36864,
      "width": 1536,
      "height": 1536
    }
  ]
}