{"openapi":"3.0.0","info":{"title":"Calliope API","version":"1.12.0","description":"Generate AI-produced short-form and long-form videos from a single request. The API queues a pipeline that writes the script, produces the narration, generates assets, optionally animates them, and renders the final MP4 unless `auto_render` is false. All endpoints require a Bearer API key; create or rotate yours from the dashboard at **Dashboard → API**."},"servers":[{"url":"https://www.calliopelabs.co"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Bearer API key (starts with `clp_live_`). Get or rotate it from Dashboard → API."}},"schemas":{"AgentResponse":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["running","completed","failed"]},"result":{"type":"string"},"error":{"type":"string"}},"required":["agent_id","status"],"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"User-readable error message."},"code":{"type":"string","description":"Machine-readable error code when provided, including EXTRACT_STYLE_BUSY, EXTRACT_STYLE_DAILY_LIMIT or TEMPLATE_NAME_TAKEN."},"template_id":{"type":"string","nullable":true,"format":"uuid","description":"With TEMPLATE_NAME_TAKEN: the existing template that holds that name."}},"required":["error"],"description":"Error payload returned on non-2xx responses."},"DelegateRequest":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"task":{"type":"string","minLength":1,"maxLength":20000},"effort":{"type":"string","enum":["low","high","max"],"description":"Reviewer reasoning effort. Default low."}},"required":["job_id","task"],"additionalProperties":false},"CatalogResponse":{"type":"object","properties":{"catalog":{"type":"string","enum":["templates","captions","split_presets","voices"]},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"default":1},"page_size":{"type":"number","enum":[10,1]},"total":{"type":"integer","minimum":0},"has_more":{"type":"boolean"},"content_type":{"$ref":"#/components/schemas/ContentType"},"visibility":{"type":"string","enum":["mine","community"]},"language":{"type":"string","enum":["en","ja","zh","de","hi","fr","ko","pt","it","es","id","nl","tr","fil","pl","sv","bg","ro","ar","cs","el","fi","hr","ms","sk","da","ta","uk","ru","hu","no","vi"],"description":"Voices only: ISO 639-1 language of the voices. With search it filters the whole library; the curated voices are only in en, es, fr, pt, de, it, so another language without search returns an empty page."},"search":{"type":"string","minLength":1,"maxLength":100,"description":"Voices only: live search of the whole voice library by name, accent, style or voice id. Omitted = the curated voices."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"cover_url":{"type":"string","nullable":true,"format":"uri"},"description":{"type":"string"},"content_types":{"type":"array","items":{"$ref":"#/components/schemas/ContentType"}},"visibility":{"type":"string","enum":["mine","community"]},"badge":{"type":"string","nullable":true,"enum":["GRAPHICS","ANIMATED","NEW",null],"description":"GRAPHICS = code-drawn graphics, taking precedence over ANIMATED (image-to-video) and NEW (published within 15 days)."},"preview_video_url":{"type":"string","nullable":true,"format":"uri"},"kind":{"type":"string","enum":["ring_escape","growing_ball"]},"voice":{"type":"object","properties":{"language":{"type":"string"},"accent":{"type":"string"},"gender":{"type":"string"},"quality":{"type":"string","enum":["High","Medium"]},"flag":{"type":"string","nullable":true,"minLength":2,"maxLength":2},"preview_url":{"type":"string","format":"uri"}},"required":["language","accent","gender","quality","flag","preview_url"],"additionalProperties":false,"description":"Voices only. `id` is the voice_id at this quality (v4_ High, t_ Medium); preview_url = a short sample."}},"required":["id","name","cover_url"],"additionalProperties":false},"maxItems":10},"template":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"content_type":{"type":"string","enum":["short","video"],"description":"Format this card describes: price, voice and demo are for it."},"content_types":{"type":"array","items":{"$ref":"#/components/schemas/ContentType"},"minItems":1,"description":"Formats this account can generate with the template."},"visibility":{"type":"string","enum":["mine","community"]},"badge":{"type":"string","nullable":true,"enum":["GRAPHICS","ANIMATED","NEW",null],"description":"GRAPHICS = code-drawn graphics, taking precedence over ANIMATED (image-to-video) and NEW (published within 15 days)."},"cover_url":{"type":"string","nullable":true,"format":"uri"},"creator":{"type":"object","properties":{"name":{"type":"string"},"published_templates":{"type":"integer","nullable":true,"minimum":0}},"required":["name","published_templates"],"additionalProperties":false,"description":"Public creator name and how many templates they published; published_templates is null while this template is unpublished."},"uses":{"type":"integer","nullable":true,"minimum":0,"description":"Videos made with the template. Null while it is unpublished."},"credits_per_minute":{"type":"integer","nullable":true,"minimum":0,"description":"Credits of one minute of video with the template's own settings. Null while a Graphics price is pending or when it cannot be estimated."},"qualities":{"type":"object","properties":{"image":{"type":"string","nullable":true},"scene_frequency":{"type":"string","nullable":true},"animated":{"type":"boolean"},"motion_graphics_only":{"type":"boolean"},"video":{"type":"string","nullable":true},"animated_clips":{"type":"string","nullable":true}},"required":["image","scene_frequency","animated","motion_graphics_only","video","animated_clips"],"additionalProperties":false,"description":"Website labels of the template's settings, eg. image \"High\", video \"Extra High\", scene_frequency \"Balanced (1:4s)\", animated_clips \"All Clips\" or \"1/3\". Null = not used by this template."},"voiceover":{"type":"boolean","description":"false = No Voiceover: no narrator, the clips speak."},"voice":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"quality":{"type":"string","nullable":true,"enum":["High","Medium",null]},"cloned":{"type":"boolean"},"preview_url":{"type":"string","nullable":true,"format":"uri"},"flag":{"type":"string","nullable":true,"minLength":2,"maxLength":2},"language":{"type":"string","nullable":true}},"required":["name","quality","cloned","preview_url","flag","language"],"additionalProperties":false,"description":"Narration voice; null with No Voiceover. preview_url only for cloned voices. language = ISO 639-1 language the voice was made for (the default language of its videos), null when unknown. flag = ISO country of its accent (the website's flag), null for cloned or unknown voices."},"demo":{"type":"object","nullable":true,"properties":{"video_url":{"type":"string","format":"uri"},"trim_start_sec":{"type":"number","minimum":0},"trim_end_sec":{"type":"number","minimum":0}},"required":["video_url","trim_start_sec","trim_end_sec"],"additionalProperties":false,"description":"Example video with audio. trim_end_sec 0 = play to the end."},"quality_demos":{"type":"array","items":{"type":"object","properties":{"tier":{"$ref":"#/components/schemas/VideoModelTier"},"quality":{"type":"string"},"video_url":{"type":"string","format":"uri"},"square":{"type":"boolean"},"music_added":{"type":"boolean"},"credits_per_minute":{"type":"integer","nullable":true,"minimum":0}},"required":["tier","quality","video_url","square","music_added","credits_per_minute"],"additionalProperties":false},"description":"One demo per video quality, best first, each with its price per minute; when present they replace demo. music_added = music was added after generation: videos come without it."},"motion_graphics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"frequency":{"type":"string"}},"required":["name","frequency"],"additionalProperties":false},"description":"Graphics the editing agent may add, and how often."},"inspired_by":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"avatar_url":{"type":"string","nullable":true,"format":"uri"}},"required":["platform","name","url","avatar_url"],"additionalProperties":false},"description":"Channels the creator took the style from."},"references":{"type":"array","nullable":true,"items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"type":"string","maxLength":50}},"required":["url","label"],"additionalProperties":false},"description":"Own templates only (null for public ones): visual references, the Template Master Reference included."},"visual_style":{"type":"string","nullable":true,"description":"Own templates only: first 1200 characters; get_template returns the full text."},"video_style":{"type":"string","nullable":true,"description":"Own templates only: first 1200 characters."},"scripting_style":{"type":"string","nullable":true,"description":"Own templates only: first 1200 characters."}},"required":["id","name","description","content_type","content_types","visibility","badge","cover_url","creator","uses","credits_per_minute","qualities","voiceover","voice","demo","quality_demos","motion_graphics","inspired_by","references","visual_style","video_style","scripting_style"],"additionalProperties":false,"description":"Only with template_id: the template's card."}},"required":["catalog","page_size","total","has_more","items"],"additionalProperties":false,"description":"One page of static covers, or one template's card with template_id. Caption IDs select captionsParameters.style or clipping options.caption_style; template IDs select template_id; split preset IDs select framing.split_screen.filler.preset_id in reframe_clip; voice IDs select voice_id (voiceId in replace_audio). Templates carry a muted hover demo in preview_video_url when available; split presets carry a short loop and kind."},"ContentType":{"type":"string","enum":["short","video"],"description":"Whether to generate a short-form or long-form video."},"VideoModelTier":{"type":"string","enum":["low","medium","high","extra"],"description":"Video model tier: `low`, `medium`, `high` or `extra`. Same four steps the UI video selector exposes."},"ListTemplatesResponse":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true},"page_size":{"type":"number","enum":[20]},"total":{"type":"integer","minimum":0},"has_more":{"type":"boolean"}},"required":["templates","page","page_size","total","has_more"],"additionalProperties":false,"description":"List of public templates and own projects available to the authenticated account."},"Template":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1},"content_types":{"type":"array","items":{"$ref":"#/components/schemas/ContentType"},"minItems":1},"description":{"type":"string","minLength":1},"cover_url":{"type":"string","nullable":true,"description":"Cover image of the template: its cover or last reference image; own projects without one use the thumbnail of their latest completed generation. Null when there is none."},"preview_video_url":{"type":"string","nullable":true,"description":"Short example video of the template, when available. Templates with one demo per video quality return the demo of the tier the requested `quality` generates with that template (default: the template's own quality). Own projects without a cover return their latest completed generation, whose first frame stands in for the cover."},"visibility":{"type":"string","enum":["mine","community"],"description":"\"mine\" = a project of this account (readable and editable); \"community\" = public template (usable, not editable)."},"badge":{"type":"string","nullable":true,"enum":["GRAPHICS","ANIMATED","NEW",null],"description":"GRAPHICS = code-drawn graphics, taking precedence over ANIMATED (image-to-video) and NEW (published within 15 days)."}},"required":["id","name","content_types","description","cover_url","preview_video_url","visibility","badge"],"additionalProperties":false,"description":"A template available for API generations."},"TemplateDetail":{"type":"object","properties":{"template_id":{"type":"string","format":"uuid"},"allow_copy":{"type":"boolean"},"status":{"$ref":"#/components/schemas/GenerationStatus"},"content_type":{"$ref":"#/components/schemas/ContentType"},"workspace":{"type":"boolean"},"workspace_3d":{"type":"boolean","description":"True when the Graphics template explicitly requires 3D. Calliope Agent uses Blender by default; an external author can choose the engine."},"name":{"type":"string"},"description":{"type":"string"},"visual_style":{"type":"string","nullable":true},"visual_references":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"type":"string","maxLength":50}},"required":["url","label"],"additionalProperties":false}},"reference_videos":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"type":"string","maxLength":50}},"required":["url","label"],"additionalProperties":false},"description":"Video references with playable links for the template owner."},"reference_video_count":{"type":"integer","minimum":0,"description":"Number of saved video references on this branch, separate from the reference images and example renders."},"songs":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"name":{"type":"string"}},"required":["path","name"]},"description":"Uploaded music available in this template; use path with register_upload."},"scripting_style":{"type":"string","nullable":true},"video_style":{"type":"string","nullable":true,"description":"Reusable motion direction, including extracted video style when available. Only affects animated clips; null when no video style is saved."},"graphic_instructions":{"type":"string","nullable":true},"real_people":{"type":"object","nullable":true,"properties":{"auto":{"type":"boolean"},"instructions":{"type":"string"},"style":{"type":"string","enum":["mix","polaroid","full","card","polaroid_title","full_title"]},"editorial_use_confirmed":{"type":"boolean","description":"Read-only editorial-use confirmation for this template branch."}},"required":["auto","instructions","editorial_use_confirmed"],"additionalProperties":false,"description":"Real People & Places setting of this content branch; null when never set."},"analysis_job_id":{"type":"string","nullable":true,"format":"uuid"},"error":{"type":"string","nullable":true}},"required":["template_id","allow_copy","status","content_type","workspace","name","description","visual_style","visual_references","reference_video_count","songs","scripting_style","video_style","graphic_instructions","real_people","analysis_job_id","error"],"additionalProperties":false,"description":"Reusable API template state and editable visual settings."},"GenerationStatus":{"type":"string","enum":["Queued","Processing","Waiting","Completed","Failed"],"description":"Current status of a generation."},"TemplateAnalysis":{"type":"object","properties":{"analysis_job_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/GenerationStatus"},"content_type":{"$ref":"#/components/schemas/ContentType"},"template_id":{"type":"string","nullable":true,"format":"uuid","description":"Null until the video style analysis is Completed."},"error":{"type":"string","nullable":true}},"required":["analysis_job_id","status","content_type","template_id","error"],"additionalProperties":false,"description":"Async video template analysis state. The template_id is returned only when the analysis is completed."},"RateLimitErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"metric":{"type":"string","description":"Name of the rate-limited metric (e.g. api_generations)."},"dailyLimit":{"type":"integer","description":"Allowed requests in a rolling 24h window."},"usedCount":{"type":"integer","description":"Requests already consumed in the current window."},"remaining":{"type":"integer","description":"Requests left before the next window."}},"required":["error","metric","dailyLimit","usedCount","remaining"],"description":"Error payload returned when the API daily limit is exceeded."},"CreateTemplateRequest":{"type":"object","properties":{"source_template_id":{"type":"string","format":"uuid","description":"Copy reusable settings and files from an owned or public template by reference, without commission. Private voice samples and narration stay private; legacy files without a grant are omitted. Only name may override the copy. Others cannot copy when allow_copy is false."},"allow_copy":{"type":"boolean","description":"Allow others to copy this template. Defaults to true; editable immediately after publishing."},"content_type":{"$ref":"#/components/schemas/ContentType"},"workspace":{"type":"boolean","description":"Graphics-only code template, for Shorts or Videos up to 180 seconds. Requires voiceover; classic effects are unavailable, and generate_clip makes standalone AI images or videos for its code. Beta generation supports Shorts up to 180 seconds."},"name":{"type":"string","minLength":1,"maxLength":60,"description":"Template name. Max 60 chars. Defaults to an API template name."},"description":{"type":"string","maxLength":150,"description":"Template description. Max 150 chars."},"source":{"anyOf":[{"$ref":"#/components/schemas/TemplateVideoSource"},{"$ref":"#/components/schemas/TemplateManualSource"}]},"quality":{"type":"string","enum":["medium","high","extra"],"description":"Optional quality preset saved on the template."},"custom":{"type":"object","properties":{"image_model":{"type":"string","enum":["low","medium","high","extra"],"description":"Image model tier."},"video_model":{"type":"string","enum":["low","medium","high","extra"],"description":"Video model tier. Only applies when animated; all tiers support native speech with voiceover:false. Extra High animated scenes require at least 4 seconds and use low scene frequency. A template can limit its video tiers: any other keeps the template's own."},"every_n_images":{"type":"integer","minimum":1,"maximum":5,"description":"Animate one out of every N images. 1 = every clip."}},"additionalProperties":false,"description":"Optional manual model overrides saved on the template, applied on top of `quality`."},"visual_frequency":{"type":"string","enum":["low","balanced","high"],"description":"Optional visual scene frequency override, about 1 scene every: `low` 6s, `balanced` 4s, `high` 2s. Default (none saved): `balanced` in shorts, `low` in videos. Animated Extra High uses `low`. Ignored with voiceover:false (No Voiceover scenes follow the storyboard). Saved on the template."},"animate":{"type":"boolean","description":"Whether generated images should be animated by default for this template. Defaults to false."},"captions":{"type":"boolean","description":"Default captions switch saved on the template. Defaults to false."},"voice_id":{"anyOf":[{"type":"string","enum":["v4_yl2ZDV1MzN4HbQJbMihG","t_yl2ZDV1MzN4HbQJbMihG","v4_tnSpp4vdxKPjI9w0GnoV","t_tnSpp4vdxKPjI9w0GnoV"]},{"type":"string","pattern":"^(v4_|t_)[A-Za-z0-9]{16,}$"},{"type":"string","pattern":"^my_voice_[A-Za-z0-9_-]+$"}],"description":"Optional default narration voice saved on the template."},"voiceover":{"type":"boolean","description":"false = No Voiceover: no TTS narrator, on-screen characters speak the quoted storyboard lines. Forces image_to_video on every clip and selects the No Voiceover quality presets."},"video_style":{"type":"string","maxLength":5000,"description":"Direction for how video clips move and speak (camera, acting, delivery). Applies to any animated clip: voiceover false or animate on."},"scripting_style":{"type":"string","maxLength":2500,"description":"Optional scripting style saved on the template. Max 2500 chars."},"accept_media_policy":{"type":"boolean","description":"Link sources only: acceptance of the Video Style & Media Download Policy. Agents (API key, MCP): omitted = accepted; false = 400 POLICY_NOT_ACCEPTED. Web session: send true."}},"additionalProperties":false,"description":"Create with content_type and source, or copy reusable settings and files by reference with only source_template_id and optional name. Copying is free; private voice samples and narration stay private, and legacy files without a grant are omitted."},"TemplateVideoSource":{"type":"object","properties":{"socials_video_url":{"type":"string","minLength":1,"maxLength":500,"description":"Public video link from YouTube, TikTok, Instagram, Facebook, X or LinkedIn, playable without login, up to 10 h. Send exactly one of socials_video_url or source_upload_path."},"youtube_url":{"type":"string","minLength":1,"maxLength":500,"description":"Deprecated alias of socials_video_url. Removed on 2026-12-10.","deprecated":true},"source_upload_path":{"type":"string","maxLength":1000,"description":"r2:// path of an MP4, MOV or WEBM (up to 5 GB) returned by register_upload and already uploaded. The file stays in your storage."},"source_duration_sec":{"type":"number","minimum":30,"maximum":7200,"description":"Required with source_upload_path: the video duration in seconds (30 s to 2 h)."},"extract_video_style":{"type":"boolean","description":"Smart analysis on every paid plan: analyze up to the middle 10 minutes of the selected range for reusable motion direction. Defaults to true unless video_style is supplied explicitly; false skips motion only. Only affects animated clips; does not enable animation. Explicit true replaces video_style on successful analysis."},"prompt":{"type":"string","maxLength":2000,"description":"Smart only. Optional extraction focus and requested style changes, up to 2000 characters. Compatible references may be retained even when they do not depict the requested focus."},"range_start_sec":{"type":"number","minimum":0,"description":"Smart only. Absolute start in seconds. Send with range_end_sec; the selected range must last 30 seconds to 30 minutes. Available for YouTube and uploads."},"range_end_sec":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Smart only. Absolute end in seconds, within the source duration. Motion analysis, when enabled, uses up to the middle 10 minutes of this range."}},"additionalProperties":false,"description":"Extract a reusable style from your own upload on any paid plan, or from a social video link on Pro/Creator. Smart selects 3-7 references from 50 and supports prompt, range and best-effort motion analysis. Image style remains usable if motion analysis fails."},"TemplateManualSource":{"type":"object","properties":{"visual_style":{"type":"string","maxLength":50000,"description":"Reusable look: max 5000 chars, or 50000 for workspace Graphics templates."},"visual_references":{"type":"array","items":{"$ref":"#/components/schemas/TemplateVisualReference"},"maxItems":35,"description":"Up to 8 visual references plus a master; workspace Graphics templates allow 35 total."}},"additionalProperties":false,"description":"Create a template from explicit visual style text and/or visual references."},"TemplateVisualReference":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"PNG/JPG/WEBP image URL or private storage ref. HTTP(S) images are copied into Calliope storage."},"label":{"type":"string","maxLength":50,"description":"Optional reference label. Max 50 chars."}},"required":["url"],"additionalProperties":false,"description":"One VisualStyle Lab reference image."},"UpdateTemplateRequest":{"type":"object","properties":{"allow_copy":{"type":"boolean","description":"Allow others to copy this template. Defaults to true for existing templates; changes apply immediately without publication review. The owner can always copy."},"content_type":{"type":"string","enum":["short","video"],"description":"Content branch to edit. Required when the template supports both short and video."},"workspace":{"type":"boolean","description":"Enable or disable a Graphics-only code template (Shorts or Videos, up to 180 seconds). Requires voiceover. Limits are checked against the final saved format."},"name":{"type":"string","minLength":1,"maxLength":60,"description":"Template name. Max 60 chars."},"description":{"type":"string","maxLength":150,"description":"Template description. Max 150 chars."},"visual_style":{"type":"string","maxLength":50000,"description":"Complete replacement for this format's visualStyle. Max 5000 chars for classic, 50000 for workspace Graphics templates. Empty removes."},"visual_references":{"type":"array","items":{"$ref":"#/components/schemas/TemplateVisualReference"},"maxItems":35,"description":"Complete replacement: 8 references plus a master for classic, 35 total for workspace Graphics templates. Send [] to remove. The template_master_ref is kept unless replaced."},"quality":{"type":"string","enum":["medium","high","extra"],"description":"Optional quality preset to save on the template."},"custom":{"type":"object","properties":{"image_model":{"type":"string","enum":["low","medium","high","extra"],"description":"Image model tier."},"video_model":{"type":"string","enum":["low","medium","high","extra"],"description":"Video model tier. Only applies when animated; all tiers support native speech with voiceover:false. Extra High animated scenes require at least 4 seconds and use low scene frequency. A template can limit its video tiers: any other keeps the template's own."},"every_n_images":{"type":"integer","minimum":1,"maximum":5,"description":"Animate one out of every N images. 1 = every clip."}},"additionalProperties":false,"description":"Optional manual model overrides to save on the template, applied on top of `quality`."},"visual_frequency":{"type":"string","enum":["low","balanced","high"],"description":"Optional visual scene frequency override, about 1 scene every: `low` 6s, `balanced` 4s, `high` 2s. Default (none saved): `balanced` in shorts, `low` in videos. Animated Extra High uses `low`. Ignored with voiceover:false (No Voiceover scenes follow the storyboard). Saved on the template."},"animate":{"type":"boolean","description":"Whether generated images should be animated by default for this template."},"captions":{"type":"boolean","description":"Default captions switch saved on the template."},"voice_id":{"anyOf":[{"type":"string","enum":["v4_yl2ZDV1MzN4HbQJbMihG","t_yl2ZDV1MzN4HbQJbMihG","v4_tnSpp4vdxKPjI9w0GnoV","t_tnSpp4vdxKPjI9w0GnoV"]},{"type":"string","pattern":"^(v4_|t_)[A-Za-z0-9]{16,}$"},{"type":"string","pattern":"^my_voice_[A-Za-z0-9_-]+$"}],"description":"Optional default narration voice saved on the template."},"voiceover":{"type":"boolean","description":"false = No Voiceover: no TTS narrator, on-screen characters speak the quoted storyboard lines. Forces image_to_video on every clip."},"video_style":{"type":"string","maxLength":5000,"description":"Direction for how video clips move and speak (camera, acting, delivery). Applies to any animated clip: voiceover false or animate on. Send an empty string to remove."},"scripting_style":{"type":"string","maxLength":2500,"description":"Complete replacement for scripting style. Send an empty string to remove."},"graphic_instructions":{"type":"string","maxLength":4000,"description":"Complete replacement for the general editing guidance the auto-edit agent follows in every video of this template (how many effects, transitions and motion graphics, and of which kind). Send an empty string to remove."},"reference_video":{"anyOf":[{"nullable":true},{"type":"object","properties":{"add_media_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":3,"description":"Append one to three completed download_media MP4 results from your account, up to 100 MiB each, without analysis. Repeated assets are ignored. Do not combine with the other reference_video options."},"prompt":{"type":"string","maxLength":2000},"job_id":{"type":"string","format":"uuid"},"snippets":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","maxLength":1024},"start_sec":{"type":"number","minimum":0},"end_sec":{"type":"number","minimum":0,"exclusiveMinimum":true},"label":{"type":"string","maxLength":120}},"required":["path","start_sec","end_sec"],"additionalProperties":false},"maxItems":3},"sheets":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","maxLength":1024},"kind":{"type":"string","enum":["overview","snippet","transition","camera","subject"]},"start_sec":{"type":"number","minimum":0},"end_sec":{"type":"number","minimum":0,"exclusiveMinimum":true},"reason":{"type":"string","maxLength":300}},"required":["path","kind","start_sec","end_sec"],"additionalProperties":false},"maxItems":7}},"additionalProperties":false}],"description":"Reference videos. add_media_ids appends completed MP4 downloads without analysis. null removes reference videos with their snippets and sheets. prompt replaces the first video's instructions. snippets and sheets replace its selection with saved project files of job_id (one of your videos; its media/ is read-only), up to 100 MiB each with distinct file names."},"job_id":{"type":"string","format":"uuid","description":"One of your videos of this format, usually made from this template: its project files (`setup.sh`, `TEMPLATE.md`, code) replace the template's; the other settings stay. Templates are editable: never save a copy to change files."},"real_people":{"type":"object","properties":{"auto":{"type":"boolean"},"instructions":{"type":"string","maxLength":1000},"style":{"type":"string","enum":["mix","polaroid","full","card","polaroid_title","full_title"]},"confirm_editorial_use":{"type":"boolean"}},"additionalProperties":false,"description":"Real People & Places on every new video: auto and instructions (omitted keys keep their value); style: one animation for every photo, or mix (default) for a random one per photo; enabling auto through this API confirms editorial use on behalf of the account; confirm_editorial_use:true also records it explicitly; false does not record a new confirmation. No website step is required."}},"additionalProperties":false,"description":"Payload to update an owned API template."},"ListJobsResponse":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/JobListItem"}},"has_more":{"type":"boolean","description":"True when more jobs match the filter. Narrow it with project_id or status, or raise limit."}},"required":["jobs","has_more"],"additionalProperties":false,"description":"Video jobs of the authenticated account, newest first."},"JobListItem":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"title":{"type":"string","nullable":true,"description":"Video title. Null until the concept phase writes it; it can be changed with rename_job."},"status":{"$ref":"#/components/schemas/GenerationStatus"},"content_type":{"$ref":"#/components/schemas/ContentType"},"project_id":{"type":"string","nullable":true,"format":"uuid","description":"Project the video belongs to. Reusable as source.template_id in create_video."},"created_at":{"type":"string"},"updated_at":{"type":"string","nullable":true,"description":"Last recorded update. Null when the job has no recorded update."},"credit_cost":{"type":"number","nullable":true,"description":"Estimated cost at creation time."},"real_credit_cost":{"type":"number","nullable":true,"description":"Internal provider/compute cost in USD cents, not credits charged to the account. Null when unpriced."}},"required":["job_id","title","status","content_type","project_id","created_at","updated_at","credit_cost","real_credit_cost"],"additionalProperties":false,"description":"Video job of the authenticated account, without assets."},"JobCreated":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","description":"Id of the created video job. Poll GET /jobs/{job_id} and edit it via /jobs/{job_id}/tools."},"status":{"$ref":"#/components/schemas/GenerationStatus"},"credit_cost":{"type":"number","nullable":true}},"required":["job_id","status","credit_cost"],"additionalProperties":false,"description":"Returned after a video job is queued."},"CreateGenerationRequest":{"type":"object","properties":{"content_type":{"$ref":"#/components/schemas/ContentType"},"source":{"$ref":"#/components/schemas/GenerationSource"},"workspace":{"type":"boolean","description":"References source only: true creates a Graphics Short or Video (up to 180 seconds); false (default) creates a Classic video. Template sources retain their saved mode."},"generation_project_id":{"type":"string","nullable":true,"format":"uuid","description":"Optional organization folder (Projects). Omitted: your 'API Generations' folder (API and MCP). null: no folder. It does not change the source template or media storage paths."},"project_id":{"type":"string","format":"uuid","description":"Optional Creation Lab project (UUID) to place this video in, exactly like generating from the UI. If omitted, it goes to the template's project when the template is yours, otherwise to your default 'API Generations' project."},"quality":{"type":"string","enum":["medium","high","extra"],"description":"Optional quality override: medium, high or extra. If omitted, inherits the template quality."},"custom":{"type":"object","properties":{"image_model":{"type":"string","enum":["low","medium","high","extra"],"description":"Image model tier."},"video_model":{"type":"string","enum":["low","medium","high","extra"],"description":"Video model tier. Only applies when animated; all tiers support native speech with voiceover:false. Extra High animated scenes require at least 4 seconds and use low scene frequency. A template can limit its video tiers: any other keeps the template's own."},"every_n_images":{"type":"integer","minimum":1,"maximum":5,"description":"Animate one out of every N images. 1 = every clip."}},"additionalProperties":false,"description":"Optional manual model overrides for this generation, applied on top of `quality`."},"visual_frequency":{"type":"string","enum":["low","balanced","high"],"description":"Optional visual scene frequency override, about 1 scene every: `low` 6s, `balanced` 4s, `high` 2s. Default (none saved): `balanced` in shorts, `low` in videos. Animated Extra High uses `low`. Ignored with voiceover:false (No Voiceover scenes follow the storyboard). If omitted, inherits the template frequency."},"animate":{"type":"boolean","description":"Whether to animate generated images into video clips. If omitted, inherits the template setting, exactly like Creation Lab."},"auto_render":{"type":"boolean","default":true,"description":"Whether to automatically render the final MP4 after assets are generated. Defaults to true. Set false to review scenes and results in the UI before rendering."},"calliope_agent":{"type":"boolean","description":"Code (Graphics) templates only, and required for them. false: the job stops at Waiting once the script and voiceover are ready, with its workspace prepared, and you write and render the code with the workspace tool; there is no Calliope Agent charge. true: Calliope's agent writes and renders the code (charged as Calliope Agent)."},"auto_accept":{"type":"boolean","default":true,"description":"Whether to continue automatically once the narration is ready. Defaults to true. Set false to pause the job (status Waiting) so the script and the voice can be reviewed and edited before spending credits on assets; continue it with the resume_job tool."},"captions":{"type":"boolean","description":"Optional captions switch. If omitted, inherits the template/default caption style; new API-created templates default to false. false disables captions; true keeps/enables captions without custom styling."},"voice_id":{"anyOf":[{"type":"string","enum":["v4_yl2ZDV1MzN4HbQJbMihG","t_yl2ZDV1MzN4HbQJbMihG","v4_tnSpp4vdxKPjI9w0GnoV","t_tnSpp4vdxKPjI9w0GnoV"]},{"type":"string","pattern":"^(v4_|t_)[A-Za-z0-9]{16,}$"},{"type":"string","pattern":"^my_voice_[A-Za-z0-9_-]+$"}],"description":"Optional narration voice id. Example: `v4_yl2ZDV1MzN4HbQJbMihG` for Alex High, `t_yl2ZDV1MzN4HbQJbMihG` for Alex Medium, or `my_voice_...` for a cloned voice. If omitted, template generations inherit the template voice."},"language":{"type":"string","enum":["auto","en","ja","zh","de","hi","fr","ko","pt","it","es","id","nl","tr","fil","pl","sv","bg","ro","ar","cs","el","fi","hr","ms","sk","da","ta","uk","ru","hu","no","vi"],"description":"Optional language of the video: ISO 639-1 code (es, en, pt...) or auto, the default. With auto, a brief is written in the language the narrating voice was made for (`voice.language` in the voices catalog) unless the brief asks for another. A code has the brief's script written in that language, with any voice. A `script` or `narration_url` is never translated (send it in the language you want). No Voiceover ignores language: write the storyboard or the idea in the language the characters should speak."},"voiceover":{"type":"boolean","description":"false = No Voiceover: no TTS narrator; send the storyboard (or just the idea) in script_params.content_instructions and on-screen characters speak its quoted lines. The platform keeps a well-formed storyboard, polishes a rough one or writes one from an idea. Forces animate on every clip. If omitted, inherits the template voiceover setting. Incompatible with script_params.narration_url."},"narration_style_instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"Optional narration performance instructions for ElevenLabs v4 tags. Best with `v4_*` voices. Ignored for uploaded narration audio."},"narration":{"type":"object","properties":{"voice_settings":{"$ref":"#/components/schemas/VoiceSettings"}},"additionalProperties":false,"description":"Optional Eleven v4 narration controls. voice_settings applies only to `v4_*` TTS voices, not uploaded narration."},"character_references":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"PNG/JPG/WEBP image URL or storage ref (2 MB max)."},"label":{"type":"string","minLength":1,"maxLength":50,"description":"What the image is: main character, secondary character, object, background, or free text. Defaults to generic context."}},"required":["url"],"additionalProperties":false},"minItems":1,"maxItems":4,"description":"1 to 4 labeled images used as context to GENERATE the character sheet from the script (a single image is an array of one). They are never used raw as the sheet. Omit to generate the sheet from the script alone."},"script_params":{"$ref":"#/components/schemas/ScriptParams"},"target_duration_sec":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Required when script_params.content_instructions is used: up to 180 for a Short or any Graphics video, 60 to 3600 for a Video. Ignored for exact script or narration_url because real narration duration becomes the source of truth."}},"required":["content_type","source","script_params"],"additionalProperties":false,"description":"Payload to create a new generation."},"GenerationSource":{"anyOf":[{"$ref":"#/components/schemas/TemplateSource"},{"type":"object","properties":{"references":{"$ref":"#/components/schemas/ReferenceContext"}},"required":["references"],"additionalProperties":false}],"description":"Exactly one source: template_id or references. They cannot be combined."},"TemplateSource":{"type":"object","properties":{"template_id":{"type":"string","format":"uuid","description":"UUID of a Creation Lab project to use as the template."}},"required":["template_id"],"additionalProperties":false,"description":"Use a public template or one of your own Creation Lab projects as the template."},"ReferenceContext":{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","minLength":1},"label":{"type":"string","maxLength":50}},"required":["url"],"additionalProperties":false},"maxItems":35},"text":{"type":"string","maxLength":5000},"skills":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"content":{"type":"string","minLength":1,"maxLength":20000}},"required":["name","content"],"additionalProperties":false},"maxItems":10},"videos":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000},"label":{"type":"string","maxLength":120},"prompt":{"type":"string","maxLength":2000,"description":"Optional per-video extraction focus or requested transformations, up to 2000 characters. Preserved separately from its label."},"range_start_sec":{"type":"number","minimum":0},"range_end_sec":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["url"],"additionalProperties":false},"maxItems":1,"description":"One reference video at creation. Uploaded sources may be up to 5 GB, with no source duration limit. Analyze at most 30 minutes and retain 1–3 relevant compressed excerpts with their source timestamps."}},"additionalProperties":false,"description":"References and instructions used directly for this generation. Original sources and labels are retained."},"VoiceSettings":{"type":"object","properties":{"stability":{"type":"number","minimum":0,"maximum":1,"description":"Eleven v4 stability, from 0 to 1."},"similarity":{"type":"number","minimum":0,"maximum":1,"description":"Eleven v4 similarity, from 0 to 1."}},"required":["stability","similarity"],"additionalProperties":false,"description":"Eleven v4 voice controls, each from 0 to 1. Only for `v4_*` voices."},"ScriptParams":{"type":"object","properties":{"script":{"type":"string","minLength":1,"description":"Exact narration text, word for word. With voiceover:false it is treated as part of the storyboard. Shorts and Graphics videos: 280-2700 chars (up to 3 min). Classic videos: 900-13000 chars."},"content_instructions":{"type":"string","minLength":1,"description":"Natural-language brief; the platform writes the script. 10-5000 chars."},"narration_url":{"type":"string","minLength":1,"description":"URL to a pre-recorded .mp3/.wav narration to use as-is."}},"additionalProperties":false,"description":"Exactly one script source: script, content_instructions or narration_url. content_instructions can also accompany script or narration_url as an extra brief."},"Job":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/GenerationStatus"},"phase":{"$ref":"#/components/schemas/GenerationPhase"},"credit_cost":{"type":"number","nullable":true,"description":"Generation price: fixed for code (Graphics) videos; for classic videos the estimate at creation, reconciled by the worker. Usage billed apart is not included."},"credits_charged":{"type":"object","nullable":true,"properties":{"total":{"type":"number"},"generation":{"type":"number"},"agent_sandbox":{"type":"number"},"agent_gpu_sandbox":{"type":"number"},"fast_render":{"type":"number"}},"required":["total","generation","agent_sandbox","agent_gpu_sandbox","fast_render"],"description":"Credits charged so far: total, generation and actual CPU workspace, GPU workspace and fast-render usage; editor chat is billed separately."},"video_url":{"type":"string","nullable":true,"description":"Link to the final MP4, valid for 90 minutes. It redirects to the file, so follow redirects; add `&download=1` to download it with a clean file name. Null until status is Completed."},"no_clips":{"type":"boolean","default":false,"description":"A clipping batch completed without usable moments, no MP4 and no charge."},"no_clips_reason":{"type":"string","nullable":true,"default":null,"description":"Public reason when no_clips is true."},"assets_expired_at":{"type":"string","nullable":true,"default":null,"description":"When the files of this video (MP4, clips, images, audio) were removed after 12 months of account inactivity; then video_url and assets_urls are null and it cannot be resumed, rendered, edited or saved as a template. Null while the files exist."},"assets_urls":{"type":"array","nullable":true,"items":{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"}},"required":["url","name"],"additionalProperties":false},"description":"Short-lived signed asset URLs when GET /jobs/{job_id}?get_assets=true is requested and assets are ready."},"estimated_time_remaining_sec":{"type":"object","nullable":true,"properties":{"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0}},"required":["min","max"],"description":"Remaining seconds from calibrated duration, animation, models, visual frequency, voiceover and render-path history; null when paused/final or Graphics uses calliope_agent:false."},"error":{"type":"string","nullable":true,"description":"User-readable failure reason. Null unless status is Failed."}},"required":["job_id","status","phase","credit_cost","credits_charged","video_url","assets_urls","estimated_time_remaining_sec","error"],"additionalProperties":false,"description":"Full state of a video job."},"GenerationPhase":{"type":"string","nullable":true,"enum":["template_analysis","concept","audio","assets","render",null],"description":"Pipeline phase while a generation is Processing or Waiting."},"ListThumbnailStylesResponse":{"type":"object","properties":{"styles":{"type":"array","items":{"$ref":"#/components/schemas/ThumbnailStyle"}}},"required":["styles"],"additionalProperties":false,"description":"Saved thumbnail styles shared across the authenticated account's projects."},"ThumbnailStyle":{"type":"object","properties":{"style_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"channel_title":{"type":"string"},"channel_url":{"type":"string"},"preview_url":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["style_id","name","channel_title","channel_url","preview_url","created_at","updated_at"],"additionalProperties":false,"description":"Saved thumbnail style available to the authenticated account."},"TestStyleResponse":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["Queued","Processing","Completed","Failed"]},"credit_cost":{"type":"integer","description":"Credits charged for this generation: 0 while free daily generations remain, 14 afterwards; a standalone image costs its model's credits."},"free_remaining":{"type":"integer","nullable":true,"description":"Free generations left today after this one. Null on the Free plan (charged to the trial credits)."}},"required":["job_id","status","credit_cost","free_remaining"],"description":"Queued Template Master Reference job."},"CharacterReferencePreviewRequest":{"type":"object","properties":{"content_type":{"$ref":"#/components/schemas/ContentType"},"project_id":{"type":"string","format":"uuid"},"content_instructions":{"type":"string","maxLength":5000},"characterReferenceFeedback":{"type":"string","maxLength":2000},"characterReferenceAttachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","minLength":1},"label":{"type":"string","maxLength":50}},"required":["url"]},"maxItems":4},"characterReferenceAttachmentUrls":{"type":"array","items":{"type":"string","minLength":1},"maxItems":4}},"additionalProperties":false},"ThumbnailJobCreated":{"type":"object","properties":{"thumbnail_job_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/GenerationStatus"},"estimated_credit_cost":{"type":"integer","minimum":0}},"required":["thumbnail_job_id","status","estimated_credit_cost"],"additionalProperties":false,"description":"Returned after a thumbnail job is queued."},"CreateThumbnailRequest":{"type":"object","properties":{"image_count":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[3]},{"type":"number","enum":[5]}],"default":3,"description":"How many thumbnails to generate. Defaults to 3."},"channel_url":{"type":"string","minLength":1,"description":"YouTube channel URL, @handle, channel id, or a video link, used to extract thumbnail style from top channel thumbnails. A video link anchors the style on that video's thumbnail plus the channel's top thumbnails."},"style_id":{"type":"string","minLength":1,"description":"Existing saved thumbnail style id from GET /api/v1/thumbnails."},"prompt":{"type":"string","description":"Thumbnail instruction. Required at 100+ chars when thumbnail_references are the style source."},"thumbnail_references":{"type":"array","items":{"type":"string","minLength":1,"description":"PNG/JPG/WEBP image URL or private R2 ref. Max 10 MB per image."},"maxItems":14,"description":"User-provided thumbnail style references. Equivalent to passing channel thumbnails directly instead of a channel URL."},"character_references":{"type":"array","items":{"type":"string","minLength":1,"description":"PNG/JPG/WEBP image URL or private R2 ref. Max 10 MB per image."},"maxItems":14,"description":"Character/object reference images. They are internally labeled before prompt/image generation."},"base_thumbnail_ref":{"type":"string","minLength":1,"description":"Optional existing thumbnail storage ref to use as an edit/base image. Counts toward the 14-ref limit."}},"additionalProperties":false,"description":"Payload to generate thumbnails from a completed Calliope video."},"TestStyleState":{"type":"object","properties":{"credit_cost":{"type":"integer","description":"What the next generation costs: 0 while free daily generations remain, 14 afterwards."},"free_remaining":{"type":"integer","nullable":true},"job_id":{"type":"string","nullable":true,"format":"uuid","description":"Latest Template Master Reference job, if any."},"status":{"type":"string","nullable":true,"enum":["Queued","Processing","Completed","Failed",null]},"is_master_ref":{"type":"boolean","nullable":true,"description":"Whether that latest job is the Master Reference (false = a standalone image added to the visual references)."},"master_ref_path":{"type":"string","nullable":true,"description":"Private storage ref of the current Template Master Reference (reusable as a visual reference)."},"master_ref_url":{"type":"string","nullable":true,"description":"Signed URL of the current Template Master Reference."}},"required":["credit_cost","free_remaining","job_id","status","is_master_ref","master_ref_path","master_ref_url"],"description":"Current Template Master Reference and the price of the next one."},"TestStyleRequest":{"type":"object","properties":{"content_type":{"type":"string","enum":["short","video"],"description":"Content branch. Required when the template supports both short and video."},"feedback":{"type":"string","maxLength":500,"description":"Master Reference: optional, what to change versus the current one. With is_master_ref false: required, the image to create."},"is_master_ref":{"type":"boolean","description":"false = ONE standalone image (a character, several characters, a place or an object) described in `feedback`, ADDED to the template's visual references. Omitted or true = the Template Master Reference."},"image_model":{"type":"string","enum":["low","medium","high","extra"],"description":"Only with is_master_ref false: image model tier, `high` by default. Charged at that model's credits per image."},"label":{"type":"string","maxLength":50,"description":"Only with is_master_ref false: label of the new visual reference (`character_consistency` for a main character). Defaults to the start of `feedback`."},"estimate":{"type":"boolean","description":"true = only return `estimated_cost` (credits of this generation), without queueing anything."}},"additionalProperties":false,"description":"Generate (or regenerate) the Template Master Reference of an owned template, or add one standalone generated image to its visual references."},"ListThumbnailsResponse":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"thumbnails":{"type":"array","items":{"$ref":"#/components/schemas/ThumbnailJob"}}},"required":["job_id","thumbnails"],"additionalProperties":false,"description":"Thumbnail jobs for a completed Calliope video job."},"ThumbnailJob":{"type":"object","properties":{"thumbnail_job_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/GenerationStatus"},"image_count":{"type":"integer","minimum":0},"credit_cost":{"type":"number","nullable":true},"urls":{"type":"array","items":{"type":"string"}},"error":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","nullable":true}},"required":["thumbnail_job_id","status","image_count","credit_cost","urls","error","created_at","updated_at"],"additionalProperties":false,"description":"Thumbnail job state and signed output URLs."},"ClippingEstimate":{"type":"object","properties":{"requires_confirmation":{"type":"boolean","enum":[true]},"estimated_cost":{"type":"integer","minimum":0,"description":"Credits reserved on confirm (Smart minutes plus the AI B-roll maximum). Only delivered clips and images are charged."},"processed_sec":{"type":"number","minimum":0,"description":"Seconds of the range that will be processed."},"source_title":{"type":"string","nullable":true,"description":"Title of the YouTube video or of the upload."},"request_id":{"type":"string","format":"uuid","description":"Send it back with confirm: true."}},"required":["requires_confirmation","estimated_cost","processed_sec","source_title","request_id"],"additionalProperties":false,"description":"Exact cost of a clip batch. Nothing is queued."},"ClippingCreated":{"type":"object","properties":{"batch_id":{"type":"string","format":"uuid"},"job_id":{"type":"string","format":"uuid","description":"First clip of the batch. The others appear in GET /clips as the batch is processed."},"status":{"$ref":"#/components/schemas/GenerationStatus"},"credit_cost":{"type":"integer","minimum":0,"description":"Credits reserved. Only delivered clips and images are charged."},"request_id":{"type":"string","format":"uuid"}},"required":["batch_id","job_id","status","credit_cost","request_id"],"additionalProperties":false,"description":"Returned after a clip batch is queued, or again for a retried request_id."},"CreateClippingRequest":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid","description":"Project for the clips. Default: the project of source_upload_path, otherwise your 'API Generations' project."},"generation_project_id":{"type":"string","nullable":true,"format":"uuid","description":"Optional organization folder (Projects). Omitted: your 'API Generations' folder (API and MCP). null: no folder. It does not change the source template or media storage paths."},"youtube_url":{"type":"string","maxLength":500,"description":"Public or unlisted YouTube video, up to 10 h. Send exactly one of youtube_url or source_upload_path."},"source_upload_path":{"type":"string","maxLength":1000,"description":"r2:// path of an MP4, MOV or WEBM (up to 5 GB) returned by register_upload and already uploaded."},"source_duration_sec":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":7200,"description":"Required with source_upload_path: the video duration in seconds (15 s to 2 h). A wrong value fails the batch before any charge."},"source_title":{"type":"string","maxLength":300,"description":"Title shown for an uploaded video. Default: its file name."},"mode":{"type":"string","enum":["fast","smart","smart_plus"],"description":"smart_plus: AI sees the video and hears its audio to pick moments, with or without speech; Every paid plan, same credits as smart. smart: AI picks moments from speech. Both reframe vertically and charge per processed minute. fast: equal parts, full frame, no credits."},"count":{"type":"integer","minimum":1,"maximum":10,"description":"Number of clips, 1-10. Smart/Smart+: at most floor((range_sec + 15) / (max(15, 0.8 x clip_length.min) + 15)), the distinct clips the range fits; more returns 400."},"options":{"type":"object","properties":{"cut":{"type":"boolean","default":true,"description":"false = Captions only: captions on the whole uploaded video, without cutting or reframing. Requires source_upload_path, mode smart and count 1."},"language":{"type":"string","minLength":1,"maxLength":40,"default":"auto","description":"Spoken language code, or auto."},"speakers":{"type":"string","enum":["1","2","3","4","5","Auto"],"default":"Auto","description":"People speaking in the video, or Auto."},"clip_length":{"type":"object","properties":{"min":{"type":"integer","minimum":0,"maximum":600},"max":{"type":"integer","minimum":15,"maximum":600}},"default":{"min":0,"max":180},"required":["min","max"],"description":"Smart/Smart+: clip length range in seconds. Default 0-180."},"moments_prompt":{"type":"string","maxLength":500,"default":"","description":"Smart/Smart+: moments to prioritize, e.g. the debate about AI or a visual event."},"range_start_sec":{"type":"integer","minimum":0,"maximum":36000,"default":0,"description":"Start of the processed range in seconds (Credit saver: only this range is processed and charged). Default 0."},"range_end_sec":{"type":"integer","minimum":0,"maximum":36000,"default":0,"description":"End of the processed range in seconds; 0 = end of the video. The range is 15 s to 2 h."},"diarization":{"type":"boolean","description":"Detect who speaks, for per-speaker captions. Default true for Smart and Smart+."},"broll":{"type":"object","properties":{"kind":{"type":"string","enum":["none","stock","ai"]},"image_model_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"default":null}},"default":{"kind":"none","image_model_id":null},"required":["kind"],"additionalProperties":false,"description":"Smart/Smart+: none, stock (free) or ai (AI images, charged per delivered image). image_model_id only for ai: 1 Low, 6 Medium, 3 High, 5 Extra High."},"auto_title":{"type":"boolean","default":true,"description":"Smart/Smart+: editable headline over the first 5 seconds of each clip."},"caption_style":{"type":"string","nullable":true,"enum":["highlight","pill-karaoke","neon-accent","weight-shift","parallax-layers","emoji-pop","beast","punch","clean","comic","slam","gradient","reveal","glitch","neon-glow","bold-stroke","word-by-word","typewriter","tag-box","editorial",null],"description":"Smart/Smart+: caption catalog style ID; null disables new captions. Omit to keep the legacy Highlight style. Existing captions embedded in the source stay unchanged."}},"additionalProperties":false},"request_id":{"type":"string","format":"uuid","description":"Idempotency key returned by the estimate. Send it with confirm: a retry with the same request_id never creates a second batch."},"max_credit_cost":{"type":"integer","minimum":0,"description":"Maximum credits to charge on confirm. Send estimated_cost. If the current quote exceeds it, returns a new estimate without queueing; already submitted request_id replays keep their price."},"estimate":{"type":"boolean","description":"true = validate and return the exact credit cost and a request_id. Queues nothing."},"confirm":{"type":"boolean","description":"true = queue the batch. Requires the request_id of the estimate."}},"required":["mode","count"],"additionalProperties":false,"description":"Cut a long video into vertical Short clips. Each clip is its own job_id."},"ListClipsResponse":{"type":"object","properties":{"clips":{"type":"array","items":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"batch_id":{"type":"string","nullable":true},"index":{"type":"integer","minimum":1},"status":{"$ref":"#/components/schemas/GenerationStatus"},"mode":{"type":"string","enum":["fast","smart","smart_plus"]},"title":{"type":"string"},"source_key":{"type":"string","description":"Groups clips of the same source video (YouTube id, uploaded path or Calliope job)."},"source_title":{"type":"string"},"start_sec":{"type":"number","minimum":0},"end_sec":{"type":"number","minimum":0},"duration_sec":{"type":"number","minimum":0},"video_url":{"type":"string","nullable":true,"description":"Link to the MP4, valid for 90 minutes. It redirects to the file, so follow redirects; add `&download=1` to download it with a clean file name. Null until Completed."},"no_clips":{"type":"boolean","default":false,"description":"Completed without usable moments: no MP4 and no charge."},"no_clips_reason":{"type":"string","nullable":true,"default":null,"description":"Public reason when no_clips is true. Retry with timestamps in options.moments_prompt."},"error":{"type":"string","nullable":true,"description":"User-readable failure reason. Null unless Failed."}},"required":["job_id","batch_id","index","status","mode","title","source_key","source_title","start_sec","end_sec","duration_sec","video_url","error"],"additionalProperties":false}}},"required":["clips"],"additionalProperties":false,"description":"The 48 latest clips, newest batch first and in order inside each batch."},"UploadCreated":{"type":"object","properties":{"upload_url":{"type":"string","description":"PUT the raw file bytes here with the content_type header."},"method":{"type":"string","enum":["PUT"]},"content_type":{"type":"string"},"path":{"type":"string","description":"r2:// path to pass as source_upload_path once the PUT succeeds."},"expires_in_minutes":{"type":"integer","minimum":0,"exclusiveMinimum":true},"project_id":{"type":"string","format":"uuid"}},"required":["upload_url","method","content_type","path","expires_in_minutes","project_id"],"additionalProperties":false,"description":"Signed upload for a source video."},"CreateUploadRequest":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid","description":"Project of the upload. Default: your 'API Generations' project."},"file_name":{"type":"string","minLength":1,"maxLength":200,"pattern":"\\.(mp4|mov|webm)$/i","description":"Video file name with its extension."},"file_size":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":5000000000,"description":"Exact size in bytes, up to 5 GB."}},"required":["file_name","file_size"],"additionalProperties":false,"description":"Get a signed URL to upload a source video for clipping or for a video template."},"MediaQueued":{"type":"object","properties":{"media_id":{"type":"string","format":"uuid"},"tool":{"type":"string","enum":["download_media","transcribe_media","get_subtitles","read_media"]},"status":{"type":"string","enum":["Queued"]},"estimate_only":{"type":"boolean","enum":[true]}},"required":["media_id","tool","status"],"additionalProperties":false,"description":"Poll GET /media/{media_id} until Completed or Failed."},"DownloadMediaRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500,"description":"One public post from YouTube, TikTok, Instagram, Facebook, X or LinkedIn, playable without login. No playlists, profiles or live streams."},"quality":{"type":"string","enum":["audio","360p","480p","720p","1080p"],"description":"audio = MP3; otherwise the short side of the video (vertical videos too). Default 480p."},"transcribe":{"type":"boolean","description":"Transcript with speakers. Default true; a photo post is transcribed only with an explicit true."},"start_sec":{"type":"number","minimum":0,"description":"Start of the range in seconds. Omit start_sec and end_sec for the whole media."},"end_sec":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"End of the range in seconds."},"speakers":{"type":"integer","minimum":2,"maximum":5,"description":"Number of speakers, if known (2-5)."},"language":{"type":"string","pattern":"^(auto|[a-z]{2,3}(-[A-Za-z0-9]{2,8})?)$","description":"ISO language code or auto. Default auto."},"estimate":{"type":"boolean","description":"true = cost only: nothing is downloaded or charged, and it does not count toward the daily limit."},"max_credit_cost":{"type":"integer","minimum":0,"description":"The job stops before downloading if the estimate is higher."},"project_id":{"type":"string","format":"uuid","description":"Project that stores the files. Default: your 'API Generations' project."},"accept_media_policy":{"type":"boolean","description":"Acceptance of the Video Style & Media Download Policy for links. Agents (API key, MCP): omitted = accepted; false = 400 POLICY_NOT_ACCEPTED. Web session: send true."},"include_post":{"type":"boolean","description":"A link also returns `post`, free: its text (post text, caption or YouTube description), author, date, stats and media. Default true; false leaves it out."}},"required":["url"],"additionalProperties":false,"description":"Download a public link as your own asset (video, MP3 or the images of a photo post), plus a transcript with speakers by default. Charged only after success, never above the estimate."},"TranscribeMediaRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500,"description":"One public post from YouTube, TikTok, Instagram, Facebook, X or LinkedIn, playable without login. No playlists, profiles or live streams."},"source_path":{"type":"string","maxLength":1000,"description":"r2:// path of one of your own videos or audios (mp4, mov, webm, mp3, wav, m4a). Send exactly one of url or source_path."},"start_sec":{"type":"number","minimum":0,"description":"Start of the range in seconds. Omit start_sec and end_sec for the whole media."},"end_sec":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"End of the range in seconds."},"speakers":{"type":"integer","minimum":2,"maximum":5,"description":"Number of speakers, if known (2-5)."},"language":{"type":"string","pattern":"^(auto|[a-z]{2,3}(-[A-Za-z0-9]{2,8})?)$","description":"ISO language code or auto. Default auto."},"estimate":{"type":"boolean","description":"true = cost only: nothing is downloaded or charged, and it does not count toward the daily limit."},"max_credit_cost":{"type":"integer","minimum":0,"description":"The job stops before downloading if the estimate is higher."},"project_id":{"type":"string","format":"uuid","description":"Project that stores the files. Default: your 'API Generations' project."},"accept_media_policy":{"type":"boolean","description":"Acceptance of the Video Style & Media Download Policy for links. Agents (API key, MCP): omitted = accepted; false = 400 POLICY_NOT_ACCEPTED. Web session: send true."},"include_post":{"type":"boolean","description":"A link also returns `post`, free: its text (post text, caption or YouTube description), author, date, stats and media. Default true; false leaves it out."}},"additionalProperties":false,"description":"Transcript with timestamps and speakers of a public link or of your own stored video or audio. Existing subtitles of a link come attached. Charged only after success, never above the estimate."},"GetSubtitlesRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500,"description":"One public post from YouTube, TikTok, Instagram, Facebook, X or LinkedIn, playable without login. No playlists, profiles or live streams."},"language":{"type":"string","pattern":"^(auto|[a-z]{2,3}(-[A-Za-z0-9]{2,8})?)$","description":"ISO language code. Default: the original language of the video."},"project_id":{"type":"string","format":"uuid","description":"Project that stores the files. Default: your 'API Generations' project."},"accept_media_policy":{"type":"boolean","description":"Acceptance of the Video Style & Media Download Policy for links. Agents (API key, MCP): omitted = accepted; false = 400 POLICY_NOT_ACCEPTED. Web session: send true."},"include_post":{"type":"boolean","description":"A link also returns `post`, free: its text (post text, caption or YouTube description), author, date, stats and media. Default true; false leaves it out."}},"required":["url"],"additionalProperties":false,"description":"Existing subtitles of a public link as timed text. Free on every plan."},"ReadMediaRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500,"description":"One public post from YouTube, TikTok, Instagram, Facebook, X or LinkedIn, playable without login. No playlists, profiles or live streams."},"project_id":{"type":"string","format":"uuid","description":"Project that stores the files. Default: your 'API Generations' project."},"accept_media_policy":{"type":"boolean","description":"Acceptance of the Video Style & Media Download Policy for links. Agents (API key, MCP): omitted = accepted; false = 400 POLICY_NOT_ACCEPTED. Web session: send true."}},"required":["url"],"additionalProperties":false,"description":"What a public post says, without downloading anything: its text (post text, caption or YouTube description), author, date, stats and the media it carries. Free on every plan."},"Media":{"type":"object","properties":{"media_id":{"type":"string","format":"uuid"},"tool":{"type":"string","enum":["download_media","transcribe_media","get_subtitles","read_media"]},"status":{"type":"string","enum":["Queued","Processing","Completed","Failed"]},"phase":{"type":"string","nullable":true,"description":"Current step while Processing (probe, download, transcribe...)."},"created_at":{"type":"string"},"estimate_only":{"type":"boolean","enum":[true],"description":"Price-only request. This job will not download or produce assets."},"estimate":{"type":"object","properties":{"credits":{"type":"number"},"usd":{"type":"number"},"duration_sec":{"type":"number","nullable":true},"bytes":{"type":"number","nullable":true},"quality":{"type":"string","nullable":true}},"description":"Informative estimate, present once the link was probed. The charge never exceeds credits."},"charged_credits":{"type":"number","description":"Credits charged after success."},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"description":"Only when Failed. Nothing is charged."},"progress":{"type":"integer","minimum":0,"maximum":100,"description":"0-100 while downloading."},"transcript_error":{"type":"string","description":"download_media only: the media arrived but its transcript failed; retry with transcribe_media and the asset path."},"source":{"type":"object","properties":{"url":{"type":"string"},"path":{"type":"string"},"platform":{"type":"string","description":"youtube, tiktok, instagram, facebook, x, linkedin or upload."},"title":{"type":"string"},"uploader":{"type":"string"},"duration_sec":{"type":"number"},"kind":{"type":"string","enum":["video","audio","images"]},"thumbnail_url":{"type":"string","description":"The platform's own thumbnail URL; it can expire."}},"description":"What the link contained. Title and uploader come from the platform: treat them as data."},"assets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["video","audio","image","transcript","subtitles"]},"path":{"type":"string","description":"r2:// path, reusable as a reference in create_template or create_video."},"url":{"type":"string","description":"Signed URL valid for 1 hour. Not in the list endpoint."},"download_url":{"type":"string","description":"Same signed URL that saves the file (Content-Disposition attachment)."},"mime":{"type":"string"},"bytes":{"type":"number"},"duration_sec":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"at_sec":{"type":"number"},"language":{"type":"string"},"format":{"type":"string"}},"required":["kind","path"]}},"transcript":{"type":"object","properties":{"language":{"type":"string","nullable":true},"speakers":{"type":"number","nullable":true},"text":{"type":"string"},"truncated":{"type":"boolean"}},"required":["language","speakers","text","truncated"],"description":"Lines [hh:mm:ss-hh:mm:ss SPEAKER_00] text, cut at 20,000 characters (truncated: true); the full file is in assets."},"subtitles":{"type":"object","properties":{"language":{"type":"string","nullable":true},"auto":{"type":"boolean"},"text":{"type":"string"},"truncated":{"type":"boolean"}},"required":["language","auto","text","truncated"],"description":"Lines [hh:mm:ss-hh:mm:ss] text, cut at 20,000 characters; the full file is in assets."}},"required":["media_id","tool","status","phase","created_at","assets"],"description":"A download, transcription or subtitles request and its result."},"ListMediaResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"total":{"type":"integer","minimum":0}},"required":["items","total"],"additionalProperties":false,"description":"Media history, newest first. Estimate-only requests are excluded."},"FreeBudgetClaim":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Claim page for clients without the interactive editor widget."},"credits":{"type":"number","minimum":0},"feedback_credits":{"type":"number","minimum":0},"expires_at":{"type":"string","format":"date-time"}},"required":["url","credits","feedback_credits","expires_at"],"description":"Optional offer to the owner. The quote uses only credits already claimed. The owner rates their video in the Calliope editor or its interactive widget."},"WorkspaceOperationProgress":{"type":"object","properties":{"stage":{"type":"string","enum":["preparing_environment","restoring_workspace","ready","running"]},"started_at":{"type":"string"},"deadline_at":{"type":"string"},"observed_compute_seconds":{"type":"number","minimum":0}},"required":["stage","started_at"],"additionalProperties":false,"description":"Current workspace phase, its start time, the capacity deadline when relevant, and observed compute seconds when available. This measurement is provisional."},"ListAutomationsResponse":{"type":"object","properties":{"automations":{"type":"array","items":{"$ref":"#/components/schemas/AutomationListItem"}},"page":{"type":"integer","minimum":0,"exclusiveMinimum":true},"page_size":{"type":"integer","minimum":0,"exclusiveMinimum":true},"total":{"type":"integer","minimum":0},"has_more":{"type":"boolean"}},"required":["automations","page","page_size","total","has_more"],"additionalProperties":false,"description":"Automations of the account, newest first, without runs."},"AutomationListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"template_id":{"type":"string","format":"uuid"},"content_type":{"$ref":"#/components/schemas/ContentType"},"status":{"type":"string","enum":["active","paused","finished"]},"paused_reason":{"type":"string","nullable":true,"enum":["user","credits","failures","plan",null]},"every_days":{"type":"integer"},"hour":{"type":"integer"},"timezone":{"type":"string"},"starts_on":{"type":"string"},"topic_mode":{"type":"string","enum":["auto","stop"]},"limit_by":{"type":"string","enum":["budget","runs"]},"budget_credits":{"type":"integer","nullable":true},"ends_after":{"type":"integer","nullable":true},"auto_reload":{"type":"boolean"},"reload_below_credits":{"type":"integer","nullable":true},"reload_amount_usd":{"type":"integer","nullable":true},"generation_project_id":{"type":"string","nullable":true,"format":"uuid"},"account_description":{"type":"string"},"reference_accounts":{"type":"array","items":{"type":"string"}},"website":{"type":"string"},"source":{"type":"string","enum":["web","api","mcp","chat"]},"next_run_at":{"type":"string","nullable":true},"credits_this_month":{"type":"integer","minimum":0},"created_at":{"type":"string"},"updated_at":{"type":"string"},"runs_total":{"type":"integer","minimum":0},"runs_done":{"type":"integer","minimum":0}},"required":["id","template_id","content_type","status","paused_reason","every_days","hour","timezone","starts_on","topic_mode","limit_by","budget_credits","ends_after","auto_reload","reload_below_credits","reload_amount_usd","generation_project_id","account_description","reference_accounts","website","source","next_run_at","credits_this_month","created_at","updated_at","runs_total","runs_done"],"additionalProperties":false},"Automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"template_id":{"type":"string","format":"uuid"},"content_type":{"$ref":"#/components/schemas/ContentType"},"status":{"type":"string","enum":["active","paused","finished"]},"paused_reason":{"type":"string","nullable":true,"enum":["user","credits","failures","plan",null]},"every_days":{"type":"integer"},"hour":{"type":"integer"},"timezone":{"type":"string"},"starts_on":{"type":"string"},"topic_mode":{"type":"string","enum":["auto","stop"]},"limit_by":{"type":"string","enum":["budget","runs"]},"budget_credits":{"type":"integer","nullable":true},"ends_after":{"type":"integer","nullable":true},"auto_reload":{"type":"boolean"},"reload_below_credits":{"type":"integer","nullable":true},"reload_amount_usd":{"type":"integer","nullable":true},"generation_project_id":{"type":"string","nullable":true,"format":"uuid"},"account_description":{"type":"string"},"reference_accounts":{"type":"array","items":{"type":"string"}},"website":{"type":"string"},"source":{"type":"string","enum":["web","api","mcp","chat"]},"next_run_at":{"type":"string","nullable":true},"credits_this_month":{"type":"integer","minimum":0},"created_at":{"type":"string"},"updated_at":{"type":"string"},"runs":{"type":"array","items":{"$ref":"#/components/schemas/AutomationRun"}}},"required":["id","template_id","content_type","status","paused_reason","every_days","hour","timezone","starts_on","topic_mode","limit_by","budget_credits","ends_after","auto_reload","reload_below_credits","reload_amount_usd","generation_project_id","account_description","reference_accounts","website","source","next_run_at","credits_this_month","created_at","updated_at","runs"],"additionalProperties":false,"description":"An automation with every run, in order."},"AutomationRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0},"scheduled_for":{"type":"string"},"title":{"type":"string","nullable":true},"brief":{"type":"string","nullable":true},"topic_source":{"type":"string","nullable":true,"enum":["user","suggested","auto",null]},"status":{"type":"string","enum":["scheduled","dispatching","queued","done","failed","skipped","canceled"]},"skip_reason":{"type":"string","nullable":true,"enum":["budget","credits","paused","missed","no_topic","error",null]},"job_id":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","position","scheduled_for","title","brief","topic_source","status","skip_reason","job_id"],"additionalProperties":false,"description":"One scheduled video. queued, done and failed runs carry the job_id of the created video."},"CreateAutomationRequest":{"type":"object","properties":{"template_id":{"type":"string","format":"uuid"},"content_type":{"type":"string","enum":["short","video"],"default":"short"},"every_days":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]},{"type":"number","enum":[7]}],"default":1},"hour":{"type":"integer","minimum":0,"maximum":23,"default":9},"timezone":{"type":"string","minLength":1,"maxLength":64},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"topic_mode":{"type":"string","enum":["auto","stop"],"default":"auto"},"limit_by":{"type":"string","enum":["budget","runs"],"default":"budget"},"budget_credits":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"maximum":10000000},"ends_after":{"type":"integer","nullable":true,"minimum":1,"maximum":90},"auto_reload":{"type":"boolean"},"reload_below_credits":{"type":"integer","minimum":100,"maximum":100000},"reload_amount_usd":{"type":"integer","minimum":20,"maximum":1000},"generation_project_id":{"type":"string","nullable":true,"format":"uuid"},"account_description":{"type":"string","maxLength":5000,"default":""},"reference_accounts":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":3,"default":[]},"website":{"type":"string","maxLength":500,"default":""},"topics":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":100},"brief":{"type":"string","maxLength":400,"default":""},"suggested":{"type":"boolean"}},"required":["title"]},"maxItems":90,"default":[]}},"required":["template_id","timezone"],"additionalProperties":false,"description":"Schedule one template and format to generate a video every every_days days at hour (local, IANA timezone), for up to 3 months. Pro and Creator only; one live automation per template and content_type. Graphics (code) templates run with Calliope's agent (charged as Calliope Agent) and each video lasts up to a Short (180 s)."},"UpdateAutomationRequest":{"type":"object","properties":{"every_days":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]},{"type":"number","enum":[7]}]},"hour":{"type":"integer","minimum":0,"maximum":23},"timezone":{"type":"string","minLength":1,"maxLength":64},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"topic_mode":{"type":"string","enum":["auto","stop"]},"limit_by":{"type":"string","enum":["budget","runs"]},"budget_credits":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"maximum":10000000},"ends_after":{"type":"integer","nullable":true,"minimum":1,"maximum":90},"auto_reload":{"type":"boolean"},"reload_below_credits":{"type":"integer","minimum":100,"maximum":100000},"reload_amount_usd":{"type":"integer","minimum":20,"maximum":1000},"generation_project_id":{"type":"string","nullable":true,"format":"uuid"},"account_description":{"type":"string","maxLength":5000},"reference_accounts":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":3},"website":{"type":"string","maxLength":500},"topics":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":100},"brief":{"type":"string","maxLength":400,"default":""},"suggested":{"type":"boolean"}},"required":["title"]},"maxItems":90},"status":{"type":"string","enum":["active","paused"]}},"additionalProperties":false,"description":"Partial update. template_id and content_type are immutable. status paused or active pauses or resumes. topics replaces the topics of future runs, in order."}},"parameters":{}},"paths":{"/api/v1/agents":{"post":{"summary":"Delegate a read-only video review","security":[{"ApiKeyAuth":[]}],"description":"Queues a hidden reviewer for an owned video's prepared workspace. One active review per account. Uses editor chat plan, token and credit limits and pricing, including for fixed-price videos, and API/MCP request rate limits. The reviewer can only list and read files and skills, view images, check operations and run inspection commands (contact-sheet, hyperframes snapshot, ffprobe) that write to scratch folders; it never writes code. effort (low, high or max; default low) sets how much it reasons.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DelegateRequest"}}}},"responses":{"202":{"description":"Reviewer queued. Poll GET /agents/{agent_id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"400":{"description":"Invalid job_id or task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient editor chat credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Video not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The workspace is not ready for review, or this account already has an active review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Editor chat token limit or API/MCP request rate limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Retry shortly. Admission is temporarily unavailable, or an expired review was recovered and current limits must be checked again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/agents/{agent_id}":{"get":{"summary":"Get a delegated review result","security":[{"ApiKeyAuth":[]}],"description":"Returns running, completed with result, or failed with a public error. wait defaults to false; true waits up to 20 seconds. Only the owning account can retrieve a delegated agent.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"agent_id","in":"path"},{"schema":{"type":"boolean","default":false},"required":false,"name":"wait","in":"query"}],"responses":{"200":{"description":"Reviewer status and completed report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"400":{"description":"Invalid agent_id or wait.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Delegated agent not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/catalog":{"get":{"summary":"Get visual catalog","description":"Browse templates, caption styles, split presets (animations for the bottom half of a split clip) or narration voices, ten per page. Page defaults to 1; pages beyond the catalog return an empty items array. Templates use the same visibility and ordering as GET /templates. Split presets are free and include a 9:8 cover plus a preview_video_url loop. Templates accept `visibility` (community or mine). `template_id` returns that one template's card in `template` (page_size 1): price per minute, quality labels, voice, demo and, for own templates, references and style previews. Voices accept `language` (ISO 639-1; without `search` only en, es, fr, pt, de, it have curated voices and another language returns an empty page) and `search` (the whole voice library, live, by name, accent, style or voice id; its voices work like the curated ones) and carry `voice` (accent, gender, quality, flag and a preview_url sample).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["templates","captions","split_presets","voices"]},"required":true,"name":"catalog","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","enum":["short","video"],"description":"Templates only: filter and rank by content type."},"required":false,"description":"Templates only: filter and rank by content type.","name":"content_type","in":"query"},{"schema":{"type":"string","enum":["mine","community"],"description":"Templates only. community = the public catalog, in the website's order; mine = this account's own templates. Omitted = both, own first."},"required":false,"description":"Templates only. community = the public catalog, in the website's order; mine = this account's own templates. Omitted = both, own first.","name":"visibility","in":"query"},{"schema":{"type":"number","enum":[10,1],"description":"10 (default) = a page of covers. 1 = one template's card: requires template_id."},"required":false,"description":"10 (default) = a page of covers. 1 = one template's card: requires template_id.","name":"page_size","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Templates only: return this template (own or public) as a card in `template`, with page_size 1."},"required":false,"description":"Templates only: return this template (own or public) as a card in `template`, with page_size 1.","name":"template_id","in":"query"},{"schema":{"type":"string","enum":["en","ja","zh","de","hi","fr","ko","pt","it","es","id","nl","tr","fil","pl","sv","bg","ro","ar","cs","el","fi","hr","ms","sk","da","ta","uk","ru","hu","no","vi"],"description":"Voices only: ISO 639-1 language of the voices. With search it filters the whole library; the curated voices are only in en, es, fr, pt, de, it, so another language without search returns an empty page."},"required":false,"description":"Voices only: ISO 639-1 language of the voices. With search it filters the whole library; the curated voices are only in en, es, fr, pt, de, it, so another language without search returns an empty page.","name":"language","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Voices only: live search of the whole voice library by name, accent, style or voice id. Omitted = the curated voices."},"required":false,"description":"Voices only: live search of the whole voice library by name, accent, style or voice id. Omitted = the curated voices.","name":"search","in":"query"}],"responses":{"200":{"description":"Catalog page with downloadable cover URLs, or one template's card.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogResponse"}}}},"400":{"description":"Invalid catalog, page, content_type, visibility, page_size, template_id, language or search.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Template not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Template analysis still processing or failed, or the template does not support that content_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The voice library is unavailable right now. Try again in a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/templates":{"get":{"summary":"List templates","description":"Returns twenty templates per page. Own projects first (created in the website, then through the API or MCP), then the public catalog in the website's Popular or Community order; `visibility` keeps only one of the two. Use GET /templates/{template_id} for one owned template's full settings.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["short","video"],"description":"Filter and rank by this format."},"required":false,"description":"Filter and rank by this format.","name":"content_type","in":"query"},{"schema":{"type":"boolean","deprecated":true,"description":"Ignored: API-created projects are listed like other projects."},"required":false,"description":"Ignored: API-created projects are listed like other projects.","name":"include_api_generations","in":"query"},{"schema":{"type":"string","enum":["medium","high","extra"],"description":"Video quality for the preview demo; omitted uses the template default."},"required":false,"description":"Video quality for the preview demo; omitted uses the template default.","name":"quality","in":"query"},{"schema":{"type":"string","enum":["popular","community"],"default":"popular","description":"Public catalog tab: popular ranks by users, uses, credits and title; community lists newest first. Without `visibility`, own projects come first."},"required":false,"description":"Public catalog tab: popular ranks by users, uses, credits and title; community lists newest first. Without `visibility`, own projects come first.","name":"feed","in":"query"},{"schema":{"type":"string","enum":["mine","community"],"description":"mine = only this account's projects: created in the website first, then through the API or MCP, newest first. community = only the public catalog, in the website's order (your published templates included). Omitted = both, own projects first."},"required":false,"description":"mine = only this account's projects: created in the website first, then through the API or MCP, newest first. community = only the public catalog, in the website's order (your published templates included). Omitted = both, own projects first.","name":"visibility","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1,"description":"Page number, starting at 1. Twenty templates per page."},"required":false,"description":"Page number, starting at 1. Twenty templates per page.","name":"page","in":"query"}],"responses":{"200":{"description":"Templates available for the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTemplatesResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create template","description":"Creates a reusable template. Manual templates return `template_id` immediately. Video templates (a social media link or an uploaded video) return `analysis_job_id`; poll `GET /templates/analyses/{analysis_job_id}` until `template_id` is returned.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplateRequest"}}}},"responses":{"201":{"description":"Template created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetail"}}}},"202":{"description":"Template analysis queued for a video source.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAnalysis"}}}},"400":{"description":"Invalid template request body or visual reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"source_upload_path not found for this account, or `voice_id` is not in the voice library or has a custom rate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"You already have a template with that name (code TEMPLATE_NAME_TAKEN, with its template_id), or a style extraction is already queued or processing for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Storage limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Uploaded video is missing or exceeds 5 GB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"The account hit its daily API limit in the rolling 24h window.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RateLimitErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"The voice could not be added. Try again in a minute or pick another voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The voice library is unavailable right now. Try again in a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/templates/analyses/{analysis_job_id}":{"get":{"summary":"Get template analysis","description":"Polls a video template analysis. `template_id` stays null until status is `Completed`.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"analysis_job_id","in":"path"}],"responses":{"200":{"description":"Current template analysis state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAnalysis"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Template analysis not found or not owned by the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/templates/{template_id}":{"get":{"summary":"Get template","description":"Returns an owned template and its editable visual settings. `status: Failed` means its video analysis failed: set `visual_style` or `visual_references` with PATCH to use it, or create another one.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"template_id","in":"path"},{"schema":{"type":"string","enum":["short","video"],"description":"Content branch to read. Required when the template supports both short and video."},"required":false,"description":"Content branch to read. Required when the template supports both short and video.","name":"content_type","in":"query"}],"responses":{"200":{"description":"Current template state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetail"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Template not found or not owned by the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Template analysis is still processing. Poll `GET /templates/analyses/{analysis_job_id}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update template","description":"Replaces editable template fields such as `visual_style`, `visual_references`, and `scripting_style`. Send empty string or empty array to remove. Setting `visual_style` or `visual_references` makes a template whose video analysis failed usable.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"template_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTemplateRequest"}}}},"responses":{"200":{"description":"Updated template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetail"}}}},"400":{"description":"Invalid template update body or visual reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Template not found or not owned by the authenticated account, or `voice_id` is not in the voice library or has a custom rate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"The voice could not be added. Try again in a minute or pick another voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The voice library is unavailable right now. Try again in a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/jobs":{"get":{"summary":"List video jobs","description":"Lists the video jobs of the authenticated account, newest first. Filter with `project_id` and `status`, page with `limit` and `offset`. Assets are not included: use `GET /jobs/{job_id}` for the video URL.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Only jobs of this project."},"required":false,"description":"Only jobs of this project.","name":"project_id","in":"query"},{"schema":{"type":"string","enum":["Queued","Processing","Waiting","Completed","Failed"],"description":"Only jobs in this status."},"required":false,"description":"Only jobs in this status.","name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Jobs per page. Default 20, max 100."},"required":false,"description":"Jobs per page. Default 20, max 100.","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"description":"Jobs to skip. Default 0."},"required":false,"description":"Jobs to skip. Default 0.","name":"offset","in":"query"}],"responses":{"200":{"description":"Video jobs of the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListJobsResponse"}}}},"400":{"description":"Invalid query parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create video job","description":"Queues a video from exactly one source: `source.template_id` or `source.references` (images, text, skills and up to one video). Reference sources support `workspace:true` for Graphics Shorts. Sources and their labels are retained; video analysis covers at most 30 minutes and saves relevant compressed excerpts with timestamps. Optionally pass `project_id` for the output container and `generation_project_id` for its organization folder (default: 'API Generations').","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGenerationRequest"}}}},"responses":{"202":{"description":"Video job queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreated"}}}},"400":{"description":"Invalid request body (e.g. missing required fields, zero or multiple script sources, invalid URL).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The account does not have enough credits to create this video.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The provided `template_id` or `project_id` does not exist or is not accessible to the authenticated account, or `voice_id` is not in the voice library or has a custom rate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request cannot be fulfilled: too many pending jobs, the template is not supported by the API yet, or `content_type` is incompatible with the template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Request rate limit reached. New-video allowances are enforced when starting assets or rendering Graphics, not when creating a draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"The voice could not be added. Try again in a minute or pick another voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The voice library is unavailable right now. Try again in a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/jobs/{job_id}":{"get":{"summary":"Get video job","description":"Returns the current state of a video job: status, phase, estimated remaining time, estimated/final `credit_cost`, a fresh `video_url` link once `Completed`, or a user-readable `error` on failure.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"job_id","in":"path"},{"schema":{"type":"string","enum":["true","false"],"description":"Set true to include signed source asset URLs when the final job assets are ready."},"required":false,"description":"Set true to include signed source asset URLs when the final job assets are ready.","name":"get_assets","in":"query"}],"responses":{"200":{"description":"Current state of the video job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found or not owned by the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a video job","description":"Permanently deletes a video or clip job and its files. Credits already charged are not refunded; a queued batch that has not started releases its reserved credits.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"job_id","in":"path"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found or not owned by the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The job is processing, or its clip batch is still rendering.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/thumbnails":{"get":{"summary":"List thumbnail styles","description":"Returns saved thumbnail styles shared across the authenticated account's projects. Use `style_id` from this endpoint when creating thumbnails.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Thumbnail styles available for the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThumbnailStylesResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/templates/{template_id}/character-reference":{"post":{"summary":"Generate a character sheet before creating a video","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"template_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterReferencePreviewRequest"}}}},"responses":{"202":{"description":"Sheet queued. Each version costs 14 credits, including on the Free plan (trial credits).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestStyleResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Template not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation in progress or missing source text.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/jobs/{job_id}/thumbnails":{"post":{"summary":"Create thumbnails for a completed video job","description":"Queues thumbnail generation from the completed Calliope video job. The `job_id` attaches the video internally, equivalent to selecting it in Thumbnail Generator. If the video has an internal main-character reference sheet, Calliope uses it automatically during thumbnail prompting and image generation.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"job_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateThumbnailRequest"}}}},"responses":{"202":{"description":"Thumbnail job queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailJobCreated"}}}},"400":{"description":"Invalid thumbnail request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The account does not have enough credits to create thumbnails.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found or not owned by the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The video job is not completed yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"summary":"List thumbnails for a video job","description":"Returns queued, processing, completed, or failed thumbnail jobs for a video job. Completed jobs include freshly signed thumbnail URLs.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"job_id","in":"path"}],"responses":{"200":{"description":"Thumbnail jobs for the video job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThumbnailsResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found or not owned by the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/templates/{template_id}/test-style":{"get":{"summary":"Get the Test Style (Template Master Reference) state","description":"Returns the current Template Master Reference (signed URL), the latest generation job and what the next generation costs.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"template_id","in":"path"},{"schema":{"$ref":"#/components/schemas/ContentType"},"required":false,"description":"Whether to generate a short-form or long-form video.","name":"content_type","in":"query"}],"responses":{"200":{"description":"Master reference state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestStyleState"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Template not found or not owned by the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Test Style: generate the Template Master Reference","description":"Queues a Style Master board (16:9) built from the template's visual references and visual style. It is saved as the `template_master_ref` visual reference (first slot) and becomes the template cover. 3 free generations per day, then 14 credits.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"template_id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestStyleRequest"}}}},"responses":{"202":{"description":"Master reference job queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestStyleResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Template not found or not owned by the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A Template Master Reference is already being generated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/clips":{"post":{"summary":"Create clips from a long video","description":"Cuts a YouTube video or an uploaded video into up to 10 vertical Short clips; each clip is its own job. Call it first with `estimate: true` to get the exact cost and a `request_id`, then with `confirm: true` and that `request_id` to queue it. Requires any paid plan. Smart charges credits per processed minute; Fast and Captions only cost no credits. Poll `GET /clips` or `GET /jobs/{job_id}`.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClippingRequest"}}}},"responses":{"200":{"description":"Estimate: exact cost, nothing queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClippingEstimate"}}}},"202":{"description":"Clip batch queued, or the same batch for a retried request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClippingCreated"}}}},"400":{"description":"Invalid body, video, range or options, or missing estimate/confirm.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Not enough credits, or no active subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"project_id not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Too many pending jobs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The video is private, live, too short, too long or missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Daily API generation limit or clipping fair-use limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"summary":"List clips","description":"The 48 latest clips of the account (or of `project_id`), newest batch first and in order inside each batch. Completed clips include a signed MP4 URL.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"Only clips of this project."},"required":false,"description":"Only clips of this project.","name":"project_id","in":"query"}],"responses":{"200":{"description":"Clips.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListClipsResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"project_id not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/uploads":{"post":{"summary":"Upload a source video","description":"Returns a signed URL. PUT the raw file to `upload_url`, then pass `path` as `source_upload_path` to `POST /clips` or to the `source` of `POST /templates`.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadRequest"}}}},"responses":{"200":{"description":"Signed upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCreated"}}}},"400":{"description":"Invalid file name or size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"project_id not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Storage limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/downloads":{"post":{"summary":"Download media from a link (download_media)","description":"Stores a public link as your own asset: video at `quality`, MP3 (`audio`) or the images of a photo post, plus a transcript with speakers unless `transcribe` is false. Pay per use, charged only after success and never above the estimate; `estimate: true` returns only the cost. Daily limit per plan: Starter 5, Pro 50, Creator 500.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadMediaRequest"}}}},"responses":{"202":{"description":"Queued. Poll GET /media/{media_id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaQueued"}}}},"400":{"description":"Invalid request, or POLICY_NOT_ACCEPTED (accept_media_policy false, or a web session without true).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"INSUFFICIENT_CREDITS.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"UPGRADE_REQUIRED: any paid plan (Starter, Pro or Creator).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"project_id not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"PENDING_JOBS_LIMIT: finish pending jobs first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Daily limit of this tool reached (rolling 24 h).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["DAILY_LIMIT"]},"metric":{"type":"string"},"daily_limit":{"type":"integer","nullable":true},"used":{"type":"integer","nullable":true},"remaining":{"type":"integer"}},"required":["error","code","metric","daily_limit","used","remaining"]}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/transcriptions":{"post":{"summary":"Transcribe media (transcribe_media)","description":"Transcript with timestamps and speakers of a public link or of your own stored video or audio (`source_path`). Existing subtitles of a link come attached. Pay per use, charged only after success and never above the estimate. Daily limit per plan: Starter 5, Pro 50, Creator 500.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscribeMediaRequest"}}}},"responses":{"202":{"description":"Queued. Poll GET /media/{media_id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaQueued"}}}},"400":{"description":"Invalid request, or POLICY_NOT_ACCEPTED (accept_media_policy false, or a web session without true).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"INSUFFICIENT_CREDITS.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"UPGRADE_REQUIRED: any paid plan (Starter, Pro or Creator).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"project_id not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"PENDING_JOBS_LIMIT: finish pending jobs first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Daily limit of this tool reached (rolling 24 h).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["DAILY_LIMIT"]},"metric":{"type":"string"},"daily_limit":{"type":"integer","nullable":true},"used":{"type":"integer","nullable":true},"remaining":{"type":"integer"}},"required":["error","code","metric","daily_limit","used","remaining"]}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/subtitles":{"post":{"summary":"Get existing subtitles (get_subtitles)","description":"Free on every plan, Free included: the subtitles a public link already has, as timed text. Daily limit: Free 5, Starter, Pro and Creator 500.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubtitlesRequest"}}}},"responses":{"202":{"description":"Queued. Poll GET /media/{media_id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaQueued"}}}},"400":{"description":"Invalid request, or POLICY_NOT_ACCEPTED (accept_media_policy false, or a web session without true).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"project_id not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"PENDING_JOBS_LIMIT: finish pending jobs first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Daily limit of this tool reached (rolling 24 h).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["DAILY_LIMIT"]},"metric":{"type":"string"},"daily_limit":{"type":"integer","nullable":true},"used":{"type":"integer","nullable":true},"remaining":{"type":"integer"}},"required":["error","code","metric","daily_limit","used","remaining"]}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/posts":{"post":{"summary":"Read a post (read_media)","description":"Free on every plan, Free included: the text of a public post (post text, caption or YouTube description), its author, date, stats and the media it carries, without downloading anything. Long X posts come whole. Daily limit: Free 5, Starter, Pro and Creator 500.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadMediaRequest"}}}},"responses":{"202":{"description":"Queued. Poll GET /media/{media_id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaQueued"}}}},"400":{"description":"Invalid request, or POLICY_NOT_ACCEPTED (accept_media_policy false, or a web session without true).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"project_id not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"PENDING_JOBS_LIMIT: finish pending jobs first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Daily limit of this tool reached (rolling 24 h).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["DAILY_LIMIT"]},"metric":{"type":"string"},"daily_limit":{"type":"integer","nullable":true},"used":{"type":"integer","nullable":true},"remaining":{"type":"integer"}},"required":["error","code","metric","daily_limit","used","remaining"]}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media/{media_id}":{"get":{"summary":"Get media (get_media)","description":"Status and result of a download, transcription or subtitles request: estimate, charge, source, assets with signed URLs (1 h) and the transcript or subtitles text.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"media_id","in":"path"}],"responses":{"200":{"description":"Media.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Media not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media":{"get":{"summary":"List media","description":"Your downloads, transcriptions and subtitles, newest first, without signed URLs (read one with GET /media/{media_id}). Estimate-only requests are excluded.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["download_media","transcribe_media","get_subtitles","read_media"],"description":"Only this tool's history."},"required":false,"description":"Only this tool's history.","name":"tool","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Items per page. Default 20, max 100."},"required":false,"description":"Items per page. Default 20, max 100.","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"description":"Items to skip. Default 0."},"required":false,"description":"Items to skip. Default 0.","name":"offset","in":"query"}],"responses":{"200":{"description":"Media history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMediaResponse"}}}},"400":{"description":"Invalid tool, limit or offset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/jobs/{job_id}/tools":{"post":{"summary":"Edit scene timing, framing or gaps","description":"No credits on paid plans. Queue resync_scenes or reframe_clip, then poll get_editor for scene_sync or framing. Framing preserves timing, captions and overlays. reframe_clip mode split puts the reframed clip in the top half; the bottom half shows the Split B-roll clips added in the web editor, or a filler baked into the clip when split_screen.filler is sent (an upload or AI image/video of this project, or a split preset). track or subject always frames with fill, except split, which keeps the split and tracks in the top half. update_resources with ripple_gap edits V1 gaps immediately; negative duration_sec closes before at_sec with magnet on. replace_clip swaps the media of a completed scene or B-roll in place (uploaded image or video) and keeps its start; V1 scenes of No Voiceover videos take the video's length and shift the rest (shiftedBySec). Other editor tools share this endpoint. Graphics generation uses the existing template and job endpoints. Graphics videos are edited with the workspace tool (read its skill with read_skill); classic scene, timing, effect and narration replacement tools are unavailable for those videos.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"job_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"tool":{"type":"string","enum":["split_clip","retime_clip"]},"expected_revision":{"type":"integer","minimum":0,"description":"Reject the edit if this editor revision is no longer current."}},"required":["tool"],"additionalProperties":{"nullable":true}},{"type":"object","properties":{"tool":{"type":"string","enum":["get_editor"]},"promptKey":{"type":"string"},"offset":{"type":"integer","minimum":0,"default":0},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20}},"required":["tool"],"additionalProperties":{"nullable":true}},{"type":"object","properties":{"tool":{"type":"string","enum":["regenerate_clip","animate_clip"]},"video_prompt":{"type":"string","maxLength":2000}},"required":["tool"],"additionalProperties":{"nullable":true}},{"type":"object","properties":{"tool":{"type":"string","enum":["resync_scenes"]},"action":{"type":"string","enum":["undo","redo"]},"operation_id":{"type":"string","format":"uuid"}},"required":["tool"]},{"type":"object","properties":{"tool":{"type":"string","enum":["reframe_clip"]},"prompt_key":{"type":"string","minLength":1,"maxLength":160},"action":{"type":"string","enum":["analyze","apply","restore"]},"framing":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","fill","fit","adaptive","split"]},"track":{"type":"boolean"},"subject":{"type":"object","nullable":true,"properties":{"time_sec":{"type":"number","minimum":0},"box":{"type":"array","items":{"type":"number","minimum":0,"maximum":1}},"scope":{"type":"string","enum":["scene","clip"]}},"required":["time_sec","box","scope"],"additionalProperties":false},"scene":{"type":"object","properties":{"start":{"type":"number","minimum":0},"end":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["start","end"],"additionalProperties":false,"description":"Apply only to this current framing segment, in master seconds. Omit for the whole clip. Not available with Split."},"split_screen":{"type":"object","properties":{"filler":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["upload"]},"path":{"type":"string","minLength":1,"maxLength":600},"media_type":{"type":"string","enum":["image","video"]}},"required":["source","path","media_type"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["ai_image"]},"path":{"type":"string","minLength":1,"maxLength":600},"generation_id":{"type":"string","pattern":"^[\\w-]{1,80}$"},"prompt":{"type":"string","maxLength":500}},"required":["source","path"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["ai_video"]},"path":{"type":"string","minLength":1,"maxLength":600},"generation_id":{"type":"string","pattern":"^[\\w-]{1,80}$"},"prompt":{"type":"string","maxLength":500}},"required":["source","path"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["preset"]},"preset_id":{"type":"string","enum":["rings-neon","rings-rainbow","rings-minimal","rings-sunset","rings-mint","rings-ice","rings-gold","grow-rainbow","grow-sunset","grow-solid","grow-neon","grow-mono","grow-candy","custom"]},"params":{"type":"object","properties":{"kind":{"type":"string","enum":["ring_escape","growing_ball"]},"ball_speed":{"type":"number","minimum":0.5,"maximum":4},"ball_size":{"type":"number","minimum":0.01,"maximum":0.1},"gravity":{"type":"number","minimum":0,"maximum":4},"seed":{"type":"integer","minimum":0,"maximum":2147483646},"ring_count":{"type":"integer","minimum":1,"maximum":80},"gap_degrees":{"type":"number","minimum":15,"maximum":75},"ring_spin":{"type":"number","minimum":0,"maximum":240},"trail":{"type":"boolean"},"border_width":{"type":"number","minimum":0.005,"maximum":0.05},"growth_curve":{"type":"number","minimum":0,"maximum":1},"style":{"type":"object","properties":{"preset":{"type":"string","enum":["solid","gradient","rainbow","neon","minimal"]},"background":{"type":"string","pattern":"^#[0-9a-f]{6}$/i"},"border_color":{"type":"string","pattern":"^#[0-9a-f]{6}$/i"},"border_color_end":{"type":"string","pattern":"^#[0-9a-f]{6}$/i"},"ball_color":{"type":"string","pattern":"^#[0-9a-f]{6}$/i"}},"additionalProperties":false}},"additionalProperties":false,"description":"Animation overrides on top of the preset (custom: on top of the kind defaults). Omitted fields keep the preset value. Same seed + params + clip length = same animation in preview and export."}},"required":["source","preset_id"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["stock"]},"selection_token":{"type":"string","minLength":10,"maxLength":8000}},"required":["source","selection_token"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["current"]}},"required":["source"],"additionalProperties":false}],"description":"Bottom half of a split clip. upload: image or video uploaded to this project (tmpUploads/timeline). ai_image/ai_video: an already generated image or video of this project. preset: an animation from GET /catalog?catalog=split_presets (custom requires params.kind). stock: only from the web editor. current: keep the filler already applied, including a stock video picked in the web editor."}},"required":["filler"],"additionalProperties":false,"description":"Only with split, and optional. Omit it and only the top half is baked: the bottom half shows the Split B-roll clips added in the web editor (black while there are none). A filler is baked into the clip instead (legacy)."}},"required":["mode","track"],"additionalProperties":false},"operation_id":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["undo","redo"]}},"required":["tool","prompt_key","action"]},{"type":"object","properties":{"tool":{"type":"string","enum":["replace_clip"]},"prompt_key":{"type":"string","minLength":1,"maxLength":160,"description":"promptKey of a completed scene (V1) or B-roll (V2/V3) outside Split, from get_editor."},"path":{"type":"string","minLength":1,"maxLength":1000,"description":"r2:// path of a PNG, JPG, WEBP, MP4, MOV or WEBM of this project: uploaded with register_upload (without path it returns the upload URL) or the ref of a file attached in the in-app chat. The server measures videos."},"media_type":{"type":"string","enum":["image","video"]},"file_name":{"type":"string","maxLength":160}},"required":["tool","prompt_key","path","media_type"]},{"type":"object","properties":{"tool":{"type":"string","enum":["edit_mg"]},"overlayIndex":{"type":"integer","minimum":0},"startSec":{"type":"number","minimum":0},"endSec":{"type":"number","minimum":0,"exclusiveMinimum":true},"values":{"type":"object","additionalProperties":{"nullable":true}},"name":{"type":"string"},"readHtml":{"type":"boolean","description":"Read an HTML page without editing; returns html, offset, limit, total, next_offset and has_more."},"offset":{"type":"integer","minimum":0,"default":0,"description":"HTML offset in Unicode code points; follow next_offset until has_more is false."},"limit":{"type":"integer","minimum":1,"maximum":18000,"default":18000,"description":"Maximum Unicode code points per HTML page (1–18000)."},"html":{"type":"string"},"previewSec":{"type":"array","items":{"type":"number","minimum":0},"maxItems":5},"expected_revision":{"type":"integer","minimum":0,"description":"Reject the edit if this editor revision is no longer current."}},"required":["tool","overlayIndex"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["add_real_photos"]},"query":{"type":"string","minLength":2,"maxLength":80},"selection_token":{"type":"string","minLength":10,"maxLength":4000},"at_sec":{"type":"number","minimum":0},"duration_sec":{"type":"number","minimum":2,"maximum":12},"variant":{"type":"string","enum":["mix","polaroid","full","card","polaroid_title","full_title"]},"auto":{"type":"boolean"},"instructions":{"type":"string","maxLength":1000},"confirm_editorial_use":{"type":"boolean"}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["update_resources"]},"ripple_gap":{"type":"object","properties":{"at_sec":{"type":"number","minimum":0},"duration_sec":{"type":"number"}},"required":["at_sec","duration_sec"],"additionalProperties":false},"expected_revision":{"type":"integer","minimum":0,"description":"Reject the edit if this editor revision is no longer current."}},"required":["tool","ripple_gap"]},{"type":"object","properties":{"tool":{"type":"string","enum":["update_resources"]},"captionsParameters":{"type":"object","properties":{"style":{"type":"string","enum":["highlight","pill-karaoke","neon-accent","weight-shift","parallax-layers","emoji-pop","beast","punch","clean","comic","slam","gradient","reveal","glitch","neon-glow","bold-stroke","word-by-word","typewriter","tag-box","editorial"]},"speakerSegments":{"type":"object","nullable":true,"properties":{"source":{"type":"string","minLength":1,"maxLength":2048},"turns":{"type":"array","items":{"type":"object","properties":{"firstWord":{"type":"integer","minimum":0},"endWord":{"type":"integer","minimum":0,"exclusiveMinimum":true},"speaker":{"type":"string","minLength":1,"maxLength":80}},"required":["firstWord","endWord","speaker"],"additionalProperties":false},"maxItems":10000}},"required":["source","turns"],"additionalProperties":false},"speakerAccentColors":{"type":"object","additionalProperties":{"type":"string","pattern":"^#[0-9a-f]{6}$/i"}}},"required":["style","speakerSegments"],"additionalProperties":{"nullable":true}}},"required":["tool","captionsParameters"]},{"type":"object","properties":{"tool":{"type":"string","enum":["apply_effect"]},"promptKey":{"type":"string"},"phase":{"type":"string","enum":["entry","exit","full"]},"name":{"type":"string","maxLength":40},"duration":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":2},"restore_state":{"type":"object","properties":{"animation":{"anyOf":[{"type":"string","maxLength":40},{"type":"object","properties":{"name":{"type":"string","maxLength":40},"duration":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":2}},"required":["name"]},{"nullable":true}]},"managed_sound":{"type":"object","nullable":true,"properties":{"path":{"type":"string","pattern":"^apps\\/worker\\/visual_assets\\/soundfx\\/[\\w.-]+\\.mp3$"},"start":{"type":"number","minimum":0},"volume":{"type":"number","minimum":0,"maximum":1}},"required":["path","start","volume"]},"sound":{"type":"object","nullable":true,"properties":{"path":{"type":"string","pattern":"^apps\\/worker\\/visual_assets\\/soundfx\\/[\\w.-]+\\.mp3$"},"start":{"type":"number","minimum":0},"volume":{"type":"number","minimum":0,"maximum":1}},"required":["path","start","volume"]}},"required":["animation","managed_sound","sound"]},"params":{"type":"object","additionalProperties":{"nullable":true}},"remove":{"type":"boolean"},"target":{"type":"string"}},"required":["tool"]},{"type":"object","properties":{"tool":{"type":"string","enum":["workspace"]},"action":{"type":"string","enum":["open","files","read_file","write_file","edit","undo","exec","import","export","view_image","render_project","get_operation","gpu"]},"args":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"operation_id":{"type":"string","format":"uuid"}},"required":["tool","action"],"additionalProperties":false,"description":"Code workspace of the video. action: open, files, read_file, write_file, edit, undo, exec, view_image, render_project, get_operation or gpu; args per action: read_skill path tools/creation-resources/workspace/SKILL.md. exec {command, timeout} runs in the CPU sandbox (4 vCPU, 3 GB RAM, 12 GB for heavy projects); with gpu:true it runs on the job's GPU machine (NVIDIA L4 24 GB, 8 vCPU, 27 GiB RAM; 4 credits per minute while its assigned machine runs, including boot), which stays on keep_alive_minutes (1 to 120, default 3) after the command. gpu: {} reads its status, {keep_alive_minutes} starts or extends it, {release:true} turns it off once idle. edit applies deterministic edits without a sandbox (write, replace, move, trim, split, delete, volume, attr, swap_src, insert): up to 1000 ops and 3.5 MiB of write content plus replace text per call."}]}}}},"responses":{"200":{"description":"Editor data, an editor change or a cost estimate. Eligible regeneration estimates can include a Free Budget claim link.","content":{"application/json":{"schema":{"type":"object","properties":{"free_budget_claim":{"$ref":"#/components/schemas/FreeBudgetClaim"}},"additionalProperties":{"nullable":true}}}}},"202":{"description":"Queued. Returns operation_id. Poll get_operation for workspace progress.","content":{"application/json":{"schema":{"type":"object","properties":{"operation_id":{"type":"string"},"progress":{"$ref":"#/components/schemas/WorkspaceOperationProgress"}},"required":["operation_id"],"additionalProperties":{"nullable":true}}}}},"400":{"description":"Invalid arguments, split unavailable, or a filler upload that is not available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits, e.g. code WORKSPACE_GPU_NO_CREDITS: the GPU machine needs at least 4 credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"A paid plan is required. Extracting style from a social video link requires Pro or Creator; uploads are available on Starter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found, or the `voice_id` of create_audio or `voiceId` of replace_audio is not in the voice library or has a custom rate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Generation is busy, the saved timeline changed, or there is no current split filler to keep."},"422":{"description":"Workspace edit rejected and nothing saved, e.g. code EDIT_TEXT_NOT_FOUND or EDIT_TEXT_AMBIGUOUS for replace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"The monthly API/MCP video allowance or Creator rolling-24h limit is used or reserved. Edits and re-renders of counted jobs remain available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"The voice could not be added. Try again in a minute or pick another voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The voice library is unavailable right now. Try again in a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/automations":{"get":{"summary":"List automations (list_automations)","description":"Automations of the account, newest first, without runs: runs_total, runs_done, next_run_at and credits_this_month. Filters template_id, content_type and status.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"template_id","in":"query"},{"schema":{"$ref":"#/components/schemas/ContentType"},"required":false,"description":"Whether to generate a short-form or long-form video.","name":"content_type","in":"query"},{"schema":{"type":"string","enum":["active","paused","finished"],"description":"Omitted = all but deleted."},"required":false,"description":"Omitted = all but deleted.","name":"status","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"page_size","in":"query"}],"responses":{"200":{"description":"Automations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAutomationsResponse"}}}},"400":{"description":"INVALID_INPUT: invalid field, time zone, topics or budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"UPGRADE_REQUIRED: creating, editing and resuming need Pro or Creator; listing, reading, pausing and deleting stay available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NOT_FOUND: automation, template or project not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"UNAVAILABLE: retry in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create an automation (create_automation)","description":"Schedules every run at once (up to 3 months). topics fill the first runs in order; with topic_mode auto the empty runs get a topic about 24 h before. limit_by budget caps the credits of each calendar month (default: the plan's monthly credits); runs ends after ends_after videos. auto_reload, reload_below_credits and reload_amount_usd read and write the account-wide auto-reload (all of Calliope, also in Profile): when the account balance is below reload_below_credits, Calliope buys reload_amount_usd of extra credits with the saved card, at most once per 24 h; omitted = unchanged. Each run charges its video like POST /jobs and, when the automation was created over the API or MCP, counts toward the API & MCP video allowance. Graphics (code) templates run with Calliope's agent (charged as Calliope Agent) and each video lasts up to a Short (180 s).","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationRequest"}}}},"responses":{"201":{"description":"Automation with its runs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automation"}}}},"400":{"description":"INVALID_INPUT: invalid field, time zone, topics or budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"UPGRADE_REQUIRED: creating, editing and resuming need Pro or Creator; listing, reading, pausing and deleting stay available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NOT_FOUND: automation, template or project not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"AUTOMATION_EXISTS: this template already has a live automation for this content_type. PATCH it instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"UNAVAILABLE: retry in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/automations/{automation_id}":{"get":{"summary":"Get an automation (get_automation)","description":"The automation with every run: status, skip_reason and the job_id of each created video.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"automation_id","in":"path"}],"responses":{"200":{"description":"Automation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automation"}}}},"400":{"description":"INVALID_INPUT: invalid field, time zone, topics or budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"UPGRADE_REQUIRED: creating, editing and resuming need Pro or Creator; listing, reading, pausing and deleting stay available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NOT_FOUND: automation, template or project not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"UNAVAILABLE: retry in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an automation (update_automation)","description":"Schedule, limit, topic mode or topics rebuild only the future scheduled runs; done and queued runs stay. status paused or active pauses or resumes; runs that fell due while paused are skipped. A finished automation cannot be edited.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"automation_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAutomationRequest"}}}},"responses":{"200":{"description":"Updated automation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automation"}}}},"400":{"description":"INVALID_INPUT: invalid field, time zone, topics or budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"UPGRADE_REQUIRED: creating, editing and resuming need Pro or Creator; listing, reading, pausing and deleting stay available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NOT_FOUND: automation, template or project not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"UNAVAILABLE: retry in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete an automation (delete_automation)","description":"Stops the automation and cancels its future runs. Videos already created stay.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"automation_id","in":"path"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"INVALID_INPUT: invalid field, time zone, topics or budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, invalid or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"UPGRADE_REQUIRED: creating, editing and resuming need Pro or Creator; listing, reading, pausing and deleting stay available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"NOT_FOUND: automation, template or project not found for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"UNAVAILABLE: retry in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/cloud/wallet":{"get":{"summary":"Read your separate Cloud USD balance","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Cloud funds, reservations and remaining paid time. Studio credits are not included.","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"balance_usd":{"type":"number","minimum":0},"payg_usd":{"type":"number","minimum":0},"subscription_usd":{"type":"number","minimum":0},"reserved_usd":{"type":"number","minimum":0},"available_usd":{"type":"number","minimum":0},"active_burn_usd_per_second":{"type":"number","minimum":0},"remaining_seconds":{"type":"number","nullable":true,"minimum":0},"next_expiry_at":{"type":"string","nullable":true},"warning_minutes":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"billing_blocked":{"type":"boolean"}},"required":["currency","balance_usd","payg_usd","subscription_usd","reserved_usd","available_usd","active_burn_usd_per_second","remaining_seconds","next_expiry_at","warning_minutes"],"additionalProperties":false}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Cloud funds required; Studio credits are never used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Cloud access required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workspace not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workspace is stopping, busy, or an idempotency key was reused with different arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Account or resource concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Cloud runtime unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/workspaces":{"post":{"summary":"Create a Cloud workspace","description":"Creates durable project files with a separate Cloud USD wallet. Select cpu_profile (default shared), cpu_provisioning and gpu_provisioning (both default spot). Standard uses only On-demand machines. Spot can fall back to On-demand at the accepted quote. Both quotes are returned. Reuse request_id with the same options to recover a lost response. Creates no VM and reserves no machine residency.","security":[{"ApiKeyAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cpu_profile":{"type":"string","enum":["shared","dedicated_4","shared_22","dedicated_22"]},"cpu_provisioning":{"type":"string","enum":["spot","standard"]},"gpu_provisioning":{"type":"string","enum":["spot","standard"]},"name":{"type":"string","minLength":1,"maxLength":80,"default":"Workspace"},"request_id":{"type":"string","format":"uuid"}},"required":["request_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"Workspace created or recovered.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["ready","stopping","stopped","deleting"]},"plan":{"type":"string","enum":["payg","cloud"]},"cpu_profile":{"type":"string","enum":["shared","dedicated_4","shared_22","dedicated_22"],"default":"shared"},"cpu_provisioning":{"type":"string","enum":["spot","standard"],"default":"spot"},"cpu_usd_per_minute":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true,"default":null},"limits":{"type":"object","properties":{"source_bytes":{"type":"integer","minimum":0},"media_bytes":{"type":"integer","minimum":0},"deps_bytes":{"type":"integer","minimum":0},"max_files":{"type":"integer","minimum":0,"exclusiveMinimum":true},"command_timeout_seconds":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["source_bytes","media_bytes","deps_bytes","max_files","command_timeout_seconds"]},"gpu_provisioning":{"type":"string","enum":["spot","standard"],"default":"spot"},"gpu_usd_per_minute":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true,"default":null},"persistence":{"type":"string","enum":["files"]},"process_restore":{"type":"boolean","enum":[false]},"residency_guaranteed":{"type":"boolean","enum":[false]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","status","plan","limits","persistence","process_restore","residency_guaranteed","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Cloud funds required; Studio credits are never used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Cloud access required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workspace not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workspace is stopping, busy, or an idempotency key was reused with different arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Account or resource concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Cloud runtime unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"summary":"List your Cloud workspaces","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Owned workspaces.","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["ready","stopping","stopped","deleting"]},"plan":{"type":"string","enum":["payg","cloud"]},"cpu_profile":{"type":"string","enum":["shared","dedicated_4","shared_22","dedicated_22"],"default":"shared"},"cpu_provisioning":{"type":"string","enum":["spot","standard"],"default":"spot"},"cpu_usd_per_minute":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true,"default":null},"limits":{"type":"object","properties":{"source_bytes":{"type":"integer","minimum":0},"media_bytes":{"type":"integer","minimum":0},"deps_bytes":{"type":"integer","minimum":0},"max_files":{"type":"integer","minimum":0,"exclusiveMinimum":true},"command_timeout_seconds":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["source_bytes","media_bytes","deps_bytes","max_files","command_timeout_seconds"]},"gpu_provisioning":{"type":"string","enum":["spot","standard"],"default":"spot"},"gpu_usd_per_minute":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true,"default":null},"persistence":{"type":"string","enum":["files"]},"process_restore":{"type":"boolean","enum":[false]},"residency_guaranteed":{"type":"boolean","enum":[false]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","status","plan","limits","persistence","process_restore","residency_guaranteed","created_at","updated_at"],"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["workspaces","has_more"],"additionalProperties":false}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Cloud funds required; Studio credits are never used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Cloud access required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workspace not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workspace is stopping, busy, or an idempotency key was reused with different arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Account or resource concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Cloud runtime unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/workspaces/{workspace_id}":{"get":{"summary":"Read a Cloud workspace","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"workspace_id","in":"path"}],"responses":{"200":{"description":"Workspace state and disk ceilings; no RAM checkpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["ready","stopping","stopped","deleting"]},"plan":{"type":"string","enum":["payg","cloud"]},"cpu_profile":{"type":"string","enum":["shared","dedicated_4","shared_22","dedicated_22"],"default":"shared"},"cpu_provisioning":{"type":"string","enum":["spot","standard"],"default":"spot"},"cpu_usd_per_minute":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true,"default":null},"limits":{"type":"object","properties":{"source_bytes":{"type":"integer","minimum":0},"media_bytes":{"type":"integer","minimum":0},"deps_bytes":{"type":"integer","minimum":0},"max_files":{"type":"integer","minimum":0,"exclusiveMinimum":true},"command_timeout_seconds":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["source_bytes","media_bytes","deps_bytes","max_files","command_timeout_seconds"]},"gpu_provisioning":{"type":"string","enum":["spot","standard"],"default":"spot"},"gpu_usd_per_minute":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true,"default":null},"persistence":{"type":"string","enum":["files"]},"process_restore":{"type":"boolean","enum":[false]},"residency_guaranteed":{"type":"boolean","enum":[false]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","status","plan","limits","persistence","process_restore","residency_guaranteed","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Cloud funds required; Studio credits are never used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Cloud access required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workspace not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workspace is stopping, busy, or an idempotency key was reused with different arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Account or resource concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Cloud runtime unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a stopped Cloud workspace","description":"Rejects active operations and meters. Uses the existing retained-data deletion policy.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"workspace_id","in":"path"}],"responses":{"200":{"description":"Deleted; repeating deletion is safe."},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Cloud funds required; Studio credits are never used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Cloud access required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workspace not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workspace is stopping, busy, or an idempotency key was reused with different arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Account or resource concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Cloud runtime unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/workspaces/{workspace_id}/actions":{"post":{"summary":"Operate on Cloud workspace files or run a command","description":"Mutations require operation_id. Poll get_operation using the same id and inspect uncertain receipts before retrying. An exec timeout defaults to 180 seconds. Use timeout:0 to run for the remaining allocation, up to 3 hours on PAYG or 24 hours on Cloud monthly. read_file with args {path, download:true} returns a five-minute link to published files without compute, including after a downgrade. open reopens admission after stop and restores saved files.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"workspace_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["open","files","read_file","write_file","exec","import","export","view_image","get_operation","gpu"]},"args":{"type":"object","additionalProperties":{"nullable":true},"default":{}},"operation_id":{"type":"string","format":"uuid"}},"required":["action"],"additionalProperties":false}}}},"responses":{"200":{"description":"Action result or operation receipt."},"202":{"description":"Queued or processing; poll operation_id."},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Cloud funds required; Studio credits are never used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Cloud access required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workspace not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workspace is stopping, busy, or an idempotency key was reused with different arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Account or resource concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Cloud runtime unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/workspaces/{workspace_id}/stop":{"post":{"summary":"Stop a workspace","description":"Closes admission and fences pending operations. Returns stopping while a machine or meter is still active. Published files remain; unsaved output and processes are not resumable.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"workspace_id","in":"path"}],"responses":{"200":{"description":"Stopping or stopped.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["ready","stopping","stopped","deleting"]},"plan":{"type":"string","enum":["payg","cloud"]},"cpu_profile":{"type":"string","enum":["shared","dedicated_4","shared_22","dedicated_22"],"default":"shared"},"cpu_provisioning":{"type":"string","enum":["spot","standard"],"default":"spot"},"cpu_usd_per_minute":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true,"default":null},"limits":{"type":"object","properties":{"source_bytes":{"type":"integer","minimum":0},"media_bytes":{"type":"integer","minimum":0},"deps_bytes":{"type":"integer","minimum":0},"max_files":{"type":"integer","minimum":0,"exclusiveMinimum":true},"command_timeout_seconds":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["source_bytes","media_bytes","deps_bytes","max_files","command_timeout_seconds"]},"gpu_provisioning":{"type":"string","enum":["spot","standard"],"default":"spot"},"gpu_usd_per_minute":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true,"default":null},"persistence":{"type":"string","enum":["files"]},"process_restore":{"type":"boolean","enum":[false]},"residency_guaranteed":{"type":"boolean","enum":[false]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","status","plan","limits","persistence","process_restore","residency_guaranteed","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Cloud funds required; Studio credits are never used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Cloud access required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workspace not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workspace is stopping, busy, or an idempotency key was reused with different arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Account or resource concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Cloud runtime unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/workspaces/{workspace_id}/metrics":{"get":{"summary":"Read workspace usage or subscribe to a Spot notice","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"workspace_id","in":"path"},{"schema":{"type":"string","enum":["1"]},"required":false,"name":"wait_for_preemption","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"Disk use, operation counts and Cloud USD meters. With wait_for_preemption=1, waits for a recorded Spot notice newer than the optional after timestamp and returns preemption_notice_at, or null after a short wait. Reconnect with the same cursor on interruption."},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Cloud funds required; Studio credits are never used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Cloud access required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Workspace not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Workspace is stopping, busy, or an idempotency key was reused with different arguments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Account or resource concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Cloud runtime unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/cloud/checkout":{"post":{"summary":"Purchase Cloud funds through hosted checkout","description":"Cloud $50/month includes $50 of Cloud funds; PAYG purchases start at $10. Uses the same customer as Studio with a separate subscription and USD wallet. Reuse request_id to recover a PAYG checkout. Taxes do not become funds. Monthly funds roll over through the following billing period and expire when the subscription closes. PAYG uses the Studio extra-purchase expiry and survives cancellation. This request authorizes no automatic top-up.","security":[{"ApiKeyAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["payg"]},"amount_usd":{"type":"integer","minimum":10,"maximum":90071992547409},"request_id":{"type":"string","format":"uuid"},"billing_name":{"type":"string","minLength":1,"maxLength":200},"billing_address":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"line1":{"type":"string","minLength":1,"maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","minLength":1,"maxLength":200},"postal_code":{"type":"string","maxLength":200},"state":{"type":"string","maxLength":200}},"required":["country","line1","city"],"additionalProperties":false}},"required":["kind","amount_usd","request_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["cloud50"]},"request_id":{"type":"string","format":"uuid"},"billing_name":{"type":"string","minLength":1,"maxLength":200},"billing_address":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"line1":{"type":"string","minLength":1,"maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","minLength":1,"maxLength":200},"postal_code":{"type":"string","maxLength":200},"state":{"type":"string","maxLength":200}},"required":["country","line1","city"],"additionalProperties":false}},"required":["kind","request_id"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Hosted checkout; fulfillment follows verified payment webhooks.","content":{"application/json":{"schema":{"type":"object","properties":{"checkout_url":{"type":"string","format":"uri"},"checkout_session_id":{"type":"string","minLength":1}},"required":["checkout_url","checkout_session_id"],"additionalProperties":false}}}},"400":{"description":"Invalid purchase or missing billing address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Confirm email or contact support for a Cloud billing review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Subscription exists or another subscription checkout is open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Cloud billing is not available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}