{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sudomock-com/json-schema/sudomock-com-background-removal-request-schema.json",
  "title": "BackgroundRemovalRequest",
  "description": "Body for POST /api/v1/remove-background.\n\nImage source priority mirrors AssetInput: base64 > url.",
  "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/BackgroundRemovalRequest",
  "properties": {
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "URL of the image to process (HTTP/HTTPS). Either url or base64 must be provided."
    },
    "base64": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Raw base64-encoded image bytes (no data: prefix). Either url or base64 must be provided."
    },
    "content_type": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^image/(png|jpeg|webp|gif)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional. The file type is detected from the image itself, so this field can be left out."
    },
    "idempotency_key": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "description": "Retry-stable request identifier. Required in both this field and the Idempotency-Key header for Studio calls."
    }
  },
  "additionalProperties": false,
  "type": "object"
}