{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sudomock-com/json-schema/sudomock-com-background-removal-response-schema.json",
  "title": "BackgroundRemovalResponse",
  "description": "The cutout image and where to fetch it.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sudomock-com-background-removal-api-openapi.yml#/components/schemas/BackgroundRemovalResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/BackgroundRemovalData",
      "description": "The cutout image, its dimensions and the credits charged."
    },
    "success": {
      "type": "boolean",
      "description": "Success status",
      "default": true
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "BackgroundRemovalData": {
      "properties": {
        "url": {
          "type": "string",
          "description": "URL of the transparent-PNG cutout"
        },
        "width": {
          "type": "integer",
          "description": "Cutout width in pixels"
        },
        "height": {
          "type": "integer",
          "description": "Cutout height in pixels"
        },
        "credits_charged": {
          "type": "integer",
          "description": "Credits charged for this operation"
        }
      },
      "type": "object",
      "required": [
        "url",
        "width",
        "height",
        "credits_charged"
      ],
      "title": "BackgroundRemovalData",
      "description": "Result payload for POST /api/v1/remove-background."
    }
  }
}