AeroModel

Documentation

filetype

Binary format of the returned image.

Values

ValueDescriptionAlphaCompressionTypical 1024 px size
png (default)Lossless PNGLossless80-200 KB
jpg (alias jpeg)Opaque JPEGLossy30-80 KB
webpModern WebPLossy40-100 KB

Choosing the format

Use caseFormat
On-the-fly composition (pitch, scale, background, ...)png (forced)
Standard web displaywebp (best ratio)
Maximum compatibility (legacy browsers)jpg
Transparent background required (overlay)png or webp
Print / high qualitypng

API examples

GET https://api.aeromodel.dash-systems.fr/v1/images/plane?api-key=YOUR_KEY&plane=A320&airline=AF&filetype=png
GET https://api.aeromodel.dash-systems.fr/v1/images/plane?api-key=YOUR_KEY&plane=A320&airline=AF&filetype=jpg
GET https://api.aeromodel.dash-systems.fr/v1/images/plane?api-key=YOUR_KEY&plane=A320&airline=AF&filetype=webp

The three serve the same image in the requested format. File size varies by format.

On-the-fly composition

As soon as a composition option is used — pitch, scale, align, background, backgroundGradient, width, zoomLevel, marginPercent, zoomType, resolution — the output is forced to PNG, regardless of the requested filetype.

Response headers x-format-requested and x-format-coerced indicate the coercion:

x-format-requested: jpg
x-format-coerced: png

Reason: composition uses a PNG decode → manipulate → encode chain optimized for the Workers runtime. JPG/WebP encoders are not bundled to keep bundle size small.

Coercion example

GET https://api.aeromodel.dash-systems.fr/v1/images/plane?api-key=YOUR_KEY&plane=A320&filetype=jpg&pitch=15

→ returns a PNG (with x-format-coerced: png header).

Errors

GET https://api.aeromodel.dash-systems.fr/v1/images/plane?api-key=YOUR_KEY&plane=A320&filetype=svg&format=json
→ 400 { "error": "invalid filetype" }

See also