> ## Documentation Index
> Fetch the complete documentation index at: https://docs.occtoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ConversionParametersInput

> Conversion parameters for a preset or for one `convertImage` call. A rule that fails comes back in `errors` as a `ValidationError`, keyed by field (e.g. `Parameters.TargetSize`). A malformed `aspectRatio` or `background` fails the whole request instead: no payload comes back, only a top-level error whose message names the field.



**Kind**: `input`

## Fields

**`aspectRatio`**: `String!` (required)

The canvas's shape as `width:height`, each side a whole number from 1 to 100 without leading zeros (e.g. `4:3`).

---

**`background`**: `String`

The colour behind transparent areas and padding, as six hex digits without `#` (e.g. `FFFFFF`); lower case is stored upper case. Optional with every mode; left out, no background colour is applied.

---

**`mode`**: `ConversionMode!` (required)

How to place the original on the canvas.

---

**`outputFormat`**: `ConversionOutputFormat!` (required)

The file format of the converted image.

---

**`paddingPercent`**: `Int`

Padding on each side as a percentage of `targetSize`, from 0 to 49. Required with `FILL_BACKGROUND` and not allowed with the other modes. The canvas minus the padding on both sides must be at least 1 px.

---

**`quality`**: `Int!` (required)

The output quality, from 1 to 100.

---

**`targetSize`**: `Int!` (required)

The canvas's longer side in pixels, from 1 to 8000.



This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.