{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/convert-online/json-schema/convert-online-create-job-request-schema.json",
  "title": "CreateJobRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/convert-online-openapi.yml#/components/schemas/CreateJobRequest",
  "type": "object",
  "required": [
    "tasks"
  ],
  "properties": {
    "tasks": {
      "type": "object",
      "description": "Named tasks. The key is the name you refer to in another task's `input`.",
      "additionalProperties": {
        "$ref": "#/$defs/Task"
      }
    },
    "tag": {
      "type": "string",
      "maxLength": 255,
      "description": "Your own label, echoed back on the job."
    },
    "sandbox": {
      "type": "boolean",
      "description": "Validate and return a simulated finished job. Nothing converts, no quota is spent, no key is required."
    },
    "import_id": {
      "type": "string",
      "description": "Build the job around a file already sent to an import, instead of an `import/*` task.",
      "pattern": "^[a-f0-9]{32}$"
    }
  },
  "$defs": {
    "Task": {
      "type": "object",
      "required": [
        "operation"
      ],
      "properties": {
        "operation": {
          "type": "string",
          "description": "What this step does.",
          "enum": [
            "import/upload",
            "import/url",
            "import/base64",
            "import/s3",
            "import/sftp",
            "import/googlecloud",
            "convert",
            "export/url",
            "export/s3",
            "export/sftp",
            "export/googlecloud",
            "export/webhook"
          ]
        },
        "input": {
          "description": "The task this one takes its source from. `convert` names one; an export takes a list.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "For `import/url`: where to fetch the source from."
        },
        "input_format": {
          "type": "string",
          "description": "Source format. Optional — inferred from the file name or URL when it can be."
        },
        "output_format": {
          "type": "string",
          "description": "For `convert`: the target format, e.g. `jpg`, `pdf`, `mp3`."
        },
        "options": {
          "type": "object",
          "description": "Conversion settings — resizing, quality, codecs and so on. The names differ per conversion; see the documentation for the pair you are converting.",
          "additionalProperties": true
        }
      }
    }
  }
}