{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/editclips-online/json-schema/editclips-online-create-job-request-schema.json",
  "title": "CreateJobRequest",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/editclips-online-openapi.yaml#/components/schemas/CreateJobRequest",
  "type": "object",
  "required": [
    "tool"
  ],
  "properties": {
    "tool": {
      "type": "string",
      "description": "Tool slug from `GET /api/v1/tools`"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      },
      "description": "Public URLs to input files. Most tools accept 1 input; some (merge, combine) accept multiple. Mutually exclusive with `files`."
    },
    "files": {
      "type": "array",
      "description": "Files to upload. The response will include presigned upload URLs. After uploading, call `POST /jobs/{id}/ready`. Mutually exclusive with `inputs`.",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Filename with extension"
          },
          "size": {
            "type": "integer",
            "description": "File size in bytes (optional, for bookkeeping)"
          }
        }
      }
    },
    "options": {
      "type": "object",
      "additionalProperties": true,
      "description": "Key-value pairs matching the tool's option keys. Omitted options use their defaults."
    },
    "webhook": {
      "type": "string",
      "format": "uri",
      "description": "HTTPS URL to receive a POST when the job completes or fails"
    },
    "durationMs": {
      "type": "integer",
      "description": "Input duration in milliseconds (for credit estimation). Max 3,600,000 (60 min).",
      "maximum": 3600000
    },
    "width": {
      "type": "integer",
      "description": "Input width in pixels (for credit estimation)"
    },
    "height": {
      "type": "integer",
      "description": "Input height in pixels (for credit estimation)"
    }
  }
}