{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canva/json-schema/canva-create-image-transformation-job-request-schema.json",
  "title": "CreateImageTransformationJobRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canva-image-transformation-api-openapi.yml#/components/schemas/CreateImageTransformationJobRequest",
  "properties": {
    "asset_id": {
      "description": "The ID of the source asset to transform. The asset must be an image asset;\nreferencing any other asset type (such as a video) fails with an\n`unsupported_content_type` error.\n\nThe asset must also have finished uploading. An asset that is still uploading has no\nimage to transform yet and fails with an `asset_not_ready` error. If you've just\ncreated the asset, poll its upload job — for example with the\n[Get asset upload job](https://www.canva.dev/docs/apps/rest-apis/reference/assets/get-asset-upload-job/)\nendpoint — until it returns a `success` status before starting a transformation.",
      "pattern": "^[a-zA-Z0-9_-]{1,50}$",
      "type": "string"
    },
    "name": {
      "description": "A name for the new image asset that the job produces. Canva doesn't localize this\nvalue, so provide a name in the user's language. When omitted, the new asset inherits\nthe name of the source asset.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "transformations": {
      "description": "The transformations to apply, in order. Must contain at least one transformation.\nEach transformation is stacked on the result of the previous one. The job's result\nis a single new image asset with all of the transformations applied; intermediate\nresults are not returned.",
      "items": {
        "$ref": "#/$defs/ImageTransformationType"
      },
      "maxItems": 20,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "asset_id",
    "transformations"
  ],
  "type": "object",
  "$defs": {
    "BackgroundRemovalImageTransformation": {
      "description": "Removes the background from an image, keeping the foreground subject. The resulting\nimage has a transparent background. This transformation takes no parameters.\n\nThe output image is limited to a maximum of 10 megapixels. If the source image is\nlarger, the output image is scaled down to stay within this limit.\n\nRequires the user to have the `background_removal` capability. To check this before\ncreating a job, use the\n[Get user capabilities API](https://www.canva.dev/docs/apps/rest-apis/reference/users/get-user-capabilities/).",
      "properties": {
        "type": {
          "description": "The type of transformation to apply. Currently, the only supported value is\n`background_removal`.",
          "enum": [
            "background_removal"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "ImageTransformationType": {
      "description": "A transformation to apply to the image asset. Each transformation type is identified\nby its `type` value and declares its own parameters; `background_removal` takes no\nparameters.",
      "oneOf": [
        {
          "$ref": "#/$defs/BackgroundRemovalImageTransformation"
        }
      ]
    }
  }
}