{
 "openapi": "3.1.0",
 "info": {
  "title": "Klipper Studio API",
  "version": "1.0.0 (service 1.0.0)",
  "summary": "Plans and prices, product capabilities, cost estimates, most-replayed moments, content search and clip plans.",
  "description": "Public, read-mostly API for **Klipper Studio** (klipperstudio.com), an AI video clipper for\nIndonesian creators: it turns one long video (podcast, stream, interview) into many short vertical clips for YouTube\nShorts, Instagram Reels and TikTok, with word-by-word subtitles and face-following crop.\n\nUse it to read plans and prices (IDR), product capabilities, the credit cost of a video, the most-replayed moments\nof a YouTube video (free tool), search and read the site's guides as Markdown, and create a monthly clip plan that\ncompares credit packs with time plans.\n\n* **Authentication:** none. Every operation works without an API key, token or sign-up.\n* **Rate limit:** 120 requests per minute per client IP. Every response carries `RateLimit-Limit`,\n  `RateLimit-Remaining`, `RateLimit-Reset` and `RateLimit-Policy`; a 429 adds `Retry-After`. The most-replayed tool\n  has its own stricter limit (10 lookups per 10 minutes per client).\n* **Errors:** RFC 9457 `application/problem+json` with a stable `code` field.\n* **Pagination:** cursor based. Pass `next_cursor` back as `cursor` until `has_more` is false.\n* **Idempotency:** send an `Idempotency-Key` header on POST and PATCH to retry safely.\n* **Async jobs:** `POST /clip-plans` returns `202 Accepted` with a `Location` header to poll.\n* **Versioning:** the major version is in the URL (`/api/v1`). Breaking changes ship as `/api/v2`. A version being\n  retired answers with `Deprecation` and `Sunset` headers at least 90 days before shutdown, and the date is listed\n  in the changelog at https://klipperstudio.com/developers/changelog.\n* **Sandbox:** `https://klipperstudio.com/api/sandbox/v1` mirrors every operation with fixed demo data; clip plans\n  there expire after one hour.\n\nThe API never processes video, never touches user accounts, jobs or payments, and never takes money. Buying a plan\nhappens on the website, paid by the user with QRIS.",
  "termsOfService": "https://klipperstudio.com/syarat-ketentuan",
  "contact": {
   "name": "Klipper Studio developer support",
   "email": "support@akunpy.com",
   "url": "https://klipperstudio.com/developers"
  },
  "license": {
   "name": "Proprietary; free to call within the rate limits",
   "url": "https://klipperstudio.com/syarat-ketentuan"
  },
  "x-api-lifecycle": {
   "version": "v1",
   "status": "stable",
   "deprecation_policy": "https://klipperstudio.com/developers/versioning"
  }
 },
 "servers": [
  {
   "url": "https://klipperstudio.com/api/v1",
   "description": "Production (live prices)."
  },
  {
   "url": "https://klipperstudio.com/api/sandbox/v1",
   "description": "Sandbox: fixed demo data, clip plans expire after one hour."
  }
 ],
 "security": [],
 "tags": [
  {
   "name": "Pricing",
   "description": "Plans, credit packs and cost estimates in IDR."
  },
  {
   "name": "Product",
   "description": "Capabilities and limits."
  },
  {
   "name": "Tools",
   "description": "Free tools that read public video metadata."
  },
  {
   "name": "Content",
   "description": "Search and read website pages and developer docs."
  },
  {
   "name": "Clip plans",
   "description": "Create and update monthly clip plans (async job)."
  }
 ],
 "externalDocs": {
  "description": "Developer guide",
  "url": "https://klipperstudio.com/developers"
 },
 "paths": {
  "/plans": {
   "get": {
    "operationId": "listPlans",
    "summary": "List plans and credit packs",
    "description": "Time plans (days of processing without credit deduction) and credit packs, with price in IDR, per-30-day and per-credit prices, savings and the buy link. Filter by kind.",
    "tags": [
     "Pricing"
    ],
    "parameters": [
     {
      "name": "kind",
      "in": "query",
      "required": false,
      "description": "time_plan or credit_pack.",
      "schema": {
       "type": "string",
       "enum": [
        "time_plan",
        "credit_pack"
       ]
      },
      "example": "time_plan"
     },
     {
      "$ref": "#/components/parameters/Cursor"
     },
     {
      "$ref": "#/components/parameters/Limit"
     }
    ],
    "responses": {
     "200": {
      "description": "One page of plans.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PlanList"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   }
  },
  "/plans/{code}": {
   "get": {
    "operationId": "getPlan",
    "summary": "Get a plan or credit pack",
    "description": "One plan or credit pack by code, with its rules and where to buy it.",
    "tags": [
     "Pricing"
    ],
    "parameters": [
     {
      "name": "code",
      "in": "path",
      "required": true,
      "description": "Code from listPlans.",
      "schema": {
       "type": "string"
      },
      "example": "plan_90d"
     }
    ],
    "responses": {
     "200": {
      "description": "The plan.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Plan"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   }
  },
  "/features": {
   "get": {
    "operationId": "getFeatures",
    "summary": "Get product capabilities",
    "description": "What Klipper Studio does: inputs, limits per job, clip length, export formats, counts (languages, caption styles, memes), billing rules, privacy facts and the feature list.",
    "tags": [
     "Product"
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "Product facts.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Features"
        }
       }
      }
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   }
  },
  "/estimate": {
   "get": {
    "operationId": "estimateJobCost",
    "summary": "Estimate the credit cost of a video",
    "description": "Credits, watermark and number of jobs to process a video of a given length, for a new free account, an account that has bought credits, or an active time plan; includes the cheapest credit packs that cover it. Pure calculation; nothing is processed.",
    "tags": [
     "Pricing"
    ],
    "parameters": [
     {
      "name": "minutes",
      "in": "query",
      "required": true,
      "description": "Minutes of video to process (0.1-600).",
      "schema": {
       "type": "number",
       "minimum": 0.1,
       "maximum": 600
      },
      "example": 45
     },
     {
      "name": "account",
      "in": "query",
      "required": false,
      "description": "free, credits or time_plan.",
      "schema": {
       "type": "string",
       "enum": [
        "free",
        "credits",
        "time_plan"
       ],
       "default": "free"
      }
     },
     {
      "name": "remove_watermark",
      "in": "query",
      "required": false,
      "description": "Free account only: pay 5 credits per job to drop the watermark.",
      "schema": {
       "type": "boolean",
       "default": false
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The estimate.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Estimate"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   }
  },
  "/most-replayed-moments": {
   "get": {
    "operationId": "findMostReplayedMoments",
    "summary": "Find the most-replayed moments of a YouTube video",
    "description": "Reads YouTube's public 'Most replayed' graph and returns the top one-minute moments with chapter names, a watch link and a link that opens Klipper Studio prefilled to clip that moment. YouTube video links only; metadata only, the video is not downloaded. 10 lookups per 10 minutes per client.",
    "tags": [
     "Tools"
    ],
    "parameters": [
     {
      "name": "url",
      "in": "query",
      "required": true,
      "description": "YouTube video link (watch, youtu.be, shorts or live).",
      "schema": {
       "type": "string",
       "minLength": 10,
       "maxLength": 500
      },
      "example": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
     }
    ],
    "responses": {
     "200": {
      "description": "The moments.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Moments"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "422": {
      "$ref": "#/components/responses/UnprocessableEntity"
     },
     "502": {
      "$ref": "#/components/responses/BadGateway"
     },
     "503": {
      "$ref": "#/components/responses/ServiceUnavailable"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   }
  },
  "/search": {
   "get": {
    "operationId": "searchContent",
    "summary": "Search guides, pages and docs",
    "description": "Full-text search over klipperstudio.com pages (features, pricing, guides, comparisons, legal pages) and the developer docs. Returns snippets and the Markdown URL of each page.",
    "tags": [
     "Content"
    ],
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "description": "Search words, e.g. alternatif opus clip.",
      "schema": {
       "type": "string",
       "maxLength": 200
      },
      "example": "subtitle otomatis"
     },
     {
      "name": "kind",
      "in": "query",
      "required": false,
      "description": "Limit to website pages or developer docs.",
      "schema": {
       "type": "string",
       "enum": [
        "page",
        "developer"
       ]
      }
     },
     {
      "$ref": "#/components/parameters/Cursor"
     },
     {
      "$ref": "#/components/parameters/Limit"
     }
    ],
    "responses": {
     "200": {
      "description": "Search results.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SearchResults"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   }
  },
  "/pages/{path}": {
   "get": {
    "operationId": "readPage",
    "summary": "Read a page as Markdown",
    "description": "Full content of one public website page or developer doc as Markdown, by path from searchContent.",
    "tags": [
     "Content"
    ],
    "parameters": [
     {
      "name": "path",
      "in": "path",
      "required": true,
      "description": "Site path without the leading slash, e.g. harga or panduan/alternatif-opus-clip.",
      "schema": {
       "type": "string"
      },
      "example": "harga"
     }
    ],
    "responses": {
     "200": {
      "description": "The page.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Page"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   }
  },
  "/clip-plans": {
   "post": {
    "operationId": "createClipPlan",
    "summary": "Create a clip plan (async job)",
    "tags": [
     "Clip plans"
    ],
    "description": "Start a job that computes what a clipping workload costs: minutes and credits per period, the cheapest credit-pack combination, every time plan's total, fair-use check, the recommended option, export formats and steps. Public numbers only; no video is processed. Returns 202 with a Location to poll. Send Idempotency-Key so a retry never creates a second plan.",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ClipPlanCreate"
       }
      }
     }
    },
    "responses": {
     "202": {
      "description": "Job accepted; poll the Location URL.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       },
       "Location": {
        "$ref": "#/components/headers/Location"
       },
       "Retry-After": {
        "$ref": "#/components/headers/Retry-After"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ClipPlanJob"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "409": {
      "$ref": "#/components/responses/Conflict"
     },
     "415": {
      "$ref": "#/components/responses/UnsupportedMediaType"
     },
     "422": {
      "$ref": "#/components/responses/UnprocessableEntity"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   }
  },
  "/clip-plans/{planId}": {
   "get": {
    "operationId": "getClipPlan",
    "summary": "Get a clip plan",
    "description": "Status and result of a clip-plan job. While status is queued, wait Retry-After seconds and poll again.",
    "tags": [
     "Clip plans"
    ],
    "parameters": [
     {
      "name": "planId",
      "in": "path",
      "required": true,
      "description": "Clip plan id from createClipPlan.",
      "schema": {
       "type": "string"
      },
      "example": "cp_1a2b3c4d5e6f7a8b"
     }
    ],
    "responses": {
     "200": {
      "description": "The plan.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ClipPlan"
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   },
   "patch": {
    "operationId": "updateClipPlan",
    "summary": "Update a clip plan",
    "tags": [
     "Clip plans"
    ],
    "description": "Change videos_per_month, minutes_per_video, horizon_days or platforms; the plan is recomputed and revision increments. Send Idempotency-Key to retry safely.",
    "parameters": [
     {
      "name": "planId",
      "in": "path",
      "required": true,
      "description": "Clip plan id from createClipPlan.",
      "schema": {
       "type": "string"
      },
      "example": "cp_1a2b3c4d5e6f7a8b"
     },
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ClipPlanPatch"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "The recomputed plan.",
      "headers": {
       "RateLimit-Limit": {
        "$ref": "#/components/headers/RateLimit-Limit"
       },
       "RateLimit-Remaining": {
        "$ref": "#/components/headers/RateLimit-Remaining"
       },
       "RateLimit-Reset": {
        "$ref": "#/components/headers/RateLimit-Reset"
       },
       "RateLimit-Policy": {
        "$ref": "#/components/headers/RateLimit-Policy"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ClipPlan"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     },
     "409": {
      "$ref": "#/components/responses/Conflict"
     },
     "415": {
      "$ref": "#/components/responses/UnsupportedMediaType"
     },
     "422": {
      "$ref": "#/components/responses/UnprocessableEntity"
     },
     "429": {
      "$ref": "#/components/responses/TooManyRequests"
     },
     "500": {
      "$ref": "#/components/responses/ServerError"
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Problem": {
    "type": "object",
    "description": "RFC 9457 problem details.",
    "required": [
     "type",
     "title",
     "status",
     "code",
     "detail"
    ],
    "properties": {
     "type": {
      "type": "string",
      "format": "uri",
      "description": "Link to the error's documentation."
     },
     "title": {
      "type": "string",
      "description": "Short summary of the error class."
     },
     "status": {
      "type": "integer",
      "description": "HTTP status code."
     },
     "code": {
      "type": "string",
      "description": "Stable machine-readable error code, e.g. plan_not_found."
     },
     "detail": {
      "type": "string",
      "description": "What went wrong and how to fix the request."
     },
     "instance": {
      "type": "string",
      "description": "Request path that failed."
     }
    }
   },
   "Plan": {
    "type": "object",
    "description": "A time plan (days without credit deduction) or a credit pack.",
    "required": [
     "code",
     "name",
     "kind",
     "price_idr",
     "currency",
     "url",
     "buy_url",
     "description"
    ],
    "properties": {
     "code": {
      "type": "string",
      "description": "Stable id, e.g. lifetime (the 30-day plan), plan_90d or credit_100."
     },
     "name": {
      "type": "string",
      "description": "Name shown on the website (Indonesian)."
     },
     "kind": {
      "type": "string",
      "enum": [
       "time_plan",
       "credit_pack"
      ],
      "description": "time_plan or credit_pack."
     },
     "price_idr": {
      "type": "integer",
      "description": "Price in Indonesian rupiah, tax included."
     },
     "currency": {
      "type": "string",
      "enum": [
       "IDR"
      ],
      "description": "Always IDR."
     },
     "days": {
      "type": [
       "integer",
       "null"
      ],
      "description": "Days of access (time plans)."
     },
     "credits": {
      "type": [
       "integer",
       "null"
      ],
      "description": "Credits included (credit packs); 1 credit = 1 minute of source video."
     },
     "price_per_30_days_idr": {
      "type": "integer",
      "description": "Time plans: price normalised to 30 days."
     },
     "savings_vs_monthly_percent": {
      "type": "integer",
      "description": "Time plans: saving against the 30-day plan."
     },
     "price_per_credit_idr": {
      "type": "number",
      "description": "Credit packs: price per credit."
     },
     "description": {
      "type": "string",
      "description": "What the plan includes and its rules."
     },
     "url": {
      "type": "string",
      "format": "uri",
      "description": "This resource in the API."
     },
     "buy_url": {
      "type": "string",
      "format": "uri",
      "description": "Website page where the signed-in user pays by QRIS."
     }
    }
   },
   "Features": {
    "type": "object",
    "description": "Product capabilities, limits, billing rules and privacy facts.",
    "required": [
     "name",
     "url",
     "summary",
     "inputs",
     "features",
     "billing"
    ],
    "properties": {
     "name": {
      "type": "string",
      "description": "Product name."
     },
     "formerly": {
      "type": "string",
      "description": "Previous name."
     },
     "url": {
      "type": "string",
      "description": "Website."
     },
     "category": {
      "type": "string",
      "description": "Product category."
     },
     "summary": {
      "type": "string",
      "description": "What the product does."
     },
     "inputs": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Accepted video sources."
     },
     "max_minutes_per_job": {
      "type": "integer",
      "description": "Longest section of source video one job processes."
     },
     "long_videos": {
      "type": "string",
      "description": "How longer videos are handled."
     },
     "clips_per_job": {
      "type": "string",
      "description": "Upper bound of clips per job."
     },
     "clip_length_seconds": {
      "type": "object",
      "description": "Clip length range."
     },
     "output_aspect_ratios": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Export formats."
     },
     "counts": {
      "type": "object",
      "description": "Languages, caption styles, fonts, memes, filters, sound effects."
     },
     "billing": {
      "type": "object",
      "description": "Credits, free credits, watermark, time plans, payment, refunds."
     },
     "privacy": {
      "type": "object",
      "description": "Retention and where processing runs."
     },
     "runs_on": {
      "type": "string",
      "description": "Supported devices."
     },
     "free_tool": {
      "type": "object",
      "description": "Free tool without sign-up."
     },
     "contact": {
      "type": "object",
      "description": "Contact and issue-report pages."
     },
     "language": {
      "type": "string",
      "description": "Site language."
     },
     "features": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "group": {
         "type": "string"
        },
        "name": {
         "type": "string"
        },
        "description": {
         "type": "string"
        }
       }
      },
      "description": "Feature list grouped by automatic, studio and export."
     }
    }
   },
   "Estimate": {
    "type": "object",
    "description": "Credit cost of processing one video.",
    "required": [
     "input",
     "jobs",
     "billed_minutes",
     "credits",
     "watermark",
     "max_clips",
     "note"
    ],
    "properties": {
     "input": {
      "type": "object",
      "description": "Echo of the query."
     },
     "jobs": {
      "type": "integer",
      "description": "Jobs needed (one per section of up to 60 minutes)."
     },
     "section_minutes": {
      "type": "array",
      "items": {
       "type": "number"
      },
      "description": "Minutes per section."
     },
     "billed_minutes": {
      "type": "integer",
      "description": "Started minutes billed across sections."
     },
     "credits": {
      "type": "integer",
      "description": "Credits charged; 0 with an active time plan."
     },
     "watermark": {
      "type": "boolean",
      "description": "Whether clips carry the free-tier watermark."
     },
     "max_clips": {
      "type": "integer",
      "description": "Upper bound of clips (10 per job)."
     },
     "covered_by_free_credits": {
      "type": "boolean",
      "description": "Free account: the 10 sign-up credits cover it."
     },
     "cheapest_credit_packs": {
      "type": "object",
      "description": "Cheapest credit-pack combination covering the credits."
     },
     "note": {
      "type": "string",
      "description": "How the price was computed."
     },
     "warning": {
      "type": "string",
      "description": "Present when the video is too long to fetch."
     }
    }
   },
   "Moment": {
    "type": "object",
    "required": [
     "start_seconds",
     "end_seconds",
     "score",
     "watch_url",
     "make_clip_url"
    ],
    "properties": {
     "start_seconds": {
      "type": "number",
      "description": "Start of the one-minute moment."
     },
     "end_seconds": {
      "type": "number",
      "description": "End of the moment."
     },
     "score": {
      "type": "integer",
      "description": "0-100, relative to the strongest moment."
     },
     "chapter": {
      "type": [
       "string",
       "null"
      ],
      "description": "YouTube chapter title at that time."
     },
     "watch_url": {
      "type": "string",
      "format": "uri",
      "description": "YouTube link starting at the moment."
     },
     "make_clip_url": {
      "type": "string",
      "format": "uri",
      "description": "Klipper Studio dashboard prefilled to clip it (needs sign-in)."
     }
    }
   },
   "Moments": {
    "type": "object",
    "description": "Most-replayed moments of a YouTube video (third-party content).",
    "required": [
     "video_url",
     "title",
     "duration_seconds",
     "has_heatmap",
     "moments",
     "note"
    ],
    "properties": {
     "video_url": {
      "type": "string",
      "description": "Video link that was read."
     },
     "title": {
      "type": "string",
      "description": "Video title (from YouTube)."
     },
     "uploader": {
      "type": "string",
      "description": "Channel name."
     },
     "duration_seconds": {
      "type": "number",
      "description": "Video length."
     },
     "thumbnail": {
      "type": "string",
      "description": "Thumbnail URL."
     },
     "has_heatmap": {
      "type": "boolean",
      "description": "Whether YouTube shows replay data."
     },
     "moments": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Moment"
      },
      "description": "Top moments, strongest first (up to 3)."
     },
     "chapters": {
      "type": "array",
      "items": {
       "type": "object"
      },
      "description": "Video chapters."
     },
     "heatmap": {
      "type": "array",
      "items": {
       "type": "number"
      },
      "description": "Replay intensity in 60 buckets (0-1)."
     },
     "note": {
      "type": "string",
      "description": "How to read the result."
     },
     "tool_page": {
      "type": "string",
      "description": "The same tool on the website."
     }
    }
   },
   "SearchHit": {
    "type": "object",
    "required": [
     "title",
     "url",
     "path",
     "kind",
     "snippet",
     "score",
     "markdown_url"
    ],
    "properties": {
     "title": {
      "type": "string",
      "description": "Page title."
     },
     "url": {
      "type": "string",
      "format": "uri",
      "description": "Page URL."
     },
     "path": {
      "type": "string",
      "description": "Path to pass to readPage."
     },
     "kind": {
      "type": "string",
      "enum": [
       "page",
       "developer"
      ],
      "description": "Website page or developer doc."
     },
     "snippet": {
      "type": "string",
      "description": "Matching passage."
     },
     "score": {
      "type": "number",
      "description": "Relevance; higher is better."
     },
     "markdown_url": {
      "type": "string",
      "format": "uri",
      "description": "Markdown version of the page."
     }
    }
   },
   "Page": {
    "type": "object",
    "required": [
     "path",
     "url",
     "title",
     "markdown"
    ],
    "properties": {
     "path": {
      "type": "string",
      "description": "Site path."
     },
     "url": {
      "type": "string",
      "format": "uri",
      "description": "Page URL."
     },
     "title": {
      "type": "string",
      "description": "Page title."
     },
     "description": {
      "type": "string",
      "description": "Meta description."
     },
     "kind": {
      "type": "string",
      "enum": [
       "page",
       "developer"
      ],
      "description": "Website page or developer doc."
     },
     "markdown": {
      "type": "string",
      "description": "Page content as Markdown."
     }
    }
   },
   "ClipPlanCreate": {
    "type": "object",
    "required": [
     "videos_per_month",
     "minutes_per_video"
    ],
    "additionalProperties": false,
    "properties": {
     "videos_per_month": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500,
      "description": "Long videos to clip per month."
     },
     "minutes_per_video": {
      "type": "number",
      "minimum": 1,
      "maximum": 180,
      "description": "Minutes of each video to process (whole video or the chosen section)."
     },
     "horizon_days": {
      "type": "integer",
      "enum": [
       7,
       30,
       90,
       180,
       365
      ],
      "default": 30,
      "description": "Period to price."
     },
     "platforms": {
      "type": "array",
      "maxItems": 6,
      "items": {
       "type": "string",
       "enum": [
        "youtube_shorts",
        "tiktok",
        "instagram_reels",
        "facebook_reels",
        "instagram_feed",
        "youtube"
       ]
      },
      "description": "Where the clips will be posted; sets the export formats."
     }
    }
   },
   "ClipPlanPatch": {
    "type": "object",
    "additionalProperties": false,
    "description": "Fields to change; the plan is recomputed.",
    "properties": {
     "videos_per_month": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500,
      "description": "Long videos to clip per month."
     },
     "minutes_per_video": {
      "type": "number",
      "minimum": 1,
      "maximum": 180,
      "description": "Minutes of each video to process (whole video or the chosen section)."
     },
     "horizon_days": {
      "type": "integer",
      "enum": [
       7,
       30,
       90,
       180,
       365
      ],
      "default": 30,
      "description": "Period to price."
     },
     "platforms": {
      "type": "array",
      "maxItems": 6,
      "items": {
       "type": "string",
       "enum": [
        "youtube_shorts",
        "tiktok",
        "instagram_reels",
        "facebook_reels",
        "instagram_feed",
        "youtube"
       ]
      },
      "description": "Where the clips will be posted; sets the export formats."
     }
    }
   },
   "ClipPlanJob": {
    "type": "object",
    "required": [
     "id",
     "status",
     "status_url"
    ],
    "properties": {
     "id": {
      "type": "string",
      "description": "Plan id, e.g. cp_1a2b3c4d5e6f7a8b."
     },
     "status": {
      "type": "string",
      "enum": [
       "queued",
       "completed"
      ],
      "description": "Job status."
     },
     "status_url": {
      "type": "string",
      "format": "uri",
      "description": "Poll this URL (same as the Location header)."
     },
     "sandbox": {
      "type": "boolean",
      "description": "True when created in the sandbox."
     },
     "message": {
      "type": "string",
      "description": "What to do next."
     }
    }
   },
   "ClipPlan": {
    "type": "object",
    "required": [
     "id",
     "status",
     "revision",
     "input",
     "status_url"
    ],
    "properties": {
     "id": {
      "type": "string",
      "description": "Plan id."
     },
     "status": {
      "type": "string",
      "enum": [
       "queued",
       "completed"
      ],
      "description": "Job status."
     },
     "revision": {
      "type": "integer",
      "description": "Increments on every PATCH."
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Creation time (UTC)."
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last change (UTC)."
     },
     "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "The plan is deleted after this time."
     },
     "input": {
      "$ref": "#/components/schemas/ClipPlanCreate"
     },
     "plan": {
      "type": [
       "object",
       "null"
      ],
      "description": "Result once status is completed.",
      "properties": {
       "horizon_days": {
        "type": "integer",
        "description": "Period priced."
       },
       "videos": {
        "type": "integer",
        "description": "Videos in the period."
       },
       "source_minutes": {
        "type": "number",
        "description": "Minutes of video processed in the period."
       },
       "jobs": {
        "type": "integer",
        "description": "Jobs in the period."
       },
       "credits_needed": {
        "type": "integer",
        "description": "Credits needed on credit packs."
       },
       "average_daily_minutes": {
        "type": "number",
        "description": "Average minutes per day (fair-use check)."
       },
       "max_clips": {
        "type": "integer",
        "description": "Upper bound of clips in the period."
       },
       "options": {
        "type": "array",
        "items": {
         "type": "object"
        },
        "description": "Credit-pack route and every time plan, with totals in IDR."
       },
       "recommended": {
        "type": "object",
        "description": "Cheapest option that fits fair use."
       },
       "free_trial": {
        "type": "object",
        "description": "Sign-up credits and whether they cover the first video."
       },
       "export_formats": {
        "type": "array",
        "items": {
         "type": "string"
        },
        "description": "Aspect ratios for the chosen platforms."
       },
       "steps": {
        "type": "array",
        "items": {
         "type": "string"
        },
        "description": "How to carry out the plan on the website."
       },
       "notes": {
        "type": "string",
        "description": "Caveats."
       }
      }
     },
     "status_url": {
      "type": "string",
      "format": "uri",
      "description": "URL of this plan."
     }
    }
   },
   "PlanList": {
    "type": "object",
    "description": "Time plans (shortest first) then credit packs (smallest first).",
    "required": [
     "data",
     "next_cursor",
     "has_more",
     "total"
    ],
    "properties": {
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Plan"
      }
     },
     "next_cursor": {
      "type": [
       "string",
       "null"
      ],
      "description": "Pass as `cursor` to get the next page; null on the last page."
     },
     "has_more": {
      "type": "boolean",
      "description": "True when another page exists."
     },
     "total": {
      "type": "integer",
      "description": "Total items across all pages."
     }
    }
   },
   "SearchResults": {
    "type": "object",
    "description": "Search results, most relevant first.",
    "required": [
     "data",
     "next_cursor",
     "has_more",
     "total"
    ],
    "properties": {
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/SearchHit"
      }
     },
     "next_cursor": {
      "type": [
       "string",
       "null"
      ],
      "description": "Pass as `cursor` to get the next page; null on the last page."
     },
     "has_more": {
      "type": "boolean",
      "description": "True when another page exists."
     },
     "total": {
      "type": "integer",
      "description": "Total items across all pages."
     }
    }
   }
  },
  "parameters": {
   "Cursor": {
    "name": "cursor",
    "in": "query",
    "required": false,
    "description": "Opaque cursor from `next_cursor` of the previous page.",
    "schema": {
     "type": "string"
    }
   },
   "Limit": {
    "name": "limit",
    "in": "query",
    "required": false,
    "description": "Items per page, 1-50 (default 20).",
    "schema": {
     "type": "integer",
     "minimum": 1,
     "maximum": 50,
     "default": 20
    }
   },
   "IdempotencyKey": {
    "name": "Idempotency-Key",
    "in": "header",
    "required": false,
    "description": "Unique key (8-128 chars, e.g. a UUID) that makes retries safe. The same key with the same body replays the first response for 24 hours; with a different body it returns 409.",
    "schema": {
     "type": "string",
     "minLength": 8,
     "maxLength": 128,
     "pattern": "^[A-Za-z0-9._:-]+$"
    }
   }
  },
  "headers": {
   "RateLimit-Limit": {
    "description": "Requests allowed per window.",
    "schema": {
     "type": "integer"
    }
   },
   "RateLimit-Remaining": {
    "description": "Requests left in the current window.",
    "schema": {
     "type": "integer"
    }
   },
   "RateLimit-Reset": {
    "description": "Seconds until the window resets.",
    "schema": {
     "type": "integer"
    }
   },
   "RateLimit-Policy": {
    "description": "Quota policy, e.g. 120;w=60.",
    "schema": {
     "type": "string"
    }
   },
   "Retry-After": {
    "description": "Seconds to wait before retrying.",
    "schema": {
     "type": "integer"
    }
   },
   "Location": {
    "description": "URL of the created job to poll.",
    "schema": {
     "type": "string",
     "format": "uri"
    }
   },
   "Deprecation": {
    "description": "Present when this API version is deprecated (RFC 9745).",
    "schema": {
     "type": "string"
    }
   },
   "Sunset": {
    "description": "Shutdown date of a deprecated version (RFC 8594).",
    "schema": {
     "type": "string"
    }
   }
  },
  "responses": {
   "BadRequest": {
    "description": "Invalid parameter or cursor.",
    "headers": {
     "RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimit-Limit"
     },
     "RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimit-Remaining"
     },
     "RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimit-Reset"
     },
     "RateLimit-Policy": {
      "$ref": "#/components/headers/RateLimit-Policy"
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   },
   "NotFound": {
    "description": "The resource does not exist.",
    "headers": {
     "RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimit-Limit"
     },
     "RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimit-Remaining"
     },
     "RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimit-Reset"
     },
     "RateLimit-Policy": {
      "$ref": "#/components/headers/RateLimit-Policy"
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   },
   "Conflict": {
    "description": "Idempotency-Key reused with a different body.",
    "headers": {
     "RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimit-Limit"
     },
     "RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimit-Remaining"
     },
     "RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimit-Reset"
     },
     "RateLimit-Policy": {
      "$ref": "#/components/headers/RateLimit-Policy"
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   },
   "UnsupportedMediaType": {
    "description": "Body is not JSON.",
    "headers": {
     "RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimit-Limit"
     },
     "RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimit-Remaining"
     },
     "RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimit-Reset"
     },
     "RateLimit-Policy": {
      "$ref": "#/components/headers/RateLimit-Policy"
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   },
   "UnprocessableEntity": {
    "description": "Body or URL failed validation; `detail` names the problem.",
    "headers": {
     "RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimit-Limit"
     },
     "RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimit-Remaining"
     },
     "RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimit-Reset"
     },
     "RateLimit-Policy": {
      "$ref": "#/components/headers/RateLimit-Policy"
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   },
   "TooManyRequests": {
    "description": "Rate limit exceeded.",
    "headers": {
     "RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimit-Limit"
     },
     "RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimit-Remaining"
     },
     "RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimit-Reset"
     },
     "RateLimit-Policy": {
      "$ref": "#/components/headers/RateLimit-Policy"
     },
     "Retry-After": {
      "$ref": "#/components/headers/Retry-After"
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   },
   "ServerError": {
    "description": "Unexpected server error.",
    "headers": {
     "RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimit-Limit"
     },
     "RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimit-Remaining"
     },
     "RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimit-Reset"
     },
     "RateLimit-Policy": {
      "$ref": "#/components/headers/RateLimit-Policy"
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   },
   "BadGateway": {
    "description": "The upstream moments service failed.",
    "headers": {
     "RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimit-Limit"
     },
     "RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimit-Remaining"
     },
     "RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimit-Reset"
     },
     "RateLimit-Policy": {
      "$ref": "#/components/headers/RateLimit-Policy"
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   },
   "ServiceUnavailable": {
    "description": "The upstream moments service is unreachable.",
    "headers": {
     "RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimit-Limit"
     },
     "RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimit-Remaining"
     },
     "RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimit-Reset"
     },
     "RateLimit-Policy": {
      "$ref": "#/components/headers/RateLimit-Policy"
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   }
  },
  "securitySchemes": {}
 }
}