{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aidelly-ai/json-schema/aidelly-ai-create-repurpose-job-request-schema.json",
  "title": "CreateRepurposeJobRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aidelly-ai-openapi.yml#/components/schemas/CreateRepurposeJobRequest",
  "type": "object",
  "required": [
    "sourceType",
    "medium",
    "shape"
  ],
  "additionalProperties": false,
  "properties": {
    "sourceType": {
      "$ref": "#/$defs/RepurposeSourceType"
    },
    "sourceRef": {
      "type": "string",
      "description": "URL for `url`/`youtube`, storage ref for `pdf`, or row id for\n`aidelly_draft` / `aidelly_scheduled`. Required unless `sourceType`\nis `raw_text`.\n"
    },
    "sourceText": {
      "type": "string",
      "description": "Required when `sourceType` is `raw_text`."
    },
    "sourceTitle": {
      "type": "string"
    },
    "medium": {
      "$ref": "#/$defs/RepurposeMedium"
    },
    "shape": {
      "type": "string",
      "minLength": 1,
      "description": "Output shape ID — must be one of the valid shapes for the chosen\n`medium` (an invalid pair returns 400 listing the valid shapes):\ntwitter: single_tweet | thread_3 | thread_5 | thread_10 | thread_script | long_form_article\ninstagram: single_post | carousel_7 | reel_script\nlinkedin: short_post | long_form_1500w | article | carousel_7\ntiktok: caption | video_script | shorts_script\nyoutube: description | video_script | shorts_script\npinterest: pin_description\nthreads: single_post | thread_5\nfacebook: short_post\nsubstack_newsletter: essay_800w | essay_2000w\nsubstack_note: note\nreddit_thread: post_title_and_body\nnewsletter: issue_600w\nemail: subject_and_body\npodcast: episode_outline | show_notes\nlead_resource: lead_magnet_outline | one_pager\ncase_study: case_study_writeup\nbluesky: single_post | thread_3\nmastodon: single_post\ngoogle_business: update_post\n"
    }
  },
  "$defs": {
    "RepurposeMedium": {
      "type": "string",
      "enum": [
        "twitter",
        "instagram",
        "linkedin",
        "tiktok",
        "youtube",
        "pinterest",
        "threads",
        "facebook",
        "substack_newsletter",
        "substack_note",
        "reddit_thread",
        "newsletter",
        "email",
        "podcast",
        "lead_resource",
        "case_study",
        "bluesky",
        "mastodon",
        "google_business"
      ]
    },
    "RepurposeSourceType": {
      "type": "string",
      "enum": [
        "url",
        "youtube",
        "pdf",
        "aidelly_draft",
        "aidelly_scheduled",
        "raw_text"
      ]
    }
  }
}