PixAI Platform
API v2 DocumentationModel

Get the sizes a model version accepts

Lists the sizes a model version accepts for width/height of POST /v2/image/create. Despite the path, the parameter is a version ID.

A custom width/height must fall inside one range's minWidth–maxWidth and minHeight–maxHeight and be a multiple of its step. Presets are ready-made sizes and may lie outside those bounds. Entries whose accessStatus is membership_required need a higher membership tier than your account has.

GET
/generation-model/{modelVersionId}/size-config

Authorization

bearerAuth
AuthorizationBearer <token>

In all requests that require authentication

In: header

Path Parameters

modelVersionId*string

The model version ID.

Response Body

application/json

application/json

curl -X GET "https://api.pixai.art/v2/generation-model/string/size-config"
{
  "ranges": [
    {
      "name": "string",
      "minWidth": 0,
      "maxWidth": 0,
      "minHeight": 0,
      "maxHeight": 0,
      "step": 0,
      "accessStatus": "available",
      "presets": [
        {
          "id": "string",
          "width": 0,
          "height": 0,
          "ratioLabel": "string",
          "accessStatus": "available"
        }
      ]
    }
  ]
}
{
  "code": "string",
  "status": 0,
  "message": "string",
  "data": {},
  "defined": true
}