{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/viewmax-studio/json-schema/viewmax-studio-image-model-schema.json",
  "title": "ImageModel",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/viewmax-studio-catalog-api-openapi.yml#/components/schemas/ImageModel",
  "type": "object",
  "required": [
    "id",
    "label",
    "vendor",
    "description",
    "modes",
    "credits_label"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Send as `model`."
    },
    "label": {
      "type": "string"
    },
    "vendor": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "modes": {
      "type": "object",
      "description": "Keyed by scene: `text-to-image`, `image-to-image`.",
      "additionalProperties": {
        "$ref": "#/$defs/ImageModelMode"
      }
    },
    "credits_label": {
      "type": "string"
    }
  },
  "$defs": {
    "ImageModelMode": {
      "type": "object",
      "required": [
        "aspect_ratios",
        "qualities"
      ],
      "properties": {
        "aspect_ratios": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Suggested `options.aspect_ratio` values. An unknown value is replaced by the default (or passed through when the model validates none)."
        },
        "qualities": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Accepted `options.quality` values (case-insensitive). An unknown value becomes the first entry and is billed at that price, except GPT Image 2.5, which returns 400."
        },
        "resolutions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "GPT Image 2.5 `options.resolution` values."
        },
        "credits": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          },
          "description": "Price by quality."
        },
        "credits_per_generation": {
          "type": "number"
        },
        "credits_by_resolution_and_aspect_ratio": {
          "type": "object",
          "description": "GPT Image 2.5: `credits[resolution][aspect_ratio][quality]`.",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "number"
              }
            }
          }
        }
      }
    }
  }
}