{"openapi":"3.1.0","info":{"title":"AutoShort API","version":"1.0.0","summary":"Create AI short videos from a topic or a reviewed script, poll them to completion, and read credits.","description":"Authenticate every request with an API key: `Authorization: Bearer sk_live_...` (create one in the dashboard). Rendering is asynchronous: POST /api/v1/videos/generate (or render a draft) returns a video id; poll GET /api/v1/videos/{id} every 20-30 seconds until status is COMPLETED or FAILED, or register a webhook for video.completed / video.failed. Every render costs credits; a short balance is refused up front (402 INSUFFICIENT_CREDITS). Nothing in this API buys credits. Exception, no key needed: POST /api/x402/videos buys one video per call with an x402 USDC payment (tag \"Pay per call (x402)\", only when enabled on the server). Director mode (drafts) lets you agree a script first: creating and editing a draft is free, only POST /api/v1/drafts/{id}/render charges. The same capabilities (plus product ads, image-to-video, series and publishing) are available over MCP at https://autoshort.org/api/mcp (OAuth 2.1 or API key). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Error bodies look like {\"error\": \"...\", \"code\": \"...\"}; some add top-level fields (see each endpoint). Not covered here: API key management (needs a signed-in dashboard session) and the web-app routes behind the MCP product-ad / image-to-video / chat tools.","termsOfService":"https://autoshort.org/en/terms","contact":{"name":"AutoShort","url":"https://autoshort.org"}},"servers":[{"url":"https://autoshort.org"}],"externalDocs":{"description":"Developer portal","url":"https://autoshort.org/en/developers"},"security":[{"bearerAuth":[]}],"tags":[{"name":"Videos","description":"Create, read and delete videos."},{"name":"Drafts","description":"Director mode: agree the script before paying for a render."},{"name":"Motion","description":"AI motion clips (only when enabled on the server)."},{"name":"Series","description":"How your own posted Shorts performed."},{"name":"Account","description":"Credits, usage and plan."},{"name":"Catalog","description":"Valid option values."},{"name":"Webhooks","description":"Signed callbacks for video.completed / video.failed."},{"name":"Pay per call (x402)","description":"No account: pay one video per call in USDC with x402 (only when enabled on the server)."}],"paths":{"/api/v1/videos/generate":{"post":{"operationId":"createVideo","tags":["Videos"],"summary":"Create (enqueue) a video from a topic","description":"Returns immediately with status PENDING; the script is AI-written from the topic. Costs credits (estimatedCredits in the response; the balance is checked before anything is created). The topic goes through a content-safety gate: a refused topic gets 400 CONTENT_POLICY and nothing is charged. The key's daily agent spending cap also applies. To control the exact words, use drafts instead. Requires the \"video:create\" API key scope.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVideoRequest"}}}},"responses":{"201":{"description":"Video queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVideoResponse"}}}},"400":{"description":"INVALID_TOPIC, TOPIC_TOO_LONG, INVALID_NICHE, INVALID_DURATION, INVALID_QUALITY, INVALID_ART_STYLE, INVALID_JSON, an image error code (e.g. IMAGES_EXCEED_SCENES), or CONTENT_POLICY (the topic was refused by content safety; the body also has contentClass).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"INSUFFICIENT_CREDITS. details: creditsAvailable, creditsNeeded, costBreakdown, topUpUrl.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"QUALITY_NOT_IN_PLAN, INSUFFICIENT_SCOPE (details.manageKeysUrl), or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"USER_NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"CONTENT_HOLD: the account is on a content-safety hold or suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CONTENT_CHECK_UNAVAILABLE: the safety check could not run, so the request fails closed (retryable: true). Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/videos":{"get":{"operationId":"listVideos","tags":["Videos"],"summary":"List your videos, newest first","description":"Paginated; optionally filtered by status. Never charges credits. Requires the \"video:read\" API key scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Max videos to return."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0},"description":"Videos to skip."},{"name":"status","in":"query","schema":{"type":"string","enum":["PENDING","GENERATING_SCRIPT","GENERATING_VOICE","FETCHING_MEDIA","RENDERING","COMPLETED","FAILED","DRAFT"]},"description":"Optional status filter (case-insensitive)."}],"responses":{"200":{"description":"A page of videos.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVideosResponse"}}}},"400":{"description":"INVALID_STATUS.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/videos/{id}":{"get":{"operationId":"getVideo","tags":["Videos"],"summary":"Get the status and details of one video","description":"While rendering, estimatedCompletionTime (seconds) may be present. COMPLETED adds videoUrl, thumbnailUrl, duration and script. FAILED adds error. A video waiting for credits carries blockedReason INSUFFICIENT_CREDITS with creditsNeeded, creditsAvailable and topUpUrl: stop polling and top up. Never charges credits. Requires the \"video:read\" API key scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Video id returned by create / render / list.","schema":{"type":"string"}}],"responses":{"200":{"description":"The video.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoDetail"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"VIDEO_NOT_FOUND (also returned for a video owned by someone else).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteVideo","tags":["Videos"],"summary":"Permanently delete one of your videos","description":"Irreversible. Does not refund credits. Requires the \"video:delete\" API key scope. The default key scopes do not include it.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Video id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","required":["message","id"],"properties":{"message":{"type":"string"},"id":{"type":"string"}}}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"VIDEO_NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/videos/{id}/revise":{"post":{"operationId":"reviseScene","tags":["Drafts"],"summary":"Change one scene of an existing video (clones it into a new draft)","description":"Free. Returns a NEW draft with the edit applied; rendering that draft is a separate, separately charged video. Requires the \"video:create\" API key scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id of the video to revise.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseSceneRequest"}}}},"responses":{"201":{"description":"A new draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftView"}}}},"400":{"description":"INVALID_INPUT (scene number out of range, nothing to change) or CONTENT_POLICY (refused by content safety).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"VIDEO_NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"USE_UPDATE_DRAFT (it is still a draft: use PATCH /api/v1/drafts/{id}) or NO_SCENES.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"CONTENT_HOLD: the account is on a content-safety hold or suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CONTENT_CHECK_UNAVAILABLE: the safety check could not run, so the request fails closed (retryable: true). Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/drafts":{"post":{"operationId":"createDraft","tags":["Drafts"],"summary":"Create a director-mode draft (free)","description":"From scenes[] it is free and verbatim: the narration is read exactly as written. From a brief it uses one AI call (needs a positive balance; at most 20 per hour per account). Limits: at most 30 scenes, 1000 narration characters per scene, 4500 in total, and an estimated speaking time of at most 200 seconds. Never charges credits; the draft reports estimatedCredits. Requires the \"video:create\" API key scope.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftRequest"}}}},"responses":{"201":{"description":"The draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftView"}}}},"400":{"description":"INVALID_INPUT, NARRATION_TOO_LONG, UNFILLED_PLACEHOLDER_SCENES or CONTENT_POLICY.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"INSUFFICIENT_CREDITS: drafting from a brief needs a positive balance (scenes[] is free).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"CONTENT_HOLD: the account is on a content-safety hold or suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED: either the key's hourly request limit or the 20 brief drafts per hour per account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"GENERATION_FAILED: the script writer returned no scenes; try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CONTENT_CHECK_UNAVAILABLE: the safety check could not run, so the request fails closed (retryable: true). Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/drafts/{id}":{"get":{"operationId":"getDraft","tags":["Drafts"],"summary":"Read a draft (or the submitted video) as scenes, with estimates","description":"Free. Requires the \"video:read\" API key scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Draft id.","schema":{"type":"string"}}],"responses":{"200":{"description":"The draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftView"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"DRAFT_NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateDraft","tags":["Drafts"],"summary":"Edit, insert, remove or reorder scenes while the draft is still a DRAFT","description":"Free. Scene numbers in edits, reorder, remove and insert all refer to the draft as it is before this call. Requires the \"video:create\" API key scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Draft id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDraftRequest"}}}},"responses":{"200":{"description":"The updated draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftView"}}}},"400":{"description":"INVALID_INPUT, NARRATION_TOO_LONG, UNFILLED_PLACEHOLDER_SCENES or CONTENT_POLICY.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"DRAFT_NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"NOT_A_DRAFT (already submitted), DRAFT_CHANGED (edited concurrently; fetch it again) or UGC_VARIANT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"CONTENT_HOLD: the account is on a content-safety hold or suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CONTENT_CHECK_UNAVAILABLE: the safety check could not run, so the request fails closed (retryable: true). Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/drafts/{id}/render":{"post":{"operationId":"renderDraft","tags":["Drafts"],"summary":"Approve and render a draft (CHARGES credits)","description":"Charges the ledger atomically before any paid work. A draft renders once: calling it again returns the first submission with alreadySubmitted true and creditsCharged 0, whatever idempotencyKey you pass (the key is only recorded). Subject to the key's daily agent spending cap (429 DAILY_SPEND_CAP_EXCEEDED). Only call after the user approved the draft and the price. Requires the \"video:create\" API key scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Draft id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"idempotencyKey":{"type":"string","maxLength":200,"description":"Recorded with the render; a second render of the same draft is already a no-op."}}}}}},"responses":{"200":{"description":"Already submitted earlier; nothing charged now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderDraftResponse"}}}},"202":{"description":"Submitted for rendering (this call charged).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderDraftResponse"}}}},"400":{"description":"CONTENT_POLICY (the draft text was refused by content safety; nothing charged) or INVALID_INPUT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"INSUFFICIENT_CREDITS (details: creditsAvailable, creditsNeeded, topUpUrl).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"DRAFT_NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"DRAFT_CHANGED (edited while render was requested; fetch it and retry) or UGC_VARIANT_LOCKED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"CONTENT_HOLD: the account is on a content-safety hold or suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CONTENT_CHECK_UNAVAILABLE: the safety check could not run, so the request fails closed (retryable: true). Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/motion-clips":{"post":{"operationId":"createMotionClip","tags":["Motion"],"summary":"Create ONE AI motion clip from your own text prompt (CHARGES credits)","description":"Only available when motion tools are enabled on the server (otherwise 404 NOT_AVAILABLE). The prompt is sent as written; no script, narration or stills. Quote first with GET /api/v1/motion-clips/quote. Refused: minors, real or identifiable people, sexual content, protected characters, lip-sync / deepfakes. Poll GET /api/v1/videos/{videoId}. The Idempotency-Key header or idempotencyKey field makes a retry safe. The key's daily agent spending cap applies. Requires the \"video:create\" API key scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Alternative to the idempotencyKey body field."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMotionClipRequest"}}}},"responses":{"200":{"description":"Clip accepted (body includes videoId and the exact price charged).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_AVAILABLE: motion tools are not enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"4XX":{"description":"Invalid input (INVALID_INPUT), a plan / trial limit, a content-safety refusal, or insufficient credits. Always {error, code} (+ details).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/motion-clips/quote":{"get":{"operationId":"quoteVideo","tags":["Motion"],"summary":"Exact credit price of a video before making it (read-only)","description":"Same numbers the create paths charge. Nothing is created or reserved. mode=motion_clip prices one clip for POST /api/v1/motion-clips; mode=stills and mode=mix price the MCP creators (autoshort_generate_video / autoshort_generate_chat_video, and a mixed still+motion video via motion_level), which have no REST create endpoint except POST /api/v1/videos/generate for stills. Requires the \"video:read\" API key scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"mode","in":"query","required":true,"schema":{"type":"string","enum":["stills","mix","motion_clip"]}},{"name":"duration","in":"query","schema":{"type":"number"},"description":"Seconds."},{"name":"resolution","in":"query","schema":{"type":"string"},"description":"Clip resolution (mode=motion_clip)."},{"name":"aspect_ratio","in":"query","schema":{"type":"string","enum":["9:16","1:1","16:9"]}},{"name":"motion_level","in":"query","schema":{"type":"string","enum":["none","hook","highlights","cinematic"]},"description":"Required for mode=mix."},{"name":"tool","in":"query","schema":{"type":"string","enum":["autoshort_generate_video","autoshort_generate_chat_video"]},"description":"mode=stills: which creator to price."}],"responses":{"200":{"description":"The quote.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Includes credits, balance affordability and a userMessage."}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"4XX":{"description":"Invalid input (error + code).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/series/performance":{"get":{"operationId":"getSeriesPerformance","tags":["Series"],"summary":"How your own posted YouTube Shorts performed, per series (read-only)","description":"Per series: videos posted and measured, total / median / mean views, the top 3 and bottom 3 videos (outlierScore = views / series median), and views gained in the last 7 days vs the 7 days before. Only your own videos; views come from daily YouTube snapshots; audience retention is not available. Same data as the MCP tool autoshort_get_series_performance. Never charges credits. Requires the \"video:read\" API key scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"seriesId","in":"query","schema":{"type":"string"},"description":"One of your series ids. Omit for every series with posted videos. Not yours: 404 SERIES_NOT_FOUND."},{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":90,"default":30},"description":"Only videos created in the last N days."}],"responses":{"200":{"description":"The report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesPerformanceReport"}}}},"400":{"description":"INVALID_INPUT (days out of range).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"SERIES_NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/scripts/niches":{"get":{"operationId":"listOptions","tags":["Catalog"],"summary":"List niches, art styles, qualities and durations the generate endpoint accepts","description":"Use it to pick valid niche / artStyle / duration values. Never charges credits. Requires the \"video:read\" API key scope.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Option lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionsResponse"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/credits/balance":{"get":{"operationId":"getCreditBalance","tags":["Account"],"summary":"Current credit balance and plan","description":"Check it before rendering. Never charges credits. Requires the \"credits:read\" API key scope.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Balance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalance"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"USER_NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/usage/stats":{"get":{"operationId":"getUsageStats","tags":["Account"],"summary":"Credit balance, API call counts and recent credit transactions","description":"Read-only. Requires the \"usage:read\" API key scope.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageStats"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/billing/subscription":{"get":{"operationId":"getSubscription","tags":["Account"],"summary":"Plan, subscription status and credit allocation","description":"Read-only. Requires the \"billing:read\" API key scope.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"description":"Missing or invalid API key (code UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the required scope (code INSUFFICIENT_SCOPE; details.manageKeysUrl says where to make a new key) or the IP is not allowlisted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"USER_NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key hourly rate limit exceeded (code RATE_LIMIT_EXCEEDED, Retry-After header). Endpoints that can spend credits can also answer 429 DAILY_SPEND_CAP_EXCEEDED: the key's daily agent spending cap is reached, nothing was started or charged; the body has dailyCreditCap, spentToday, creditsNeeded and resetsInSeconds (the cap resets at 00:00 UTC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/webhooks":{"get":{"operationId":"listWebhooks","tags":["Webhooks"],"summary":"List registered webhooks","description":"Secrets are not shown. Any valid API key works (no specific scope is checked).","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Webhooks.","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createWebhook","tags":["Webhooks"],"summary":"Register an https URL for video.completed / video.failed","description":"Free. The signing secret is returned ONCE: verify X-Webhook-Signature = hex HMAC-SHA256(raw body, secret). The URL must be public https (private addresses are refused). At most 10 per account. Any valid API key works (no specific scope is checked).","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","description":"Shown once."},"delivery":{"type":"string"}}}}}},"400":{"description":"INVALID_JSON, INVALID_URL, INVALID_EVENT or INVALID_INPUT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"WEBHOOK_LIMIT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/webhooks/{id}":{"get":{"operationId":"getWebhook","tags":["Webhooks"],"summary":"One webhook with its recent deliveries","description":"Any valid API key works (no specific scope is checked).","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook id.","schema":{"type":"string"}}],"responses":{"200":{"description":"The webhook.","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"deliveries":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteWebhook","tags":["Webhooks"],"summary":"Delete a webhook","description":"Any valid API key works (no specific scope is checked).","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/x402/videos":{"post":{"operationId":"buyVideoX402","tags":["Pay per call (x402)"],"summary":"Buy one video with an x402 payment (no account, no API key)","description":"x402 v2 pay-per-call, scheme \"exact\", paid in USDC. Only when enabled on the server (503 otherwise). Price per video: $1.00 with the default Google voice, $1.63 with voice=elevenlabs (render credits x $0.02 list price + 25%). Send the request without payment to get 402 with the exact requirements in the PAYMENT-REQUIRED header; sign them and resend the same body with PAYMENT-SIGNATURE. The payment is verified, the topic passes the content-safety gate, the payment is settled, and only then is the render job created (a refused topic is never settled). Returns 202 with jobId, a one-time token and statusUrl. A transient render failure is retried automatically; a final failure is refunded in full to the paying address.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402VideoRequest"}}}},"responses":{"202":{"description":"Paid and queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402JobCreated"}}}},"400":{"description":"INVALID_JSON, INVALID_TOPIC, TOPIC_TOO_LONG, INVALID_ART_STYLE, INVALID_VOICE, INVALID_DURATION, INVALID_LANGUAGE (free, nothing is signed), or CONTENT_POLICY (the payment is not settled).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"PAYMENT_REQUIRED: no or invalid payment; requirements in the PAYMENT-REQUIRED header. Also returned when settlement fails (nothing created).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"PAYMENT_ALREADY_USED.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"CONTENT_HOLD: pay-per-call is paused by content safety; the payment is not settled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMIT_EXCEEDED: too many requests from this IP or this wallet (Retry-After header); nothing is settled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"JOB_CREATE_FAILED: the payment settled but the job could not be created; the full amount is refunded to the paying address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"FACILITATOR_UNAVAILABLE (nothing was charged), or SETTLEMENT_UNKNOWN: the settlement outcome is unknown and is reconciled against the chain (body.reference); if it was charged it is refunded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Pay-per-call is not enabled on this server, or CONTENT_CHECK_UNAVAILABLE.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/x402/videos/{id}":{"get":{"operationId":"getX402Job","tags":["Pay per call (x402)"],"summary":"Status of a pay-per-call job (free)","description":"Requires \"Authorization: Bearer <token>\" with the token returned by the purchase; any other token gets 404. Poll every 20-30 seconds. COMPLETED adds videoUrl, thumbnailUrl and duration; RETRYING means the render is being retried at no cost; FAILED adds error and refund (status OWED, REFUNDED or RECONCILE, to the paying address). A job not delivered within a few hours is ended and refunded.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"jobId from the purchase.","schema":{"type":"string"}}],"responses":{"200":{"description":"Job status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402JobStatus"}}}},"401":{"description":"UNAUTHORIZED: no bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND: no such job for this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key (sk_live_...)","description":"AutoShort API key. Create one in the dashboard; pick the scopes the endpoints below ask for."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable message."},"code":{"type":"string","description":"Stable machine-readable code, e.g. INSUFFICIENT_CREDITS."},"details":{"type":"object","additionalProperties":true}}},"CreateVideoRequest":{"type":"object","required":["topic"],"properties":{"topic":{"type":"string","maxLength":500,"description":"What the video is about. The script is AI-generated from it."},"niche":{"type":"string","enum":["MOTIVATIONAL","SCARY_STORIES","AI_FACTS","HISTORY_FACTS","REDDIT_STORIES","LIFE_HACKS","CRYPTO_FINANCE","PSYCHOLOGY_FACTS","PERSONAL_FINANCE","FUNNY_STORIES","LOVE_STORIES","AI_MUSIC_COVERS","KIDS_SONGS","ABSURD_PROCESS"],"description":"Content niche (default MOTIVATIONAL). GET /api/v1/scripts/niches lists the ones currently offered; the enum here is every value the server parses."},"duration":{"type":"integer","enum":[5,8,15,30,60,90],"default":30,"description":"Target length in seconds (the delivered video is approximate: a target, not a guarantee). Other values get 400 INVALID_DURATION."},"artStyle":{"type":"string","enum":["AUTOSHORTS","LEGO","COMIC_BOOK","DISNEY_TOON","STUDIO_GHIBLI","PIXEL_ART","WATERCOLOR","OIL_PAINTING","CYBERPUNK","FANTASY","ANIME","STICKMAN"],"default":"AUTOSHORTS"},"language":{"type":"string","description":"BCP-47 code such as \"en\", \"vi\", or \"auto\" (default)."},"quality":{"type":"string","enum":["HD_720","FULL_HD_1080"],"description":"Optional. Asking for more than the plan renders gives 403 QUALITY_NOT_IN_PLAN."},"promptHandling":{"type":"string","enum":["assist","as_written"],"default":"assist","description":"promptHandling: \"assist\" (default) or \"as_written\". \"as_written\" = Use my words exactly. If the model refuses a scene, it fails instead of being reworded. It applies to the picture text you wrote; scenes you wrote nothing for are still written by AutoShort, and the answer says which (writtenBy). A refused scene fails with the image model's reason and the credits for what was not made are refunded."},"userImageFiles":{"type":"array","items":{"type":"string"},"description":"File names of images you already ingested through MCP (image_urls); image i goes to scene i. Not URLs."},"webhookUrl":{"type":"string","deprecated":true,"description":"Ignored; register a webhook once with POST /api/v1/webhooks (the response carries a warning)."},"metadata":{"type":"object","additionalProperties":true,"description":"Free-form data stored with the video."}}},"CreateVideoResponse":{"type":"object","required":["id","status","statusUrl","estimatedCredits"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","GENERATING_SCRIPT","GENERATING_VOICE","FETCHING_MEDIA","RENDERING","COMPLETED","FAILED","DRAFT"]},"topic":{"type":"string"},"niche":{"type":["string","null"]},"duration":{"type":"integer"},"artStyle":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"estimatedCompletionTime":{"type":"integer","description":"Seconds."},"estimatedCredits":{"type":"integer","description":"Credits this render costs."},"statusUrl":{"type":"string","description":"Path to poll."},"warnings":{"type":"array","items":{"type":"string"}}}},"VideoSummary":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":["string","null"]},"status":{"type":"string","enum":["PENDING","GENERATING_SCRIPT","GENERATING_VOICE","FETCHING_MEDIA","RENDERING","COMPLETED","FAILED","DRAFT"]},"videoUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"duration":{"type":["number","null"]},"targetDuration":{"type":["number","null"]},"language":{"type":["string","null"]},"artStyle":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ListVideosResponse":{"type":"object","properties":{"videos":{"type":"array","items":{"$ref":"#/components/schemas/VideoSummary"}},"pagination":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"hasMore":{"type":"boolean"}}}}},"VideoDetail":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","GENERATING_SCRIPT","GENERATING_VOICE","FETCHING_MEDIA","RENDERING","COMPLETED","FAILED","DRAFT"]},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"language":{"type":"string"},"artStyle":{"type":"string"},"targetDuration":{"type":["integer","null"]},"duration":{"type":"number"},"videoUrl":{"type":"string"},"thumbnailUrl":{"type":"string"},"script":{"type":"string"},"estimatedCompletionTime":{"type":"integer","description":"Seconds; only while waiting to start."},"error":{"type":"string","description":"Only when FAILED."},"blockedReason":{"type":"string","enum":["INSUFFICIENT_CREDITS"]},"blockedMessage":{"type":"string"},"creditsNeeded":{"type":"integer"},"creditsAvailable":{"type":"integer"},"topUpUrl":{"type":"string"},"aiGenerated":{"type":"boolean","description":"True when the video must be labelled AI-generated."},"userImages":{"type":"object","additionalProperties":true,"description":"Which of your images went to which scene."},"scenePrompts":{"type":"array","description":"Multi-scene videos: per scene, the prompt the image model is asked for (your text behind the fixed art-style prefix), read-only. imagePrompt.state is \"planned\" (predicted from the stored row), \"sent\" (the picture was drawn from this prompt) or \"not_used\" (the scene shows your own image or a clip: no prompt of ours made it, so no text is returned). A scene whose text a content-policy retry or the phone/screen filter replaced carries promptRewritten and promptRewrite {reason, original, rewritten, note}. writtenBy (\"you\" | \"system\") is present only when promptHandling is \"as_written\".","items":{"type":"object","additionalProperties":true}},"promptFixedAdditions":{"type":"array","description":"The fixed pieces the product adds to every image request (art-style prefix, the leading no-lettering sentence, the negative prompt), listed once for the video.","items":{"type":"object","additionalProperties":true}},"promptHandling":{"type":"string","enum":["as_written"],"description":"Present only when chosen. Use my words exactly. If the model refuses a scene, it fails instead of being reworded."},"nextStep":{"type":"string","description":"Present on DRAFT videos."}},"additionalProperties":true},"OptionsResponse":{"type":"object","properties":{"niches":{"type":"array","items":{"$ref":"#/components/schemas/LabeledValue"}},"artStyles":{"type":"array","items":{"$ref":"#/components/schemas/LabeledValue"}},"videoQualities":{"type":"array","items":{"$ref":"#/components/schemas/LabeledValue"}},"durations":{"type":"array","items":{"type":"integer"}}}},"LabeledValue":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}}},"SeriesPerformanceVideo":{"type":"object","properties":{"videoId":{"type":"string"},"title":{"type":"string"},"views":{"type":"integer"},"likes":{"type":"integer"},"comments":{"type":"integer"},"postedAt":{"type":"string","format":"date-time","description":"When the video was created in AutoShort."},"outlierScore":{"type":"number","description":"views / the series median (at least 1)."}}},"SeriesPerformance":{"type":"object","properties":{"seriesId":{"type":"string"},"name":{"type":"string"},"videosPosted":{"type":"integer"},"videosMeasured":{"type":"integer"},"totalViews":{"type":"integer"},"medianViews":{"type":["number","null"]},"meanViews":{"type":["number","null"]},"bestVideos":{"type":"array","items":{"$ref":"#/components/schemas/SeriesPerformanceVideo"}},"worstVideos":{"type":"array","items":{"$ref":"#/components/schemas/SeriesPerformanceVideo"}},"views7d":{"type":["integer","null"],"description":"Views gained in the last 7 days; null when no video has a snapshot that old."},"viewsPrev7d":{"type":["integer","null"]},"note":{"type":["string","null"]}}},"SeriesPerformanceReport":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"windowDays":{"type":"integer"},"series":{"type":"array","items":{"$ref":"#/components/schemas/SeriesPerformance"}},"caveats":{"type":"array","items":{"type":"string"}}}},"CreditBalance":{"type":"object","properties":{"balance":{"type":"integer"},"monthlyAllocation":{"type":"integer"},"bonusCredits":{"type":"integer"},"plan":{"type":"string"}}},"UsageStats":{"type":"object","properties":{"credits":{"type":"object","additionalProperties":true},"apiCalls":{"type":"object","additionalProperties":true},"recentTransactions":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true},"Subscription":{"type":"object","properties":{"plan":{"type":"string"},"hasActiveSubscription":{"type":"boolean"},"videosUsed":{"type":"integer"},"videosLimit":{"type":"integer"},"credits":{"type":"object","properties":{"balance":{"type":"integer"},"monthlyAllocation":{"type":"integer"},"lastResetAt":{"type":["string","null"],"format":"date-time"}}}}},"DraftSceneInput":{"type":"object","required":["narration"],"properties":{"narration":{"type":"string","maxLength":1000,"description":"Exactly what the voice reads for this scene. Read verbatim, never rewritten."},"visual":{"type":["string","null"],"maxLength":600,"description":"What the viewer sees; becomes the image prompt plus the art style. Omit to let AutoShort pick."},"seconds":{"type":["number","null"],"minimum":1,"maximum":30,"description":"Optional scene length in seconds."},"imageFile":{"type":["string","null"],"description":"File name of an image you already ingested through MCP (scenes[].image_url); not a URL."},"speaker":{"type":["string","null"],"maxLength":40,"description":"Who says this line (dialogue). Omit for the narrator."},"voice":{"type":["string","null"],"description":"Google voice name that reads this scene, e.g. \"vi-VN-Chirp3-HD-Aoede\" (free). Omit for the video voice. ElevenLabs ids are refused per scene."}}},"CreateDraftRequest":{"type":"object","description":"Give either scenes[] (free, verbatim, at most 30) or a brief (one AI call).","properties":{"scenes":{"type":"array","maxItems":30,"items":{"$ref":"#/components/schemas/DraftSceneInput"}},"brief":{"type":"string","description":"A brief for AutoShort to write the scenes from."},"title":{"type":"string","maxLength":100},"targetDuration":{"type":"integer","minimum":8,"maximum":90},"aspectRatio":{"type":"string","enum":["9:16","1:1","16:9"]},"language":{"type":"string"},"artStyle":{"type":"string","enum":["AUTOSHORTS","LEGO","COMIC_BOOK","DISNEY_TOON","STUDIO_GHIBLI","PIXEL_ART","WATERCOLOR","OIL_PAINTING","CYBERPUNK","FANTASY","ANIME","STICKMAN"]},"promptHandling":{"type":"string","enum":["assist","as_written"],"default":"assist","description":"promptHandling: \"assist\" (default) or \"as_written\". \"as_written\" = Use my words exactly. If the model refuses a scene, it fails instead of being reworded. It applies to the picture text you wrote; scenes you wrote nothing for are still written by AutoShort, and the answer says which (writtenBy). A refused scene fails with the image model's reason and the credits for what was not made are refunded."}}},"UpdateDraftRequest":{"type":"object","properties":{"promptHandling":{"type":"string","enum":["assist","as_written"],"description":"promptHandling: \"assist\" (default) or \"as_written\". \"as_written\" = Use my words exactly. If the model refuses a scene, it fails instead of being reworded. It applies to the picture text you wrote; scenes you wrote nothing for are still written by AutoShort, and the answer says which (writtenBy). A refused scene fails with the image model's reason and the credits for what was not made are refunded."},"edits":{"type":"array","items":{"type":"object","required":["scene"],"properties":{"scene":{"type":"integer","description":"1-based scene number."},"narration":{"type":"string","maxLength":1000},"visual":{"type":["string","null"],"maxLength":600},"seconds":{"type":["number","null"],"minimum":1,"maximum":30}}}},"insert":{"type":"array","items":{"type":"object","required":["after","narration"],"properties":{"after":{"type":"integer","description":"Insert after this scene number (0 = at the start)."},"narration":{"type":"string","maxLength":1000},"visual":{"type":["string","null"],"maxLength":600},"seconds":{"type":["number","null"],"minimum":1,"maximum":30}}}},"remove":{"type":"array","items":{"type":"integer"},"description":"Scene numbers to remove."},"reorder":{"type":"array","items":{"type":"integer"},"description":"New order as scene numbers."},"title":{"type":"string","maxLength":100},"targetDuration":{"type":["integer","null"]},"aspectRatio":{"type":"string","enum":["9:16","1:1","16:9"]},"language":{"type":"string"},"artStyle":{"type":"string","enum":["AUTOSHORTS","LEGO","COMIC_BOOK","DISNEY_TOON","STUDIO_GHIBLI","PIXEL_ART","WATERCOLOR","OIL_PAINTING","CYBERPUNK","FANTASY","ANIME","STICKMAN"]}}},"ReviseSceneRequest":{"type":"object","required":["scene"],"properties":{"scene":{"type":"integer","description":"1-based scene number to change."},"narration":{"type":"string","maxLength":1000},"visual":{"type":["string","null"],"maxLength":600}}},"DraftView":{"type":"object","properties":{"draftId":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"artStyle":{"type":"string"},"aspectRatio":{"type":["string","null"]},"targetDuration":{"type":["integer","null"]},"estimatedDurationSeconds":{"type":"number"},"estimatedCredits":{"type":"integer","description":"What rendering this draft will cost."},"narrationIsVerbatim":{"type":"boolean","const":true},"scenes":{"type":"array","items":{"type":"object","properties":{"scene":{"type":"integer"},"narration":{"type":"string"},"visual":{"type":["string","null"]},"seconds":{"type":"number"},"words":{"type":"integer"},"estimatedSeconds":{"type":"number"},"imageSource":{"type":"string"},"autoImagePrompt":{"type":"string"}}}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["DURATION_MISMATCH","SCENE_TIMING","LONG_NARRATION"]},"message":{"type":"string"},"scene":{"type":"integer"},"suggestedWords":{"type":"integer"}}}},"nextStep":{"type":"string"}}},"RenderDraftResponse":{"type":"object","required":["videoId","status","submitted","creditsCharged"],"properties":{"videoId":{"type":"string","description":"Poll GET /api/v1/videos/{videoId}."},"status":{"type":"string"},"submitted":{"type":"boolean","description":"False when this was a repeat of an earlier submission (nothing charged now)."},"alreadySubmitted":{"type":"boolean"},"creditsCharged":{"type":"integer","description":"Credits charged by THIS call (0 on a repeat)."},"warnings":{"type":"array","items":{"type":"object","additionalProperties":true}},"message":{"type":"string"}}},"CreateMotionClipRequest":{"type":"object","required":["prompt"],"additionalProperties":false,"description":"Unknown fields are refused with 400 INVALID_INPUT. image_url is currently refused too (400 IMAGE_INPUT_NOT_AVAILABLE), so it is not part of this schema.","properties":{"prompt":{"type":"string","minLength":8,"maxLength":2000,"description":"Sent to the video model as written."},"duration":{"type":"integer","minimum":4,"maximum":12,"default":5,"description":"Seconds."},"resolution":{"type":"string","description":"One of the tiers offered to your plan; GET /api/v1/motion-clips/quote?mode=motion_clip prices it."},"aspect_ratio":{"type":"string","enum":["9:16","1:1","16:9"],"default":"9:16"},"seed":{"type":"integer","minimum":0},"character_id":{"type":"string","description":"The id of one of YOUR OWN READY character sheets (made with the MCP tool autoshort_create_character_sheet or on the series page): the clip starts from that sheet's chosen image. Same price. Not yours or not ready: 404 CHARACTER_NOT_FOUND, nothing charged. Cannot be combined with image_url."},"idempotencyKey":{"type":"string","description":"Same key = same clip, never a second charge."}}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["video.completed","video.failed","*"]}},"description":{"type":["string","null"]},"isActive":{"type":"boolean"},"lastTriggeredAt":{"type":["string","null"],"format":"date-time"},"failureCount":{"type":"integer"},"lastFailureAt":{"type":["string","null"],"format":"date-time"},"lastFailureReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateWebhookRequest":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Public https endpoint."},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["video.completed","video.failed","*"]},"description":"Default: video.completed and video.failed."},"description":{"type":"string","maxLength":200}}},"X402VideoRequest":{"type":"object","required":["topic"],"properties":{"topic":{"type":"string","maxLength":500,"description":"What the video is about; the script is AI-written from it."},"style":{"type":"string","enum":["AUTOSHORTS","LEGO","COMIC_BOOK","DISNEY_TOON","STUDIO_GHIBLI","PIXEL_ART","WATERCOLOR","OIL_PAINTING","CYBERPUNK","FANTASY","ANIME","STICKMAN"],"default":"AUTOSHORTS"},"voice":{"type":"string","enum":["google","elevenlabs"],"default":"google","description":"elevenlabs costs more (see the price)."},"length":{"type":"integer","enum":[15,30,60,90],"default":30,"description":"Target length in seconds."},"language":{"type":"string","default":"auto","description":"BCP-47 code such as \"en\" or \"vi\", or \"auto\"."}}},"X402JobCreated":{"type":"object","required":["jobId","token","status","statusUrl"],"properties":{"jobId":{"type":"string"},"token":{"type":"string","description":"Shown once. Send as \"Authorization: Bearer <token>\" to the status URL."},"status":{"type":"string"},"statusUrl":{"type":"string"},"estimatedCompletionTime":{"type":"integer","description":"Seconds."},"price":{"type":"object","properties":{"usd":{"type":"number"},"credits":{"type":"integer"}}},"payment":{"type":"object","properties":{"transaction":{"type":"string"},"network":{"type":"string"},"payer":{"type":"string"},"amountUsd":{"type":"number"}}},"createdAt":{"type":"string","format":"date-time"}}},"X402JobStatus":{"type":"object","required":["jobId","status"],"properties":{"jobId":{"type":"string"},"status":{"type":"string","description":"PENDING, GENERATING_*, RENDERING, RETRYING, COMPLETED or FAILED."},"videoUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"duration":{"type":["number","null"]},"error":{"type":"string"},"refund":{"type":"object","properties":{"status":{"type":"string","enum":["OWED","REFUNDED","RECONCILE"]},"to":{"type":"string"},"network":{"type":"string"},"amountUsd":{"type":"number"},"transaction":{"type":"string"}}},"payment":{"type":"object","properties":{"transaction":{"type":"string"},"network":{"type":"string"},"payer":{"type":"string"},"amountUsd":{"type":"number"}}}}}}}}