---
title: "Get the limits of an inpaint preset"
description: "Returns the size limits and redraw presets of an inpaint modelPreset. An unknown preset answers null fields rather than an error. No authentication is needed."
canonical: "https://platform.pixai.art/en/docs/api-v2/image/getInpaintConstraints"
last-updated: "2026-11-02"
---

# Get the limits of an inpaint preset

Returns the size limits and redraw presets of an inpaint `modelPreset`. An unknown preset answers `null` fields rather than an error. No authentication is needed.



## GET https://api.pixai.art/v2/gen-task/inpaint/constraints

Authentication: optional. Send your API key as `Authorization: Bearer <API key>` to read as your account.

Machine-readable OpenAPI spec: https://platform.pixai.art/openapi-spec.v2.yaml

### Parameters

- `modelPreset` (in query, string, required)

### Responses

- `200`
  The preset's limits.
  Body fields:
  - `modelPreset` (string, optional)
  - `constraints` (object | null, optional)
    Size limits for the image, or `null` if the preset sets none.
  - `constraints.minWidth` (integer, optional)
  - `constraints.maxWidth` (integer, optional)
  - `constraints.minHeight` (integer, optional)
  - `constraints.maxHeight` (integer, optional)
  - `constraints.maxPixels` (integer, optional)
    Maximum width × height.
  - `constraints.dimensionStep` (integer, optional)
    Width and height must be multiples of this.
  - `sdeditPresets` (object | null, optional)
    Redraw presets by name, for `sdeditPreset`.
  - `defaultSdeditPreset` (string | null, optional)
