{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/weftly-ai/json-schema/weftly-ai-create-job-response-schema.json",
  "title": "CreateJobResponse",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/weftly-ai-openapi.yml#/components/schemas/CreateJobResponse",
  "type": "object",
  "properties": {
    "job_id": {
      "type": "string",
      "format": "uuid"
    },
    "job_type": {
      "type": "string",
      "enum": [
        "transcribe",
        "summarize",
        "find_clips",
        "extract_clip",
        "extract_vertical_clip",
        "publish_youtube",
        "clips_vertical",
        "clips_from_video",
        "clips_youtube",
        "edit_from_transcript",
        "edit_from_multiple_cameras",
        "audio_from_job"
      ],
      "description": "Type of job to run"
    },
    "payment_status": {
      "type": "string",
      "enum": [
        "pending",
        "authorized",
        "paid",
        "refunded",
        "paid_by_parent",
        "paid_free"
      ],
      "description": "\"paid_free\" indicates a $0 product settled with no Stripe Checkout, MPP challenge, or deposit address minted."
    },
    "price_cents": {
      "type": "integer"
    },
    "checkout_url": {
      "type": "string",
      "format": "uri",
      "description": "Stripe SPT hosted checkout URL. Returned for upload-based jobs (transcribe, summarize, find_clips). Not returned for no-upload derivative jobs (extract_clip, extract_vertical_clip), which are MPP-only."
    },
    "stripe_checkout_session_id": {
      "type": "string",
      "description": "Stripe checkout session id paired with checkout_url. Same conditions as checkout_url."
    },
    "source_job_id": {
      "type": "string",
      "format": "uuid",
      "description": "For derivative jobs (extract_clip, extract_vertical_clip), echoes back the parent job id this job cuts from."
    },
    "next_endpoint": {
      "type": "string",
      "enum": [
        "upload-url",
        "process"
      ],
      "description": "Which endpoint to call after payment. 'upload-url' for transcribe/summarize/find_clips (then PUT bytes, then complete-upload). 'process' for extract_clip/extract_vertical_clip (no upload, /process verifies payment and starts the job in one call)."
    },
    "mpp": {
      "$ref": "#/$defs/MppDepositInfo"
    }
  },
  "required": [
    "job_id",
    "job_type",
    "payment_status",
    "price_cents"
  ],
  "$defs": {
    "MppDepositInfo": {
      "type": "object",
      "properties": {
        "deposit_address": {
          "type": "string"
        },
        "network": {
          "type": "string",
          "enum": [
            "tempo",
            "tempo-testnet"
          ]
        },
        "amount": {
          "type": "string"
        },
        "currency": {
          "type": "string",
          "enum": [
            "USDC",
            "pathUSD"
          ]
        }
      },
      "required": [
        "deposit_address",
        "network",
        "amount",
        "currency"
      ]
    }
  }
}