{"openapi":"3.1.0","info":{"title":"Framesail API","version":"0.1.0"},"paths":{"/me":{"get":{"tags":["account"],"summary":"Me","operationId":"me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/login-method":{"post":{"tags":["auth"],"summary":"Login Method","description":"The OAuth provider that is the only way into this account, if any.","operationId":"login_method_auth_login_method_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginMethodRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginMethodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys":{"get":{"tags":["api-keys"],"summary":"List Api Keys","operationId":"list_api_keys_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Response List Api Keys Api Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["api-keys"],"summary":"Create Api Key","operationId":"create_api_key_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api-keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke Api Key","description":"Soft-revoke: the row stays for display/audit, the key stops working\n(within the 60s auth cache TTL on already-warm processes).","operationId":"revoke_api_key_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/register":{"post":{"tags":["oauth"],"summary":"Register Client","description":"Open registration: any client may register (the spec's model — consent\nis what gates account access, not registration). Public client only; no\nsecret is issued because PKCE carries the proof-of-possession.","operationId":"register_client_oauth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Client Oauth Register Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/clients/{client_id}":{"get":{"tags":["oauth"],"summary":"Client Info","description":"Public lookup the consent page uses to name the connecting client and\nreject a tampered redirect before the user ever sees an Allow button.","operationId":"client_info_oauth_clients__client_id__get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Client Info Oauth Clients  Client Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/approve":{"post":{"tags":["oauth"],"summary":"Approve","description":"The signed-in user clicked Allow on the consent page. Issues the\nauthorization code and returns the exact URL to redirect the browser to.\nBrowser-session-only (get_jwt_user) — an API key must not grant grants.","operationId":"approve_oauth_approve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Approve Oauth Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/oauth/token":{"post":{"tags":["oauth"],"summary":"Token","description":"Exchanges an authorization code + PKCE verifier for an access token.\nForm-encoded per RFC 6749. The token is a freshly minted fsk_ API key —\nshown on the account page like any other key, revocable there too.","operationId":"token_oauth_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["oauth"],"summary":"Authorization Server Metadata","operationId":"authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Authorization Server Metadata  Well Known Oauth Authorization Server Get"}}}}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"tags":["oauth"],"summary":"Protected Resource Metadata","operationId":"protected_resource_metadata__well_known_oauth_protected_resource_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Protected Resource Metadata  Well Known Oauth Protected Resource Mcp Get"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["oauth"],"summary":"Protected Resource Metadata","operationId":"protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Protected Resource Metadata  Well Known Oauth Protected Resource Get"}}}}}}},"/.well-known/glama.json":{"get":{"tags":["oauth"],"summary":"Glama Ownership","description":"Ownership proof for the Glama MCP directory listing (glama.ai/mcp/\nconnectors/com.framesail/framesail). The email must match the Glama\naccount that claims the listing; also served on framesail.com from the\nfrontend's public/ dir.","operationId":"glama_ownership__well_known_glama_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Glama Ownership  Well Known Glama Json Get"}}}}}}},"/.well-known/openai-apps-challenge":{"get":{"tags":["oauth"],"summary":"Openai Domain Verification","description":"Domain ownership proof for the OpenAI plugin directory listing\n(platform.openai.com/plugins). The body must be exactly the token the\nPlugins dashboard shows for this MCP hostname.","operationId":"openai_domain_verification__well_known_openai_apps_challenge_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/provider-keys/{provider}":{"put":{"tags":["provider-keys"],"summary":"Put Provider Key","operationId":"put_provider_key_provider_keys__provider__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutProviderKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["provider-keys"],"summary":"Delete Provider Key","operationId":"delete_provider_key_provider_keys__provider__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/provider-keys":{"get":{"tags":["provider-keys"],"summary":"List Provider Keys","operationId":"list_provider_keys_provider_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProviderKeyResponse"},"type":"array","title":"Response List Provider Keys Provider Keys Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/custom-voices":{"get":{"tags":["custom-voices"],"summary":"Get Custom Voice","operationId":"get_custom_voice_custom_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomVoiceSlotResponse"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["custom-voices"],"summary":"Remove Custom Voice","operationId":"remove_custom_voice_custom_voices_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/custom-voices/clone":{"post":{"tags":["custom-voices"],"summary":"Clone Custom Voice","description":"Clone an uploaded sample. `consent` is the user's confirmation that the\nvoice is theirs or they have the right to clone it (ElevenLabs terms).","operationId":"clone_custom_voice_custom_voices_clone_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_clone_custom_voice_custom_voices_clone_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomVoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/custom-voices/shared":{"post":{"tags":["custom-voices"],"summary":"Add Shared Custom Voice","description":"Add a Professional Voice Clone from an ElevenLabs share link.","operationId":"add_shared_custom_voice_custom_voices_shared_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSharedVoiceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomVoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/assets":{"get":{"tags":["assets"],"summary":"List Assets Endpoint","operationId":"list_assets_endpoint_assets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}},{"name":"asset_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},{"name":"parent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssetResponse"},"title":"Response List Assets Endpoint Assets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["assets"],"summary":"Create Asset Endpoint","operationId":"create_asset_endpoint_assets_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssetBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/{asset_id}":{"get":{"tags":["assets"],"summary":"Get Asset Endpoint","operationId":"get_asset_endpoint_assets__asset_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["assets"],"summary":"Update Asset Endpoint","operationId":"update_asset_endpoint_assets__asset_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["assets"],"summary":"Delete Asset Endpoint","operationId":"delete_asset_endpoint_assets__asset_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/{asset_id}/reference":{"post":{"tags":["assets"],"summary":"Upload Reference Endpoint","operationId":"upload_reference_endpoint_assets__asset_id__reference_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_reference_endpoint_assets__asset_id__reference_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assets/{asset_id}/voice":{"patch":{"tags":["assets"],"summary":"Set Voice Endpoint","operationId":"set_voice_endpoint_assets__asset_id__voice_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetVoiceBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/voice":{"patch":{"tags":["assets"],"summary":"Update Voice Settings Endpoint","operationId":"update_voice_settings_endpoint_projects__project_id__voice_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettingsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Voice Settings Endpoint Projects  Project Id  Voice Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scenes/{scene_id}/assets/{asset_id}":{"post":{"tags":["assets"],"summary":"Add Scene Asset Endpoint","operationId":"add_scene_asset_endpoint_scenes__scene_id__assets__asset_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scene_id","in":"path","required":true,"schema":{"type":"string","title":"Scene Id"}},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["assets"],"summary":"Remove Scene Asset Endpoint","operationId":"remove_scene_asset_endpoint_scenes__scene_id__assets__asset_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scene_id","in":"path","required":true,"schema":{"type":"string","title":"Scene Id"}},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/styles":{"get":{"tags":["styles"],"summary":"List Styles Endpoint","operationId":"list_styles_endpoint_styles_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StyleResponse"},"title":"Response List Styles Endpoint Styles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["styles"],"summary":"Create Style Endpoint","operationId":"create_style_endpoint_styles_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_style_endpoint_styles_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/style-presets":{"get":{"tags":["styles"],"summary":"Style Presets Endpoint","description":"Static preset catalog for the no-AI style creation path. Grouped by\naxis (art_style / narrative_style / director_style); full field values\nare included so the picker can preview exactly what it writes.","operationId":"style_presets_endpoint_style_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Style Presets Endpoint Style Presets Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/styles/{style_id}":{"get":{"tags":["styles"],"summary":"Get Style Endpoint","operationId":"get_style_endpoint_styles__style_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"style_id","in":"path","required":true,"schema":{"type":"string","title":"Style Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["styles"],"summary":"Update Style Endpoint","operationId":"update_style_endpoint_styles__style_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"style_id","in":"path","required":true,"schema":{"type":"string","title":"Style Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_style_endpoint_styles__style_id__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["styles"],"summary":"Delete Style Endpoint","operationId":"delete_style_endpoint_styles__style_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"style_id","in":"path","required":true,"schema":{"type":"string","title":"Style Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/styles/{style_id}/analyze":{"post":{"tags":["styles"],"summary":"Analyze Style Endpoint","operationId":"analyze_style_endpoint_styles__style_id__analyze_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"style_id","in":"path","required":true,"schema":{"type":"string","title":"Style Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeStyleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/styles/{style_id}/upload-template":{"post":{"tags":["styles"],"summary":"Upload Template Endpoint","operationId":"upload_template_endpoint_styles__style_id__upload_template_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"style_id","in":"path","required":true,"schema":{"type":"string","title":"Style Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_template_endpoint_styles__style_id__upload_template_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/styles/{style_id}/template/{template_type}":{"delete":{"tags":["styles"],"summary":"Clear Template Endpoint","operationId":"clear_template_endpoint_styles__style_id__template__template_type__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_type","in":"path","required":true,"schema":{"type":"string","title":"Template Type"}},{"name":"style_id","in":"path","required":true,"schema":{"type":"string","title":"Style Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/export":{"post":{"tags":["export"],"summary":"Export Video","description":"Queue a Remotion Lambda render for the project.\n\nReturns {job_id} immediately; the worker polls Lambda for completion and\nwrites the resulting MP4 URL to projects.last_export_url, which the\nfrontend reads via the job watcher / project query.","operationId":"export_video_projects__project_id__export_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Video Projects  Project Id  Export Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/export/download-url":{"get":{"tags":["export"],"summary":"Get Export Download Url","description":"The project's last export. Exports live on B2 with a\nContent-Disposition: attachment header baked onto the object by the\nrender, so the public URL downloads instead of playing inline (a\ncross-origin `download` attr is ignored).","operationId":"get_export_download_url_projects__project_id__export_download_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Export Download Url Projects  Project Id  Export Download Url Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/thumbnails":{"get":{"tags":["thumbnails"],"summary":"List Thumbnails","operationId":"list_thumbnails_projects__project_id__thumbnails_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/thumbnails/upload":{"post":{"tags":["thumbnails"],"summary":"Upload Thumbnail","operationId":"upload_thumbnail_projects__project_id__thumbnails_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_thumbnail_projects__project_id__thumbnails_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/thumbnails/select":{"post":{"tags":["thumbnails"],"summary":"Select Thumbnail","operationId":"select_thumbnail_projects__project_id__thumbnails_select_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectThumbnailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Select Thumbnail Projects  Project Id  Thumbnails Select Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/thumbnails/{thumbnail_id}/duplicate":{"post":{"tags":["thumbnails"],"summary":"Duplicate Thumbnail","operationId":"duplicate_thumbnail_projects__project_id__thumbnails__thumbnail_id__duplicate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"thumbnail_id","in":"path","required":true,"schema":{"type":"string","title":"Thumbnail Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/thumbnails/{thumbnail_id}":{"delete":{"tags":["thumbnails"],"summary":"Delete Thumbnail","operationId":"delete_thumbnail_projects__project_id__thumbnails__thumbnail_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"thumbnail_id","in":"path","required":true,"schema":{"type":"string","title":"Thumbnail Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/thumbnails/{thumbnail_id}/download":{"get":{"tags":["thumbnails"],"summary":"Download Thumbnail","operationId":"download_thumbnail_projects__project_id__thumbnails__thumbnail_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"thumbnail_id","in":"path","required":true,"schema":{"type":"string","title":"Thumbnail Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(png|jpg)$","default":"png","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/youtube/access":{"get":{"tags":["youtube"],"summary":"Get Youtube Access","description":"Whether this account can use YouTube publishing — the frontend renders\nnone of the feature when it can't.","operationId":"get_youtube_access_youtube_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeAccess"}}}}},"security":[{"HTTPBearer":[]}]}},"/channels/{channel_id}/youtube":{"get":{"tags":["youtube"],"summary":"Get Youtube Connection","operationId":"get_youtube_connection_channels__channel_id__youtube_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/YouTubeConnection"},{"type":"null"}],"title":"Response Get Youtube Connection Channels  Channel Id  Youtube Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["youtube"],"summary":"Disconnect Youtube","description":"Revoke the grant at Google, then delete it and everything stored\nthrough it (YouTube requires both when a user withdraws consent).","operationId":"disconnect_youtube_channels__channel_id__youtube_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/channels/{channel_id}/youtube/connect":{"post":{"tags":["youtube"],"summary":"Start Youtube Connect","operationId":"start_youtube_connect_channels__channel_id__youtube_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectUrl"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/youtube/connect/complete":{"post":{"tags":["youtube"],"summary":"Complete Youtube Connect","operationId":"complete_youtube_connect_youtube_connect_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/channels/{channel_id}/youtube/analytics":{"get":{"tags":["youtube"],"summary":"Get Channel Analytics","operationId":"get_channel_analytics_channels__channel_id__youtube_analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}},{"name":"days","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AnalyticsPeriod","default":28}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/youtube/publish":{"post":{"tags":["youtube"],"summary":"Publish To Youtube","description":"Queue the upload of the project's last export. Returns {job_id}; the\nworker publishes upload progress on that job and writes the publication\nwhen YouTube has created the video.","operationId":"publish_to_youtube_projects__project_id__youtube_publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Publish To Youtube Projects  Project Id  Youtube Publish Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/youtube/publications":{"get":{"tags":["youtube"],"summary":"List Publications","operationId":"list_publications_projects__project_id__youtube_publications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/YouTubePublication"},"title":"Response List Publications Projects  Project Id  Youtube Publications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/youtube/publications/{publication_id}/analytics":{"get":{"tags":["youtube"],"summary":"Get Publication Analytics","operationId":"get_publication_analytics_projects__project_id__youtube_publications__publication_id__analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"publication_id","in":"path","required":true,"schema":{"type":"string","title":"Publication Id"}},{"name":"days","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AnalyticsPeriod","default":28}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audio-library":{"get":{"tags":["audio-library"],"summary":"List Library Tracks","description":"Browse the audio library. Always scoped to global tracks + the caller's own private uploads.","operationId":"list_library_tracks_audio_library_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"enum":["all","mine","global"],"type":"string","default":"all","title":"Scope"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"mood","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood"}},{"name":"genre","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AudioLibraryTrack"},"title":"Response List Library Tracks Audio Library Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["audio-library"],"summary":"Create Library Track","description":"Admin: upload a new global library track (user_id stays NULL).","operationId":"create_library_track_audio_library_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_library_track_audio_library_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioLibraryTrack"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audio-library/{track_id}":{"delete":{"tags":["audio-library"],"summary":"Delete Library Track","description":"Admin: delete any library track (global or otherwise).","operationId":"delete_library_track_audio_library__track_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"track_id","in":"path","required":true,"schema":{"type":"string","title":"Track Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audio-library/private":{"post":{"tags":["audio-library"],"summary":"Create Private Track","description":"Upload a private audio track owned by the caller.","operationId":"create_private_track_audio_library_private_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_private_track_audio_library_private_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioLibraryTrack"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/audio-library/private/{track_id}":{"delete":{"tags":["audio-library"],"summary":"Delete Private Track","description":"Delete one of the caller's private tracks. 403s if the track isn't theirs.","operationId":"delete_private_track_audio_library_private__track_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"track_id","in":"path","required":true,"schema":{"type":"string","title":"Track Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/script":{"get":{"tags":["script"],"summary":"Get Script Endpoint","description":"Read the project's active script (plain text) + its version list.\n\nExists primarily for headless/agent clients (the web frontend reads\nscripts via the Supabase client under RLS) — e.g. an agent showing the\ngenerated script to its user for review before scanning.","operationId":"get_script_endpoint_script_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Script Endpoint Script Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/script/activate":{"post":{"tags":["script"],"summary":"Activate Script Version Endpoint","description":"Make this script version the project's active one (deactivates the rest).","operationId":"activate_script_version_endpoint_script_activate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateScriptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Activate Script Version Endpoint Script Activate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/script/save":{"post":{"tags":["script"],"summary":"Save Script Endpoint","operationId":"save_script_endpoint_script_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveScriptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveScriptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/script/revise":{"post":{"tags":["script"],"summary":"Revise Script Endpoint","operationId":"revise_script_endpoint_script_revise_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseScriptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseScriptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/segments":{"get":{"tags":["segments"],"summary":"List Segments Endpoint","operationId":"list_segments_endpoint_segments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Segments Endpoint Segments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/statuses":{"get":{"tags":["segments"],"summary":"List Segment Statuses Endpoint","description":"Lightweight per-asset status feed for poll-based UIs.","operationId":"list_segment_statuses_endpoint_segments_statuses_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Segment Statuses Endpoint Segments Statuses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/resolve":{"get":{"tags":["segments"],"summary":"Resolve Segment Endpoint","description":"Resolve a 1-based segment number to the full segment row + assets —\nthe server-side home of number→UUID resolution (numbers are the handle\nagent surfaces speak; they stay correct across splits/combines).","operationId":"resolve_segment_endpoint_segments_resolve_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"segment_number","in":"query","required":true,"schema":{"type":"integer","title":"Segment Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resolve Segment Endpoint Segments Resolve Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}":{"patch":{"tags":["segments"],"summary":"Update Segment Endpoint","operationId":"update_segment_endpoint_segments__segment_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Updates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Segment Endpoint Segments  Segment Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/assets":{"get":{"tags":["segments"],"summary":"List Segment Assets Endpoint","description":"List all segment assets for a segment.","operationId":"list_segment_assets_endpoint_segments__segment_id__assets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Segment Assets Endpoint Segments  Segment Id  Assets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/assets/{asset_id}":{"patch":{"tags":["segments"],"summary":"Update Segment Asset Endpoint","description":"Update a segment asset's config, name, or sort_order.\n\n`config` is MERGED at the top level, never replaced: send only the keys\nyou are changing (e.g. {\"description\": ...}) — the rest of the config\n(source, media_result, placement, …) is untouched. Pass a key as null to\ndelete it.","operationId":"update_segment_asset_endpoint_segments__segment_id__assets__asset_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSegmentAssetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Segment Asset Endpoint Segments  Segment Id  Assets  Asset Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["segments"],"summary":"Delete Segment Asset Endpoint","description":"Remove a removable asset (sfx / ui_element) and drop its scene layer(s).\n\nDeleting only the derived layers would resurrect them on the next scene\nrebuild, so removal happens at the asset. Frame/clip/voiceover assets are\nstructural and must not be deletable this way.","operationId":"delete_segment_asset_endpoint_segments__segment_id__assets__asset_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/assets/{asset_id}/continues-from":{"post":{"tags":["segments"],"summary":"Set Continues From Endpoint","description":"Link a scene image to an earlier scene it continues from (or clear it).\n\nWhen set, the source scene's rendered image is passed as the primary\nreference at generation time. `source_asset_id: null` clears the link.","operationId":"set_continues_from_endpoint_segments__segment_id__assets__asset_id__continues_from_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetContinuesFromRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Continues From Endpoint Segments  Segment Id  Assets  Asset Id  Continues From Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/continues-from":{"post":{"tags":["segments"],"summary":"Set Segment Continues From Endpoint","description":"Segment-scoped continuation: link this segment's frame to the frame of\nan earlier segment by its 1-based number (`source_segment_number: null`\nclears the link). Both primaries resolve server-side.","operationId":"set_segment_continues_from_endpoint_segments__segment_id__continues_from_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSegmentContinuesFromRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Segment Continues From Endpoint Segments  Segment Id  Continues From Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/generate-all":{"post":{"tags":["segments"],"summary":"Generate Segment Assets Endpoint","description":"Generate a project's segment assets — images, clips, overlays and\nfetched B-roll / real photos.\n\nWith no targets it fills gaps: every asset not yet generated (or stale,\nor failed) and not already generating, within `asset_scope`, outside\nsegments being rewritten. Named targets — `assets` (segment asset ids,\neach with optional model / settings / editable_sections, saved to the\nasset's prompt editor) or `segment_numbers` — run exactly those,\nre-rendering finished ones. A real photo placed over a segment's image\nre-fetches only when its asset id is named.\n`dry_run` returns the count and credit estimate without queueing.","operationId":"generate_segment_assets_endpoint_segments_generate_all_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSegmentAssetsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSegmentAssetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/segments/{segment_id}/assets/{asset_id}/rollback":{"post":{"tags":["segments"],"summary":"Rollback Segment Asset Endpoint","description":"Restore an archived render from the asset's config.history.\n\n`index` picks the entry (0 = most recent). The current render is archived\nin its place, so a rollback is itself reversible. Dependents restale\n(rolling a frame back marks its clip out of date).","operationId":"rollback_segment_asset_endpoint_segments__segment_id__assets__asset_id__rollback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackAssetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rollback Segment Asset Endpoint Segments  Segment Id  Assets  Asset Id  Rollback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/assets/{asset_id}/upload-image":{"post":{"tags":["segments"],"summary":"Upload Segment Asset Image Endpoint","description":"Upload a user-supplied image for a segment image asset (skips AI generation).","operationId":"upload_segment_asset_image_endpoint_segments__segment_id__assets__asset_id__upload_image_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_segment_asset_image_endpoint_segments__segment_id__assets__asset_id__upload_image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Segment Asset Image Endpoint Segments  Segment Id  Assets  Asset Id  Upload Image Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/assets/{asset_id}/assign-library":{"post":{"tags":["segments"],"summary":"Assign Library Track Endpoint","description":"Assign a library track to a segment asset (replaces AI generation).","operationId":"assign_library_track_endpoint_segments__segment_id__assets__asset_id__assign_library_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}},{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignLibraryTrackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Assign Library Track Endpoint Segments  Segment Id  Assets  Asset Id  Assign Library Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/sfx":{"post":{"tags":["segments"],"summary":"Add Segment Sfx Endpoint","description":"Manually add a new SFX asset to a segment from the audio library.\n\nUnlike `assign-library` (which fills an existing, storyboard-generated SFX\nslot), this creates a brand-new `sfx` segment_asset assigned to the chosen\ntrack and appends a matching audio layer to the scene so it flows through to\nthe editor without a scene rebuild.","operationId":"add_segment_sfx_endpoint_segments__segment_id__sfx_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignLibraryTrackRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Segment Sfx Endpoint Segments  Segment Id  Sfx Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/split":{"post":{"tags":["segments"],"summary":"Split Segment Endpoint","description":"Split a segment into 2-4 parts at given time offsets.","operationId":"split_segment_endpoint_segments__segment_id__split_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitSegmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/combine":{"post":{"tags":["segments"],"summary":"Combine Segment Endpoint","description":"Combine this segment with an adjacent segment.","operationId":"combine_segment_endpoint_segments__segment_id__combine_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CombineSegmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/animate":{"post":{"tags":["segments"],"summary":"Animate Segment Endpoint","description":"Animate this segment in one click: flip it to a generated video shot\n(keeping the rendered frame as the clip's first frame) and start the clip.\nA refused generation (402/409/…) rolls the flip back.","operationId":"animate_segment_endpoint_segments__segment_id__animate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnimateSegmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnimateSegmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/change-type":{"post":{"tags":["segments"],"summary":"Change Segment Type Endpoint","description":"Change a segment's shot kind: visual type, media source and/or\ntalking-head (lip_sync) flag.","operationId":"change_segment_type_endpoint_segments__segment_id__change_type_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeSegmentTypeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/update-content":{"post":{"tags":["segments"],"summary":"Update Segment Content Endpoint","description":"Rewrite a segment's creative direction based on user feedback.","operationId":"update_segment_content_endpoint_segments__segment_id__update_content_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSegmentContentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/segments/{segment_id}/update-prompts":{"post":{"tags":["segments"],"summary":"Update Segment Prompts Endpoint","description":"Directly set a segment's final prompts verbatim — no LLM rewrite.","operationId":"update_segment_prompts_endpoint_segments__segment_id__update_prompts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSegmentPromptsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentOperationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scenes/build":{"post":{"tags":["scenes"],"summary":"Build Scenes Endpoint","description":"Build/rebuild scenes from segments for a project.","operationId":"build_scenes_endpoint_scenes_build_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildScenesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildScenesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/scenes/editor-data":{"get":{"tags":["scenes"],"summary":"Editor Data Endpoint","description":"Return full ProjectData for the Remotion editor.","operationId":"editor_data_endpoint_scenes_editor_data_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Editor Data Endpoint Scenes Editor Data Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scenes":{"get":{"tags":["scenes"],"summary":"List Scenes Endpoint","description":"List all scenes for a project.","operationId":"list_scenes_endpoint_scenes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Scenes Endpoint Scenes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scenes/resolve":{"get":{"tags":["scenes"],"summary":"Resolve Scene Endpoint","description":"Resolve a 1-based segment number to its scene row.","operationId":"resolve_scene_endpoint_scenes_resolve_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"segment_number","in":"query","required":true,"schema":{"type":"integer","title":"Segment Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resolve Scene Endpoint Scenes Resolve Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scenes/{scene_id}":{"patch":{"tags":["scenes"],"summary":"Update Scene Endpoint","description":"Save the user's edits and added layers on a scene.","operationId":"update_scene_endpoint_scenes__scene_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scene_id","in":"path","required":true,"schema":{"type":"string","title":"Scene Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSceneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Scene Endpoint Scenes  Scene Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scenes/{scene_id}/upload-layer-image":{"post":{"tags":["scenes"],"summary":"Upload Layer Image Endpoint","description":"Upload a user-supplied image for an editor-added image layer.","operationId":"upload_layer_image_endpoint_scenes__scene_id__upload_layer_image_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scene_id","in":"path","required":true,"schema":{"type":"string","title":"Scene Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_layer_image_endpoint_scenes__scene_id__upload_layer_image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Layer Image Endpoint Scenes  Scene Id  Upload Layer Image Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/director-chat/message":{"post":{"tags":["director-chat"],"summary":"Director Chat Endpoint","description":"Process a natural-language director chat message and return scene mutations.","operationId":"director_chat_endpoint_director_chat_message_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/director-chat/project":{"post":{"tags":["director-chat"],"summary":"Project Director Chat Endpoint","description":"Apply a project-wide director note.\n\nA routing pass over the lightweight scene index picks the scenes the note\napplies to and writes one self-contained instruction per scene; each then\nruns through the scene-level director chat. Synchronous — expect a few\nseconds per routed scene.","operationId":"project_director_chat_endpoint_director_chat_project_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDirectorChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDirectorChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/guide/message":{"post":{"tags":["guide"],"summary":"Guide Message Endpoint","description":"One turn of the in-app guide: answers where the user is and what a\nstep does, from the live pipeline state and the MCP server's read-only\ntools, called as the user. The thread is kept server-side.\nSynchronous — a few seconds. 429 once the user is past the rate limit or\nthe day's spend cap.","operationId":"guide_message_endpoint_guide_message_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuideMessageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuideMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/guide/messages":{"get":{"tags":["guide"],"summary":"Guide Messages Endpoint","description":"The user's thread, oldest first — what the panel hydrates from. Rows\nare the user's own: the thread is keyed by user_id.","operationId":"guide_messages_endpoint_guide_messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GuideThreadMessage"},"title":"Response Guide Messages Endpoint Guide Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/guide/messages/{message_id}/rating":{"put":{"tags":["guide"],"summary":"Guide Rating Endpoint","description":"The user's thumbs up or down on one of the guide's messages in their\nown thread; null takes it back. Kept on the message row for review.","operationId":"guide_rating_endpoint_guide_messages__message_id__rating_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuideRatingRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/guide/clear":{"post":{"tags":["guide"],"summary":"Guide Clear Endpoint","description":"Clear the user's chat: their thread starts empty again. The messages\nare hidden, not deleted, and first-run messages already sent do not come\nback.","operationId":"guide_clear_endpoint_guide_clear_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/guide/state":{"get":{"tags":["guide"],"summary":"Guide State Endpoint","description":"Whether the user is still on their first run ('new') — the app asks for\nfirst-run messages only while they are.","operationId":"guide_state_endpoint_guide_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuideState"}}}}},"security":[{"HTTPBearer":[]}]}},"/guide/nudge":{"post":{"tags":["guide"],"summary":"Guide Nudge Endpoint","description":"Send the first-run message due for the place the user is in and return\nit; null when nothing is due. The app calls this on every page a new user\nopens in a channel or a project. Ownership of either is checked; outside\nboth there are no first-run messages.","operationId":"guide_nudge_endpoint_guide_nudge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuideNudgeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GuideThreadMessage"},{"type":"null"}],"title":"Response Guide Nudge Endpoint Guide Nudge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/guide/preset":{"post":{"tags":["guide"],"summary":"Guide Preset Endpoint","description":"Answer a chip with its preset message: the chip joins the thread as\nthe user's turn and the preset as the reply, which is returned. Ownership\nof the channel or project is checked.","operationId":"guide_preset_endpoint_guide_preset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidePresetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuideThreadMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/guide/restart":{"post":{"tags":["guide"],"summary":"Guide Restart Endpoint","description":"Put the caller's own account back on its first run: the thread is\ndeleted and the guide level is 'new' again, so the first-run messages are\nsent afresh. Admin-only — it exists to test the first run without a new\naccount.","operationId":"guide_restart_endpoint_guide_restart_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"Create an embedded Stripe Checkout Session for a new subscription.","operationId":"create_checkout_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/topup":{"post":{"tags":["billing"],"summary":"Create Topup","description":"Create an embedded Stripe Checkout Session for a one-time credit pack purchase.","operationId":"create_topup_billing_topup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUpRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/portal":{"post":{"tags":["billing"],"summary":"Create Portal","description":"Create a Stripe Billing Portal session — the single manage flow for\nplan changes, cancellations, payment-method updates, and invoice history.\n\nWith req.plan_id, the session opens on that plan's confirm-upgrade screen\n(amount due today + Confirm) instead of the portal home.","operationId":"create_portal_billing_portal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/resume":{"post":{"tags":["billing"],"summary":"Resume","description":"Undo a scheduled cancellation — the \"Keep my subscription\" button.\n\nThe one manage action that can't be a portal deep link: Stripe's\nflow_data has no renew flow, so the portal could only drop the user on its\nhomepage to hunt for \"Don't cancel subscription\". See resume_subscription.","operationId":"resume_billing_resume_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Receive and verify Stripe webhook events.\n\nStripe signs every request with the webhook secret. We verify the signature\nbefore processing to prevent spoofed events.","operationId":"stripe_webhook_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stripe Webhook Billing Webhook Post"}}}}}}},"/email/webhook/signup":{"post":{"tags":["email"],"summary":"Signup Webhook","description":"Supabase users-INSERT webhook → enqueue the lifecycle emails.","operationId":"signup_webhook_email_webhook_signup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup Webhook Email Webhook Signup Post"}}}}}}},"/email/welcome":{"post":{"tags":["email"],"summary":"Send Welcome","description":"Enqueue the welcome email now that the user has a confirmed session.\n\nCalled by the frontend auth routes at the confirmation moment. The JWT proves\na real session — which for email-password signups can only exist post-confirm\n— so reaching here means the user is verified. Short-circuits if the welcome\nhas already gone out, so OAuth users hitting this on every login don't pile up\nno-op jobs.","operationId":"send_welcome_email_welcome_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Send Welcome Email Welcome Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/email/unsubscribe":{"get":{"tags":["email"],"summary":"Unsubscribe Confirm","description":"Confirmation page. Does NOT mutate — a button POSTs to actually unsubscribe.","operationId":"unsubscribe_confirm_email_unsubscribe_get","parameters":[{"name":"u","in":"query","required":false,"schema":{"type":"string","default":"","title":"U"}},{"name":"t","in":"query","required":false,"schema":{"type":"string","default":"","title":"T"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["email"],"summary":"Unsubscribe Apply","description":"One-click unsubscribe (also the RFC 8058 List-Unsubscribe-Post target).","operationId":"unsubscribe_apply_email_unsubscribe_post","parameters":[{"name":"u","in":"query","required":false,"schema":{"type":"string","default":"","title":"U"}},{"name":"t","in":"query","required":false,"schema":{"type":"string","default":"","title":"T"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/balance":{"get":{"tags":["credits"],"summary":"Get Credits Balance","description":"Returns the user's current credit balance, subscription details, and channel usage.","operationId":"get_credits_balance_credits_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/onboarding":{"post":{"tags":["onboarding"],"summary":"Complete Onboarding","description":"Records Terms acceptance and marketing consent for the current user.\n\nName is not written here — it's seeded at signup by the handle_new_auth_user\ntrigger from OAuth metadata (Google), or left null for email/password signups.","operationId":"complete_onboarding_onboarding_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/onboarding/setup":{"post":{"tags":["onboarding"],"summary":"Onboarding Setup","description":"First-run setup: create the user's channel + style from a YouTube link or\na preset, then kick off ONE free style analysis for the YouTube path.\n\nThis runs BEFORE the paywall. A brand-new user is inactive with zero\ncredits, so the analysis is queued billing-bypassed (charge_credits=False —\nthe same path BYOK uses) and we eat its few-cent cost. Channel creation is\nallowed for inactive users by the loosened limit trigger (migration 0146);\neverything else (generation) stays gated behind an active plan.\n\nIdempotent for resume/retry: reuses the user's existing onboarding channel\n(the free plan caps them at one) and only re-queues analysis when the style\nhasn't been analysed yet.\n\nAn ACTIVE subscriber can run it too (the /app/onboarding?preview=1 walk-\nthrough): they get a fresh channel and a normally-billed analysis — exactly\nwhat the /styles flow would charge — so nothing here is free for a paying\naccount, and the resume logic (which assumes the single free-plan channel)\nis skipped for them.","operationId":"onboarding_setup_onboarding_setup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingSetupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/onboarding/registered":{"post":{"tags":["onboarding"],"summary":"Record Registration","description":"Send the Meta CompleteRegistration conversion for the caller's account.\n\nCalled by the frontend on a new account's first session\n(PostHogAuthBridge), next to the pixel's `sign_up` push. The browser call\nis the only sign-up moment that has the client's IP, user agent and Meta\ncookies — the users-INSERT webhook has none of them. event_id is the user\nid, matching the pixel push, so Meta keeps one of the pair.\n\nAuthenticated, so the account is the caller's own; accounts older than\nREGISTRATION_WINDOW are ignored, so replaying the call later can't count a\nsecond registration. Always 200 {\"received\": true}: the browser only needs\nto know it can stop reporting, and a conversion is best-effort — a DB or\nqueue hiccup is logged, never surfaced.","operationId":"record_registration_onboarding_registered_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaBrowserContext"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/pricing":{"get":{"tags":["pricing"],"summary":"Get Pricing","description":"Returns pre-computed operation costs. Cached aggressively client-side.","operationId":"get_pricing_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/music-tracks":{"get":{"tags":["music-tracks"],"summary":"List Music Tracks","description":"List all music tracks for a project.","operationId":"list_music_tracks_music_tracks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Music Tracks Music Tracks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["music-tracks"],"summary":"Add Music Track","description":"Add a music track to a project from the library.","operationId":"add_music_track_music_tracks_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMusicTrackRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Music Track Music Tracks Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/music-tracks/{track_id}":{"patch":{"tags":["music-tracks"],"summary":"Update Music Track","description":"Update a music track (volume, loop, position, etc.).","operationId":"update_music_track_music_tracks__track_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"track_id","in":"path","required":true,"schema":{"type":"string","title":"Track Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMusicTrackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Music Track Music Tracks  Track Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["music-tracks"],"summary":"Delete Music Track","description":"Remove a music track from the project.","operationId":"delete_music_track_music_tracks__track_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"track_id","in":"path","required":true,"schema":{"type":"string","title":"Track Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voiceover/{project_id}/blocks":{"get":{"tags":["voiceover"],"summary":"List Voice Blocks","description":"Return all voice blocks for the project's active script.","operationId":"list_voice_blocks_voiceover__project_id__blocks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceBlocksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voiceover/blocks/{block_id}":{"patch":{"tags":["voiceover"],"summary":"Update Voice Block","description":"Set a voice block's playback volume. A block speaks in its speaker's\nvoice (narrator or character), so volume is its only editable field.","operationId":"update_voice_block_voiceover_blocks__block_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVoiceBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceBlockRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voiceover/{project_id}/timeline":{"get":{"tags":["voiceover"],"summary":"Get Narration Timeline","description":"Return the assembled narration timeline with cumulative timestamps.","operationId":"get_narration_timeline_voiceover__project_id__timeline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NarrationTimelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/channels":{"get":{"tags":["projects"],"summary":"List Channels","description":"Channels owned by the caller — agents start here to pick a channel_id.","operationId":"list_channels_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Channels Channels Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["projects"],"summary":"Create Channel","description":"Create a channel — the agent counterpart of the web frontend's direct\nSupabase insert (lib/query/channels.ts).","operationId":"create_channel_channels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChannelRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Channel Channels Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/projects":{"get":{"tags":["projects"],"summary":"List Projects","operationId":"list_projects_projects_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Projects Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["projects"],"summary":"Create Project","operationId":"create_project_projects_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Project Projects Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/channels/{channel_id}/progress":{"get":{"tags":["projects"],"summary":"Get Channel Progress","description":"Per-project step completion for every project in a channel, keyed by\nproject id. Drives the channel page's per-video progress bars in one call\ninstead of a pipeline fetch per row.","operationId":"get_channel_progress_channels__channel_id__progress_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"boolean"}},"title":"Response Get Channel Progress Channels  Channel Id  Progress Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/channels/{channel_id}/thumbnails":{"get":{"tags":["projects"],"summary":"Get Channel Thumbnails","description":"The active thumbnail's URL for every project in a channel that has\none, keyed by project id. Drives the channel page's video list.","operationId":"get_channel_thumbnails_channels__channel_id__thumbnails_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Channel Thumbnails Channels  Channel Id  Thumbnails Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Get Project","operationId":"get_project_projects__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Project Projects  Project Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["projects"],"summary":"Update Project","operationId":"update_project_projects__project_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Project Projects  Project Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Delete Project","operationId":"delete_project_projects__project_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/pipeline":{"get":{"tags":["projects"],"summary":"Get Pipeline Progress","description":"Agent-facing pipeline progress: per-step state plus a suggested next\naction. Lets a headless client resume a half-finished project (or check on\none) with a single call instead of inferring state from five endpoints. The\nderivation is shared with the generation step-ordering gate (db/pipeline).","operationId":"get_pipeline_progress_projects__project_id__pipeline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Pipeline Progress Projects  Project Id  Pipeline Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/caption-config":{"patch":{"tags":["projects"],"summary":"Update Caption Config","description":"Merge a caption_config patch into projects.caption_config.\n\nCaptions themselves are project-level and derived from voice_blocks at\nread time (get_editor_data). This endpoint only writes the style/enabled\nconfig; render-time application happens entirely on the frontend.","operationId":"update_caption_config_projects__project_id__caption_config_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Caption Config Projects  Project Id  Caption Config Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/status":{"get":{"tags":["jobs"],"summary":"Get Jobs Status","operationId":"get_jobs_status_jobs_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},{"name":"style_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style Id"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobsStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/{job}/template":{"get":{"tags":["jobs"],"summary":"Get Job Template","operationId":"get_job_template_jobs__job__template_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job","in":"path","required":true,"schema":{"type":"string","title":"Job"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/jobs/sections":{"get":{"tags":["jobs"],"summary":"Get All Job Sections","description":"Aggregate of every targetable section across every section-model job.\n\nPowers the style builder's `applies_to` picker (Slice 3): a user-defined\noptional style field can target any non-locked section identified by its\nfully-qualified `<job>.<section_id>`. Locked sections are excluded —\nusers cannot append content into a locked section by design.","operationId":"get_all_job_sections_jobs_sections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSectionsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/models":{"get":{"tags":["models"],"summary":"Get Models","operationId":"get_models_models_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job","in":"query","required":true,"schema":{"type":"string","title":"Job"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"lip_sync","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"segment_video only: true lists lip-sync models, false the prompt-driven ones. Omit for the whole list.","title":"Lip Sync"},"description":"segment_video only: true lists lip-sync models, false the prompt-driven ones. Omit for the whole list."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/model-defaults":{"get":{"tags":["model-defaults"],"summary":"List Model Defaults","operationId":"list_model_defaults_model_defaults_get","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDefaultsResponse"}}}}}},"put":{"tags":["model-defaults"],"summary":"Put Model Default","operationId":"put_model_default_model_defaults_put","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutModelDefaultRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDefaultRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["model-defaults"],"summary":"Delete Model Default","operationId":"delete_model_default_model_defaults_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_type","in":"query","required":true,"schema":{"type":"string","title":"Job Type"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"lip_sync","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lip Sync"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voices":{"get":{"tags":["voices"],"summary":"Get Voices","operationId":"get_voices_voices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"query","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/expert-config/":{"get":{"tags":["expert-config"],"summary":"List Expert Configs","description":"Batch-fetch every expert_config under one scope (project XOR style).\nOne round trip per page; the frontend selects the right row per\n(job_type, asset_id|segment_asset_id|voice_block_id).","operationId":"list_expert_configs_expert_config__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"}},{"name":"style","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExpertConfigRow"},"title":"Response List Expert Configs Expert Config  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["expert-config"],"summary":"Delete Expert Config","operationId":"delete_expert_config_expert_config__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job","in":"query","required":true,"schema":{"type":"string","title":"Job"}},{"name":"project","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"}},{"name":"style","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style"}},{"name":"asset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Id"}},{"name":"segment_asset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment Asset Id"}},{"name":"voice_block_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Block Id"}},{"name":"section_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sections/value":{"put":{"tags":["sections"],"summary":"Persist Section Value","description":"Persist an entity-backed section's edited value to its subject row.","operationId":"persist_section_value_sections_value_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistSectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Persist Section Value Sections Value Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/segment_video/estimate":{"post":{"tags":["generate"],"summary":"Estimate Segment Video","description":"Quote one video generation without queueing it.\n\nVideo is the only job whose price varies with its subject — the clip has to\ncover the segment's narration, and a 15s segment costs three times a 5s one.\nA flat per-model figure would leave the Generate button enabled on a job the\nserver then refuses, so the drawer gates on this instead. `credits` is\nexactly what queue_ai_job checks for the same (subject, model, settings).\n\nPure read: no ai_jobs row, no provider call, no credits touched.","operationId":"estimate_segment_video_generate_segment_video_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentVideoEstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentVideoEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/segment_video/animate_estimates":{"get":{"tags":["generate"],"summary":"Animate Estimates","description":"Duration-true quotes for animating each generated segment, both\nfamilies: prompt video (clip snaps to the model's duration enum) and\nvoice / lip-sync (renders and bills the exact segment length — a 12s\nsegment costs ~2.4× a 5s one there). Flat per-model blurbs mislead on\nlong segments, so the animate menu and the bulk sheet read this instead.\n\nPure read: no ai_jobs row, no provider call, no credits touched.","operationId":"animate_estimates_generate_segment_video_animate_estimates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnimateEstimatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/generate/script":{"post":{"tags":["generate"],"summary":"Generate Script Endpoint","operationId":"generate_script_endpoint_generate_script_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateScriptRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Script Endpoint Generate Script Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/storyboard":{"post":{"tags":["generate"],"summary":"Generate Storyboard Endpoint","operationId":"generate_storyboard_endpoint_generate_storyboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateStoryboardRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Storyboard Endpoint Generate Storyboard Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/script_scan":{"post":{"tags":["generate"],"summary":"Generate Script Scan Endpoint","operationId":"generate_script_scan_endpoint_generate_script_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateScriptScanRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Script Scan Endpoint Generate Script Scan Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/voice_block_scan":{"post":{"tags":["generate"],"summary":"Rescan Voice Blocks Endpoint","description":"Re-derive voice blocks from the active script. Assets (and their\nreference images) are left untouched — this is the non-destructive\nalternative to a full script_scan after a script edit.\n\nSynchronous: the cut is deterministic (generation/voice_blocks.py), so\nthere is no model to pick, no job to queue and nothing to bill.","operationId":"rescan_voice_blocks_endpoint_generate_voice_block_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescanVoiceBlocksRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Rescan Voice Blocks Endpoint Generate Voice Block Scan Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/art_style_character_template":{"post":{"tags":["generate"],"summary":"Generate Art Style Char Template Endpoint","operationId":"generate_art_style_char_template_endpoint_generate_art_style_character_template_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateArtStyleTemplateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Art Style Char Template Endpoint Generate Art Style Character Template Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/art_style_environment_template":{"post":{"tags":["generate"],"summary":"Generate Art Style Env Template Endpoint","operationId":"generate_art_style_env_template_endpoint_generate_art_style_environment_template_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateArtStyleTemplateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Art Style Env Template Endpoint Generate Art Style Environment Template Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/voice_block_batch":{"post":{"tags":["generate"],"summary":"Generate Voice Block Batch Endpoint","operationId":"generate_voice_block_batch_endpoint_generate_voice_block_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateVoiceBlockBatchRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Voice Block Batch Endpoint Generate Voice Block Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/asset_reference_batch":{"post":{"tags":["generate"],"summary":"Generate Asset Reference Batch Endpoint","description":"Reference images for a project's characters, environments and objects,\nbilled in aggregate and run by one orchestrator task.","operationId":"generate_asset_reference_batch_endpoint_generate_asset_reference_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAssetReferenceBatchRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Asset Reference Batch Endpoint Generate Asset Reference Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/thumbnail":{"post":{"tags":["generate"],"summary":"Generate Thumbnail Endpoint","operationId":"generate_thumbnail_endpoint_generate_thumbnail_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateThumbnailRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Thumbnail Endpoint Generate Thumbnail Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/thumbnail_cutout":{"post":{"tags":["generate"],"summary":"Generate Thumbnail Cutout Endpoint","operationId":"generate_thumbnail_cutout_endpoint_generate_thumbnail_cutout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateThumbnailCutoutRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Thumbnail Cutout Endpoint Generate Thumbnail Cutout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/generate/thumbnail_edit":{"post":{"tags":["generate"],"summary":"Generate Thumbnail Edit Endpoint","operationId":"generate_thumbnail_edit_endpoint_generate_thumbnail_edit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateThumbnailEditRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Thumbnail Edit Endpoint Generate Thumbnail Edit Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/finance/me":{"get":{"tags":["admin"],"summary":"Get Admin Status","description":"Whether the caller is an admin. Returns {is_admin: false} rather than 403\nso the frontend can branch on it without catching an error.","operationId":"get_admin_status_admin_finance_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStatus"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/finance/overview":{"get":{"tags":["admin"],"summary":"Get Overview","operationId":"get_overview_admin_finance_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start date (YYYY-MM-DD)","title":"Start"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end date (YYYY-MM-DD)","title":"End"},"description":"Inclusive end date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeadlineTotals"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/finance/by-provider":{"get":{"tags":["admin"],"summary":"Get By Provider","operationId":"get_by_provider_admin_finance_by_provider_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start date (YYYY-MM-DD)","title":"Start"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end date (YYYY-MM-DD)","title":"End"},"description":"Inclusive end date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderBreakdown"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/finance/by-model":{"get":{"tags":["admin"],"summary":"Get By Model","operationId":"get_by_model_admin_finance_by_model_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope to a single user's models","title":"User Id"},"description":"Scope to a single user's models"},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start date (YYYY-MM-DD)","title":"Start"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end date (YYYY-MM-DD)","title":"End"},"description":"Inclusive end date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelBreakdown"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/finance/by-user":{"get":{"tags":["admin"],"summary":"Get By User","operationId":"get_by_user_admin_finance_by_user_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"enum":["paid","inactive"],"type":"string"},{"type":"null"}],"title":"State"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start date (YYYY-MM-DD)","title":"Start"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end date (YYYY-MM-DD)","title":"End"},"description":"Inclusive end date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBreakdown"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/finance/timeseries":{"get":{"tags":["admin"],"summary":"Get Timeseries","operationId":"get_timeseries_admin_finance_timeseries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bucket","in":"query","required":false,"schema":{"enum":["day","week","month"],"type":"string","default":"day","title":"Bucket"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start date (YYYY-MM-DD)","title":"Start"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end date (YYYY-MM-DD)","title":"End"},"description":"Inclusive end date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timeseries"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/finance/credit-liability":{"get":{"tags":["admin"],"summary":"Get Credit Liability","description":"Credits granted / spent / expired per month, and what is still owed.\n\nThe monthly rows are a flow bounded by the selected window; the outstanding\ntotals are an all-time snapshot taken now (what we owe customers doesn't\ndepend on which dates happen to be on screen).","operationId":"get_credit_liability_admin_finance_credit_liability_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start date (YYYY-MM-DD)","title":"Start"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end date (YYYY-MM-DD)","title":"End"},"description":"Inclusive end date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditLiability"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/me":{"get":{"tags":["admin"],"summary":"Get Admin Status","description":"Whether the caller is an admin. Returns {is_admin: false} rather than 403\nso the frontend can branch on it without catching an error.","operationId":"get_admin_status_admin_affiliates_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStatus"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/affiliates":{"get":{"tags":["admin"],"summary":"List Affiliates","operationId":"list_affiliates_admin_affiliates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Affiliate"},"type":"array","title":"Response List Affiliates Admin Affiliates Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin"],"summary":"Create Affiliate","operationId":"create_affiliate_admin_affiliates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAffiliateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Affiliate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/affiliates/balances":{"get":{"tags":["admin"],"summary":"List Balances","description":"Live commission-ledger rollup for every affiliate: balances, cumulative\napproved revenue, Qualified Referrals, tier, chargeback count. Computed\nfrom ledger rows on every call — tier is never stored.","operationId":"list_balances_admin_affiliates_balances_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AffiliateBalance"},"type":"array","title":"Response List Balances Admin Affiliates Balances Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/affiliates/{affiliate_id}":{"patch":{"tags":["admin"],"summary":"Update Affiliate","operationId":"update_affiliate_admin_affiliates__affiliate_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAffiliateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Affiliate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Affiliate","operationId":"delete_affiliate_admin_affiliates__affiliate_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Affiliate Admin Affiliates  Affiliate Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/code":{"post":{"tags":["admin"],"summary":"Create Code","description":"Create the Stripe Coupon + Promotion Code for this affiliate. The admin\ncontrols every parameter (code string, percent/amount, duration, max\nredemptions, expiry).","operationId":"create_code_admin_affiliates__affiliate_id__code_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Affiliate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/code/deactivate":{"post":{"tags":["admin"],"summary":"Deactivate Code","operationId":"deactivate_code_admin_affiliates__affiliate_id__code_deactivate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Affiliate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/mark-paid":{"post":{"tags":["admin"],"summary":"Mark Paid","description":"Record a manual payout: flip every approved ledger row (commissions and\noffsetting adjustments) to paid. The transfer itself happens outside the\nsystem (PayPal/Wise). Refuses when the net approved balance is <= 0.","operationId":"mark_paid_admin_affiliates__affiliate_id__mark_paid_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkPaidResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/performance":{"get":{"tags":["admin"],"summary":"Get Performance","description":"Every affiliate's funnel over the window, plus the program roll-up.\n\nRows are returned only for affiliates that have a code — a CRM record we\nnever issued a code to has no funnel to report and would pad the table with\nzeroes. Ranked by commission earned in the window, so the people actually\nproducing sit at the top.","operationId":"get_performance_admin_affiliates_performance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start date (YYYY-MM-DD)","title":"Start"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end date (YYYY-MM-DD)","title":"End"},"description":"Inclusive end date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliatePerformanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/detail":{"get":{"tags":["admin"],"summary":"Get Detail","description":"One affiliate's board as they see it, plus the traffic behind it.\n\nThe money half is deliberately the same pair of calls the affiliate's own\nportal makes (balance_rollup + list_commissions), so the admin view and the\ncreator's view can never quietly disagree about what they are owed. The\ntraffic half is admin-only: the portal shows no click data at all\n(migration 0173).","operationId":"get_detail_admin_affiliates__affiliate_id__detail_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","title":"Affiliate Id"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive start date (YYYY-MM-DD)","title":"Start"},"description":"Inclusive start date (YYYY-MM-DD)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive end date (YYYY-MM-DD)","title":"End"},"description":"Inclusive end date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/projects/users":{"get":{"tags":["admin"],"summary":"Search Users","operationId":"search_users_admin_projects_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","description":"Email or name fragment (case-insensitive)","default":"","title":"Q"},"description":"Email or name fragment (case-insensitive)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserSearch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/projects/users/{user_id}":{"get":{"tags":["admin"],"summary":"Get User Detail","operationId":"get_user_detail_admin_projects_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/projects/{project_id}":{"get":{"tags":["admin"],"summary":"Get Project Snapshot","operationId":"get_project_snapshot_admin_projects__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProjectSnapshot"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/apply":{"post":{"tags":["affiliate"],"summary":"Submit Application","description":"Accept an affiliate-program application from the public /affiliates page.\n\nUnauthenticated by design — applicants are not Framesail users (same\nposture as /affiliate/login; the limiter keys anonymous callers by IP).\nThe application lands in mkt_leads with source='affiliate_application',\nshaped so the existing /admin/marketing/leads/{id}/promote flow carries it\nstraight into the affiliate CRM: contact=email, url=YouTube channel,\ntype=youtube_creator. The response never reveals whether the email is\nalready known or whether the honeypot tripped.","operationId":"submit_application_affiliate_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/click":{"post":{"tags":["affiliate"],"summary":"Record Click","description":"Count a visit that arrived through ?ref=CODE.\n\nUnauthenticated by design — the visitor is a stranger, and the ping fires\non arrival, long before anyone signs in (same posture as /affiliate/apply;\nthe limiter keys anonymous callers by IP).\n\nCounted server-side rather than read back out of PostHog because\nad-blockers eat posthog-js, and a number that decides who gets paid has to\nsurvive an affiliate comparing it against their own platform stats.\n\nAlways 200 {\"received\": true}: an unknown or deactivated code is a no-op,\nand saying so would turn this into a code oracle.","operationId":"record_click_affiliate_click_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/signup":{"post":{"tags":["affiliate"],"summary":"Record Signup","description":"Count the signed-in account as a signup through ?ref=CODE.\n\nCalled once by the frontend on a new account's first session, when its\nbrowser still holds a referral code (lib/affiliate-ref.ts). Authenticated,\nso the account is the caller's own; the service ignores accounts older\nthan a week, the affiliate's own account, and anything already recorded.\n\nVisibility only — this never affects commission (ToS 3.2). Always 200\n{\"received\": true}, for the same reason /affiliate/click is.","operationId":"record_signup_affiliate_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/affiliate/accept-terms":{"post":{"tags":["affiliate"],"summary":"Accept Terms","description":"Record acceptance of the Affiliate Program Terms (ToS 1).\n\nThe dashboard shows nothing until this has been called for the version\ncurrently in force, so this is the first thing an enrolled affiliate does.\nIdempotent: accepting again simply restamps the row.","operationId":"accept_terms_affiliate_accept_terms_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptTermsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/affiliate/stats":{"get":{"tags":["affiliate"],"summary":"Get Stats","operationId":"get_stats_affiliate_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateStats"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/marketing/campaigns":{"get":{"tags":["admin"],"summary":"List Campaigns","operationId":"list_campaigns_admin_marketing_campaigns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignList"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin"],"summary":"Create Campaign","operationId":"create_campaign_admin_marketing_campaigns_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/marketing/campaigns/{campaign_id}":{"patch":{"tags":["admin"],"summary":"Update Campaign","operationId":"update_campaign_admin_marketing_campaigns__campaign_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Campaign","operationId":"delete_campaign_admin_marketing_campaigns__campaign_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Campaign Admin Marketing Campaigns  Campaign Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/tasks":{"get":{"tags":["admin"],"summary":"List Tasks","operationId":"list_tasks_admin_marketing_tasks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"board","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Board"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"}},{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Task","operationId":"create_task_admin_marketing_tasks_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/tasks/{task_id}":{"patch":{"tags":["admin"],"summary":"Update Task","operationId":"update_task_admin_marketing_tasks__task_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Task","operationId":"delete_task_admin_marketing_tasks__task_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Task Admin Marketing Tasks  Task Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/media":{"post":{"tags":["admin"],"summary":"Upload Task Media","operationId":"upload_task_media_admin_marketing_media_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_task_media_admin_marketing_media_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/marketing/leads":{"get":{"tags":["admin"],"summary":"List Leads","operationId":"list_leads_admin_marketing_leads_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Lead","operationId":"create_lead_admin_marketing_leads_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/leads/{lead_id}":{"patch":{"tags":["admin"],"summary":"Update Lead","operationId":"update_lead_admin_marketing_leads__lead_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Lead","operationId":"delete_lead_admin_marketing_leads__lead_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Lead Admin Marketing Leads  Lead Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/leads/{lead_id}/promote":{"post":{"tags":["admin"],"summary":"Promote Lead","description":"Promote a lead into the affiliate CRM: create a billing.affiliates row\nfrom the lead's fields, then mark the lead won and link the affiliate id\ninto its metadata. Status lands on 'replied' — the post-outreach rung of the\naffiliate ladder ('redeemed'/'signed_up' are advanced by the Stripe\nwebhook, not by hand).","operationId":"promote_lead_admin_marketing_leads__lead_id__promote_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteLeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/emails":{"get":{"tags":["admin"],"summary":"Emails Overview","operationId":"emails_overview_admin_marketing_emails_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailsOverview"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/marketing/emails/{key}/test-send":{"post":{"tags":["admin"],"summary":"Send Test Email","description":"Render a template with sample data and send it to the requesting\nadmin's own address, subject-prefixed [TEST]. No ledger row, no\n*_sent_at stamp, no idempotency key — repeat tests must all deliver.","operationId":"send_test_email_admin_marketing_emails__key__test_send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTestSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/automations":{"get":{"tags":["admin"],"summary":"List Automations","operationId":"list_automations_admin_marketing_automations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationList"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/marketing/automations/{automation_id}":{"patch":{"tags":["admin"],"summary":"Update Automation","operationId":"update_automation_admin_marketing_automations__automation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/automations/{automation_id}/runs":{"get":{"tags":["admin"],"summary":"List Automation Runs","operationId":"list_automation_runs_admin_marketing_automations__automation_id__runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","title":"Automation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/sov":{"get":{"tags":["admin"],"summary":"Sov Results","operationId":"sov_results_admin_marketing_sov_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SovAdminResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/public/sov-index":{"get":{"tags":["public"],"summary":"Sov Index","operationId":"sov_index_public_sov_index_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SovIndexResponse"}}}}}}},"/health":{"get":{"tags":["system"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcceptTermsResponse":{"properties":{"received":{"type":"boolean","title":"Received","default":true}},"type":"object","title":"AcceptTermsResponse","description":"Acknowledges the acceptance just recorded on the affiliate's row\n(ToS 1). The dashboard refetches stats to see the gate lift, so nothing\nelse needs to travel back."},"ActivateScriptRequest":{"properties":{"script_id":{"type":"string","title":"Script Id"}},"type":"object","required":["script_id"],"title":"ActivateScriptRequest"},"AddMusicTrackRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"library_track_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library Track Id"},"name":{"type":"string","title":"Name","default":"Music"},"volume":{"type":"number","title":"Volume","default":0.12},"loop":{"type":"boolean","title":"Loop","default":true},"start_frame":{"type":"integer","title":"Start Frame","default":0}},"type":"object","required":["project_id"],"title":"AddMusicTrackRequest"},"AddSharedVoiceRequest":{"properties":{"name":{"type":"string","maxLength":40,"minLength":1,"title":"Name"},"share_link":{"type":"string","maxLength":500,"minLength":1,"title":"Share Link"}},"type":"object","required":["name","share_link"],"title":"AddSharedVoiceRequest"},"AdminChannelSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"project_count":{"type":"integer","title":"Project Count","default":0}},"type":"object","required":["id"],"title":"AdminChannelSummary"},"AdminJob":{"properties":{"id":{"type":"string","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"script_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script Id"},"segment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment Id"},"scene_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scene Id"},"asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Id"}},"type":"object","required":["id","job_type","status"],"title":"AdminJob"},"AdminMusicTrack":{"properties":{"id":{"type":"string","title":"Id"},"library_track_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library Track Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id"],"title":"AdminMusicTrack"},"AdminProjectSnapshot":{"properties":{"project":{"additionalProperties":true,"type":"object","title":"Project"},"owner":{"$ref":"#/components/schemas/AdminUserSummary"},"channel":{"anyOf":[{"$ref":"#/components/schemas/AdminChannelSummary"},{"type":"null"}]},"style":{"anyOf":[{"$ref":"#/components/schemas/AdminStyleRef"},{"type":"null"}]},"export_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Url"},"script":{"anyOf":[{"$ref":"#/components/schemas/AdminScript"},{"type":"null"}]},"script_versions":{"items":{"$ref":"#/components/schemas/AdminScriptVersion"},"type":"array","title":"Script Versions","default":[]},"voice_blocks":{"items":{"$ref":"#/components/schemas/AdminVoiceBlock"},"type":"array","title":"Voice Blocks","default":[]},"segments":{"items":{"$ref":"#/components/schemas/AdminSegment"},"type":"array","title":"Segments","default":[]},"scenes":{"items":{"$ref":"#/components/schemas/AdminScene"},"type":"array","title":"Scenes","default":[]},"music_tracks":{"items":{"$ref":"#/components/schemas/AdminMusicTrack"},"type":"array","title":"Music Tracks","default":[]},"jobs":{"items":{"$ref":"#/components/schemas/AdminJob"},"type":"array","title":"Jobs","default":[]}},"type":"object","required":["project","owner"],"title":"AdminProjectSnapshot"},"AdminProjectSummary":{"properties":{"id":{"type":"string","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"channel_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Name"},"video_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Format"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"last_export_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Export At"},"segment_count":{"type":"integer","title":"Segment Count","default":0}},"type":"object","required":["id"],"title":"AdminProjectSummary"},"AdminScene":{"properties":{"id":{"type":"string","title":"Id"},"segment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment Id"},"segment_number":{"type":"integer","title":"Segment Number"},"duration_frames":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Frames"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","segment_number"],"title":"AdminScene"},"AdminScript":{"properties":{"id":{"type":"string","title":"Id"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"char_count":{"type":"integer","title":"Char Count","default":0},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"}},"type":"object","required":["id"],"title":"AdminScript"},"AdminScriptVersion":{"properties":{"id":{"type":"string","title":"Id"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"char_count":{"type":"integer","title":"Char Count","default":0}},"type":"object","required":["id"],"title":"AdminScriptVersion"},"AdminSegment":{"properties":{"id":{"type":"string","title":"Id"},"segment_number":{"type":"integer","title":"Segment Number"},"narration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narration"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"director_payload":{"additionalProperties":true,"type":"object","title":"Director Payload","default":{}},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"assets":{"items":{"$ref":"#/components/schemas/AdminSegmentAsset"},"type":"array","title":"Assets","default":[]}},"type":"object","required":["id","segment_number"],"title":"AdminSegment"},"AdminSegmentAsset":{"properties":{"id":{"type":"string","title":"Id"},"asset_type":{"type":"string","title":"Asset Type"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","asset_type"],"title":"AdminSegmentAsset"},"AdminStatus":{"properties":{"is_admin":{"type":"boolean","title":"Is Admin"}},"type":"object","required":["is_admin"],"title":"AdminStatus"},"AdminStyleRef":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id"],"title":"AdminStyleRef"},"AdminSubscription":{"properties":{"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cancel At Period End"}},"type":"object","title":"AdminSubscription"},"AdminUserDetail":{"properties":{"user":{"$ref":"#/components/schemas/AdminUserSummary"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/AdminSubscription"},{"type":"null"}]},"available_credits":{"type":"integer","title":"Available Credits","default":0},"channels":{"items":{"$ref":"#/components/schemas/AdminChannelSummary"},"type":"array","title":"Channels"},"projects":{"items":{"$ref":"#/components/schemas/AdminProjectSummary"},"type":"array","title":"Projects"}},"type":"object","required":["user","channels","projects"],"title":"AdminUserDetail"},"AdminUserSearch":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminUserSummary"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AdminUserSearch"},"AdminUserSummary":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"channel_count":{"type":"integer","title":"Channel Count","default":0},"project_count":{"type":"integer","title":"Project Count","default":0}},"type":"object","required":["user_id"],"title":"AdminUserSummary"},"AdminVoiceBlock":{"properties":{"id":{"type":"string","title":"Id"},"block_index":{"type":"integer","title":"Block Index"},"speaker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"scene_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scene Direction"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","block_index"],"title":"AdminVoiceBlock"},"Affiliate":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"main_platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Main Platform"},"outreach_platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outreach Platform"},"contact_left":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Left"},"status":{"type":"string","title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"payout_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Method"},"payout_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Handle"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"stripe_coupon_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Coupon Id"},"stripe_promotion_code_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Promotion Code Id"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"},"code_aliases":{"items":{"type":"string"},"type":"array","title":"Code Aliases","default":[]},"code_percent_off":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code Percent Off"},"code_amount_off_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code Amount Off Cents"},"code_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Currency"},"code_duration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Duration"},"code_duration_in_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code Duration In Months"},"code_max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Code Max Redemptions"},"code_first_time_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code First Time Only"},"code_redeem_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Redeem By"},"code_created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Created At"},"code_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Active"},"redemption_count":{"type":"integer","title":"Redemption Count","default":0},"first_redeemed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Redeemed At"},"last_redeemed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Redeemed At"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","status","created_at"],"title":"Affiliate"},"AffiliateBalance":{"properties":{"affiliate_id":{"type":"string","title":"Affiliate Id"},"pending_cents":{"type":"integer","title":"Pending Cents"},"approved_cents":{"type":"integer","title":"Approved Cents"},"paid_cents":{"type":"integer","title":"Paid Cents"},"approved_revenue_cents":{"type":"integer","title":"Approved Revenue Cents"},"qualified_referrals":{"type":"integer","title":"Qualified Referrals"},"tier":{"type":"integer","title":"Tier"},"rate_bps":{"type":"integer","title":"Rate Bps"},"chargeback_count":{"type":"integer","title":"Chargeback Count"}},"type":"object","required":["affiliate_id","pending_cents","approved_cents","paid_cents","approved_revenue_cents","qualified_referrals","tier","rate_bps","chargeback_count"],"title":"AffiliateBalance","description":"Live ledger rollup for one affiliate — computed, never stored."},"AffiliateDetail":{"properties":{"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"affiliate":{"$ref":"#/components/schemas/Affiliate"},"tier":{"type":"integer","title":"Tier"},"rate_bps":{"type":"integer","title":"Rate Bps"},"pending_cents":{"type":"integer","title":"Pending Cents"},"approved_cents":{"type":"integer","title":"Approved Cents"},"paid_cents":{"type":"integer","title":"Paid Cents"},"lifetime_revenue_cents":{"type":"integer","title":"Lifetime Revenue Cents"},"qualified_referrals":{"type":"integer","title":"Qualified Referrals"},"chargeback_count":{"type":"integer","title":"Chargeback Count"},"min_payout_cents":{"type":"integer","title":"Min Payout Cents"},"terms_accepted":{"type":"boolean","title":"Terms Accepted"},"progress":{"$ref":"#/components/schemas/schemas__admin_affiliates__TierProgress"},"commissions":{"items":{"$ref":"#/components/schemas/schemas__admin_affiliates__CommissionRow"},"type":"array","title":"Commissions"},"visits_in_range":{"type":"integer","title":"Visits In Range","default":0},"days_with_traffic":{"type":"integer","title":"Days With Traffic","default":0},"redemptions_in_range":{"type":"integer","title":"Redemptions In Range","default":0},"new_referrals_in_range":{"type":"integer","title":"New Referrals In Range","default":0},"visit_to_redemption_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Visit To Redemption Pct"},"visit_to_referral_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Visit To Referral Pct"},"clicks_by_day":{"items":{"$ref":"#/components/schemas/ClickPoint"},"type":"array","title":"Clicks By Day","default":[]},"landing_paths":{"items":{"$ref":"#/components/schemas/LandingPathRow"},"type":"array","title":"Landing Paths","default":[]},"redemptions":{"items":{"$ref":"#/components/schemas/RedemptionRow"},"type":"array","title":"Redemptions","default":[]}},"type":"object","required":["start","end","affiliate","tier","rate_bps","pending_cents","approved_cents","paid_cents","lifetime_revenue_cents","qualified_referrals","chargeback_count","min_payout_cents","terms_accepted","progress","commissions"],"title":"AffiliateDetail","description":"Everything the drill-down shows: the affiliate's own board (identical\nnumbers to what they see at /app/affiliate) plus the traffic and redemption\ndetail their portal deliberately does not expose."},"AffiliatePerformance":{"properties":{"affiliate_id":{"type":"string","title":"Affiliate Id"},"name":{"type":"string","title":"Name"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"status":{"type":"string","title":"Status"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"},"code_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Active"},"main_platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Main Platform"},"visits_in_range":{"type":"integer","title":"Visits In Range","default":0},"days_with_traffic":{"type":"integer","title":"Days With Traffic","default":0},"redemptions_in_range":{"type":"integer","title":"Redemptions In Range","default":0},"new_referrals_in_range":{"type":"integer","title":"New Referrals In Range","default":0},"renewals_in_range":{"type":"integer","title":"Renewals In Range","default":0},"net_revenue_cents_in_range":{"type":"integer","title":"Net Revenue Cents In Range","default":0},"commission_cents_in_range":{"type":"integer","title":"Commission Cents In Range","default":0},"visit_to_redemption_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Visit To Redemption Pct"},"visit_to_referral_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Visit To Referral Pct"},"lifetime_revenue_cents":{"type":"integer","title":"Lifetime Revenue Cents","default":0},"lifetime_qualified_referrals":{"type":"integer","title":"Lifetime Qualified Referrals","default":0},"pending_cents":{"type":"integer","title":"Pending Cents","default":0},"approved_cents":{"type":"integer","title":"Approved Cents","default":0},"paid_cents":{"type":"integer","title":"Paid Cents","default":0},"tier":{"type":"integer","title":"Tier","default":1},"rate_bps":{"type":"integer","title":"Rate Bps","default":2000},"chargeback_count":{"type":"integer","title":"Chargeback Count","default":0},"last_visit_day":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Visit Day"}},"type":"object","required":["affiliate_id","name","status"],"title":"AffiliatePerformance","description":"One affiliate's funnel over the selected window."},"AffiliatePerformanceResponse":{"properties":{"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"totals":{"$ref":"#/components/schemas/AffiliatePerformanceTotals"},"items":{"items":{"$ref":"#/components/schemas/AffiliatePerformance"},"type":"array","title":"Items"}},"type":"object","required":["start","end","totals","items"],"title":"AffiliatePerformanceResponse"},"AffiliatePerformanceTotals":{"properties":{"affiliates":{"type":"integer","title":"Affiliates","default":0},"affiliates_with_traffic":{"type":"integer","title":"Affiliates With Traffic","default":0},"visits_in_range":{"type":"integer","title":"Visits In Range","default":0},"redemptions_in_range":{"type":"integer","title":"Redemptions In Range","default":0},"new_referrals_in_range":{"type":"integer","title":"New Referrals In Range","default":0},"net_revenue_cents_in_range":{"type":"integer","title":"Net Revenue Cents In Range","default":0},"commission_cents_in_range":{"type":"integer","title":"Commission Cents In Range","default":0},"visit_to_redemption_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Visit To Redemption Pct"},"visit_to_referral_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Visit To Referral Pct"},"pending_cents":{"type":"integer","title":"Pending Cents","default":0},"approved_cents":{"type":"integer","title":"Approved Cents","default":0},"paid_cents":{"type":"integer","title":"Paid Cents","default":0}},"type":"object","title":"AffiliatePerformanceTotals","description":"Program-wide roll-up of the rows below it, same window."},"AffiliateStats":{"properties":{"name":{"type":"string","title":"Name"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"},"pending_cents":{"type":"integer","title":"Pending Cents"},"approved_cents":{"type":"integer","title":"Approved Cents"},"paid_cents":{"type":"integer","title":"Paid Cents"},"lifetime_revenue_cents":{"type":"integer","title":"Lifetime Revenue Cents"},"qualified_referrals":{"type":"integer","title":"Qualified Referrals"},"signups":{"anyOf":[{"$ref":"#/components/schemas/SignupStats"},{"type":"null"}]},"tier":{"type":"integer","title":"Tier"},"rate_bps":{"type":"integer","title":"Rate Bps"},"min_payout_cents":{"type":"integer","title":"Min Payout Cents"},"terms_accepted":{"type":"boolean","title":"Terms Accepted"},"progress":{"$ref":"#/components/schemas/schemas__affiliate_portal__TierProgress"},"commissions":{"items":{"$ref":"#/components/schemas/schemas__affiliate_portal__CommissionRow"},"type":"array","title":"Commissions"}},"type":"object","required":["name","pending_cents","approved_cents","paid_cents","lifetime_revenue_cents","qualified_referrals","tier","rate_bps","min_payout_cents","terms_accepted","progress","commissions"],"title":"AffiliateStats"},"AnalyticsPeriod":{"type":"integer","enum":[7,28,90,365],"title":"AnalyticsPeriod","description":"The periods the analytics views offer, in days. An enum rather than a\nLiteral so the `days` query parameter is coerced from its string form."},"AnalyzeStyleResponse":{"properties":{"style_id":{"type":"string","title":"Style Id"},"status":{"type":"string","title":"Status","default":"queued"}},"type":"object","required":["style_id"],"title":"AnalyzeStyleResponse","description":"Async dispatch acknowledgement. The worker writes results into\n`styles.fields` when the job completes; the frontend's job watcher\nsees the terminal transition and invalidates the style query so the\npage picks up the fresh content."},"AnimateEstimateRow":{"properties":{"segment_id":{"type":"string","title":"Segment Id"},"segment_seconds":{"type":"number","title":"Segment Seconds"},"animate_credits":{"type":"integer","title":"Animate Credits"},"voice_credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Voice Credits"}},"type":"object","required":["segment_id","segment_seconds","animate_credits","voice_credits"],"title":"AnimateEstimateRow"},"AnimateEstimatesResponse":{"properties":{"animate_model":{"type":"string","title":"Animate Model"},"voice_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Model"},"byok":{"type":"boolean","title":"Byok"},"segments":{"items":{"$ref":"#/components/schemas/AnimateEstimateRow"},"type":"array","title":"Segments"}},"type":"object","required":["animate_model","voice_model","byok","segments"],"title":"AnimateEstimatesResponse"},"AnimateSegmentRequest":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"voice":{"type":"boolean","title":"Voice","default":false},"start":{"type":"boolean","title":"Start","default":true}},"type":"object","title":"AnimateSegmentRequest","description":"One-click Animate: flip the segment to a generated video shot (carrying\nits rendered frame) and start the clip in the same request. A refused\ngeneration rolls the flip back. The prompt editor fields apply to the\nclip's render and are saved to its prompt editor, as on any generate."},"AnimateSegmentResponse":{"properties":{"asset_id":{"type":"string","title":"Asset Id"},"ai_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Job Id"},"status":{"type":"string","title":"Status"},"segment":{"additionalProperties":true,"type":"object","title":"Segment"}},"type":"object","required":["asset_id","status","segment"],"title":"AnimateSegmentResponse"},"ApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","name","key_prefix","created_at","last_used_at","revoked_at"],"title":"ApiKeyResponse"},"ApplyRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"youtube":{"type":"string","maxLength":300,"title":"Youtube","default":""},"x":{"type":"string","maxLength":300,"title":"X","default":""},"tiktok":{"type":"string","maxLength":300,"title":"Tiktok","default":""},"instagram":{"type":"string","maxLength":300,"title":"Instagram","default":""},"facebook":{"type":"string","maxLength":300,"title":"Facebook","default":""},"linkedin":{"type":"string","maxLength":300,"title":"Linkedin","default":""},"notes":{"type":"string","maxLength":2000,"title":"Notes","default":""},"website":{"type":"string","maxLength":300,"title":"Website","default":""}},"type":"object","required":["name","email"],"title":"ApplyRequest","description":"Public affiliate-program application form (the /affiliates page).\n\nSocials are free-text URLs or handles; empty string means \"not given\".\n`website` is a honeypot — the field is hidden from humans, so any value\nmarks the submission as bot spam and it is silently dropped."},"ApplyResponse":{"properties":{"received":{"type":"boolean","title":"Received","default":true}},"type":"object","title":"ApplyResponse"},"ApproveRequest":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"code_challenge":{"type":"string","maxLength":128,"minLength":43,"title":"Code Challenge"},"code_challenge_method":{"type":"string","title":"Code Challenge Method"},"state":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"State"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["client_id","redirect_uri","code_challenge","code_challenge_method"],"title":"ApproveRequest"},"AssetReferenceTarget":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"asset_id":{"type":"string","title":"Asset Id"}},"type":"object","required":["asset_id"],"title":"AssetReferenceTarget"},"AssetResponse":{"properties":{"id":{"type":"string","title":"Id"},"channel_id":{"type":"string","title":"Channel Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"parent_style_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Style Id"},"asset_type":{"type":"string","title":"Asset Type"},"name":{"type":"string","title":"Name"},"ai_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Output"},"additional_properties":{"additionalProperties":true,"type":"object","title":"Additional Properties","default":{}},"file_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","channel_id","asset_type","name"],"title":"AssetResponse","description":"Public asset shape returned to the frontend."},"AssignLibraryTrackRequest":{"properties":{"library_track_id":{"type":"string","title":"Library Track Id"}},"type":"object","required":["library_track_id"],"title":"AssignLibraryTrackRequest"},"AudioLibraryTrack":{"properties":{"id":{"type":"string","title":"Id"},"category":{"type":"string","title":"Category"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"sourceUrl":{"type":"string","title":"Sourceurl"},"durationMs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Durationms"},"bpm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bpm"},"mood":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood"},"genre":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"},"loopCompatible":{"type":"boolean","title":"Loopcompatible","default":false},"userId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userid"}},"type":"object","required":["id","category","name","sourceUrl"],"title":"AudioLibraryTrack"},"Automation":{"properties":{"id":{"type":"string","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"schedule":{"type":"string","title":"Schedule"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","key","name","description","schedule","status","created_at","updated_at"],"title":"Automation"},"AutomationList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AutomationWithLastRun"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AutomationList"},"AutomationRun":{"properties":{"id":{"type":"string","title":"Id"},"automation_id":{"type":"string","title":"Automation Id"},"started_at":{"type":"string","title":"Started At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"status":{"type":"string","title":"Status"},"summary":{"type":"string","title":"Summary"},"stats":{"additionalProperties":true,"type":"object","title":"Stats"}},"type":"object","required":["id","automation_id","started_at","finished_at","status","summary","stats"],"title":"AutomationRun"},"AutomationUpdate":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"AutomationUpdate"},"AutomationWithLastRun":{"properties":{"id":{"type":"string","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"schedule":{"type":"string","title":"Schedule"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"last_run":{"anyOf":[{"$ref":"#/components/schemas/AutomationRun"},{"type":"null"}]}},"type":"object","required":["id","key","name","description","schedule","status","created_at","updated_at","last_run"],"title":"AutomationWithLastRun"},"BalanceResponse":{"properties":{"credits_remaining":{"type":"integer","title":"Credits Remaining"},"held_credits":{"type":"integer","title":"Held Credits"},"monthly_allowance":{"type":"integer","title":"Monthly Allowance"},"subscription_status":{"type":"string","title":"Subscription Status"},"plan_id":{"type":"string","title":"Plan Id"},"current_period_end":{"type":"string","title":"Current Period End"},"max_channels":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Channels"},"channels_used":{"type":"integer","title":"Channels Used"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"expiring_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiring Amount"},"expiring_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiring At"},"upgrade_plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Plan Id"}},"type":"object","required":["credits_remaining","held_credits","monthly_allowance","subscription_status","plan_id","current_period_end","max_channels","channels_used","cancel_at_period_end","ended_at","expiring_amount","expiring_at","upgrade_plan_id"],"title":"BalanceResponse"},"BatchProgress":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"total":{"type":"integer","title":"Total"},"done":{"type":"integer","title":"Done"}},"type":"object","required":["batch_id","total","done"],"title":"BatchProgress","description":"Rollup for one bulk enqueue (generate-all): how many of the batch's\njobs are terminal. Lets the frontend render \"N of M\" instead of an\nundifferentiated wall of spinners."},"Body_clone_custom_voice_custom_voices_clone_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"name":{"type":"string","maxLength":40,"minLength":1,"title":"Name"},"consent":{"type":"boolean","title":"Consent"}},"type":"object","required":["file","name","consent"],"title":"Body_clone_custom_voice_custom_voices_clone_post"},"Body_create_library_track_audio_library_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"category":{"type":"string","title":"Category"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"type":"string","title":"Tags","default":""},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"bpm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bpm"},"mood":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood"},"genre":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"},"loop_compatible":{"type":"boolean","title":"Loop Compatible","default":false}},"type":"object","required":["file","category","name"],"title":"Body_create_library_track_audio_library_post"},"Body_create_private_track_audio_library_private_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"category":{"type":"string","title":"Category"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"type":"string","title":"Tags","default":""},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"bpm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bpm"},"mood":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood"},"genre":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"},"loop_compatible":{"type":"boolean","title":"Loop Compatible","default":false}},"type":"object","required":["file","category","name"],"title":"Body_create_private_track_audio_library_private_post"},"Body_create_style_endpoint_styles_post":{"properties":{"name":{"type":"string","title":"Name"},"channel_id":{"type":"string","title":"Channel Id"},"inputs":{"type":"string","title":"Inputs","default":"[]"},"presets":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Presets"},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","default":[]}},"type":"object","required":["name","channel_id"],"title":"Body_create_style_endpoint_styles_post"},"Body_update_style_endpoint_styles__style_id__patch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"inputs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inputs"},"fields":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fields"},"presets":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Presets"},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","default":[]}},"type":"object","title":"Body_update_style_endpoint_styles__style_id__patch"},"Body_upload_layer_image_endpoint_scenes__scene_id__upload_layer_image_post":{"properties":{"layer_id":{"type":"string","title":"Layer Id"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["layer_id","file"],"title":"Body_upload_layer_image_endpoint_scenes__scene_id__upload_layer_image_post"},"Body_upload_reference_endpoint_assets__asset_id__reference_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_reference_endpoint_assets__asset_id__reference_post"},"Body_upload_segment_asset_image_endpoint_segments__segment_id__assets__asset_id__upload_image_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_segment_asset_image_endpoint_segments__segment_id__assets__asset_id__upload_image_post"},"Body_upload_task_media_admin_marketing_media_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_task_media_admin_marketing_media_post"},"Body_upload_template_endpoint_styles__style_id__upload_template_post":{"properties":{"template_type":{"type":"string","title":"Template Type"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["template_type","file"],"title":"Body_upload_template_endpoint_styles__style_id__upload_template_post"},"Body_upload_thumbnail_projects__project_id__thumbnails_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"kind":{"type":"string","title":"Kind","default":"upload"},"design":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Design"},"source_thumbnail_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Thumbnail Id"},"thumbnail_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Id"}},"type":"object","required":["file"],"title":"Body_upload_thumbnail_projects__project_id__thumbnails_upload_post"},"BrandShare":{"properties":{"brand":{"type":"string","title":"Brand"},"mentions":{"type":"integer","title":"Mentions"},"pct":{"type":"number","title":"Pct"}},"type":"object","required":["brand","mentions","pct"],"title":"BrandShare"},"BuildScenesRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"}},"type":"object","required":["project_id"],"title":"BuildScenesRequest"},"BuildScenesResponse":{"properties":{"scene_count":{"type":"integer","title":"Scene Count"},"scenes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Scenes"}},"type":"object","required":["scene_count","scenes"],"title":"BuildScenesResponse"},"Campaign":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"platform":{"type":"string","title":"Platform"},"content_type":{"type":"string","title":"Content Type"},"cadence":{"type":"string","title":"Cadence"},"goal":{"type":"string","title":"Goal"},"status":{"type":"string","title":"Status"},"notes":{"type":"string","title":"Notes"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","platform","content_type","cadence","goal","status","notes","created_at","updated_at"],"title":"Campaign"},"CampaignCreate":{"properties":{"name":{"type":"string","title":"Name"},"platform":{"type":"string","title":"Platform"},"content_type":{"type":"string","title":"Content Type"},"cadence":{"type":"string","title":"Cadence","default":""},"goal":{"type":"string","title":"Goal","default":""},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["name","platform","content_type"],"title":"CampaignCreate"},"CampaignList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Campaign"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CampaignList"},"CampaignUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"cadence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cadence"},"goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"CampaignUpdate"},"ChangeSegmentTypeRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"Preview the operation's consequences (assets kept / staled / recreated / deleted, jobs cancelled, rendered assets lost) without applying it.","default":false},"segment_type":{"type":"string","enum":["image","video","overlay_scene"],"title":"Segment Type"},"media_source":{"anyOf":[{"type":"string","enum":["generated","real"]},{"type":"null"}],"title":"Media Source"},"carry_frame":{"type":"boolean","title":"Carry Frame","default":false},"lip_sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lip Sync"}},"type":"object","required":["segment_type"],"title":"ChangeSegmentTypeRequest","description":"Change a segment's visual type and/or media source."},"ChannelThumbnailResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"kind":{"type":"string","title":"Kind"},"image_url":{"type":"string","title":"Image Url"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"reference_refs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reference Refs","default":[]},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"design":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Design"},"source_thumbnail_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Thumbnail Id"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"project_title":{"type":"string","title":"Project Title"}},"type":"object","required":["id","project_id","kind","image_url","created_at","updated_at","project_title"],"title":"ChannelThumbnailResponse","description":"The active thumbnail of another video on the same channel."},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage"},"CheckoutRequest":{"properties":{"plan_id":{"type":"string","enum":["creator_monthly","creator_quarterly","pro_monthly","pro_quarterly","studio_monthly","studio_quarterly","scale_monthly","scale_quarterly"],"title":"Plan Id"},"referral_code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Referral Code"},"meta":{"$ref":"#/components/schemas/MetaBrowserContext","default":{}}},"type":"object","required":["plan_id"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"client_secret":{"type":"string","title":"Client Secret"},"session_id":{"type":"string","title":"Session Id"},"order_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Value"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["client_secret","session_id","order_value","currency"],"title":"CheckoutResponse"},"ClickPoint":{"properties":{"day":{"type":"string","title":"Day"},"visits":{"type":"integer","title":"Visits"}},"type":"object","required":["day","visits"],"title":"ClickPoint"},"ClickRequest":{"properties":{"code":{"type":"string","maxLength":64,"minLength":1,"title":"Code"},"path":{"type":"string","maxLength":300,"title":"Path","default":""}},"type":"object","required":["code"],"title":"ClickRequest","description":"One visit through an affiliate's ?ref= link, pinged from the browser.\n\nUnauthenticated — the visitor is a stranger, not a Framesail user. The code\nis untrusted: the backend resolves it against billing.affiliates and drops\nanything that isn't an active code, exactly like checkout does."},"ClickResponse":{"properties":{"received":{"type":"boolean","title":"Received","default":true}},"type":"object","title":"ClickResponse"},"CombineSegmentRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"Preview the operation's consequences (assets kept / staled / recreated / deleted, jobs cancelled, rendered assets lost) without applying it.","default":false},"with_segment_id":{"type":"string","title":"With Segment Id","description":"ID of the adjacent segment to merge with."},"keep":{"type":"string","enum":["this","other"],"title":"Keep","description":"Which segment's creative data survives. 'this' = the segment in the URL, 'other' = with_segment_id.","default":"this"}},"type":"object","required":["with_segment_id"],"title":"CombineSegmentRequest","description":"Combine this segment with an adjacent segment."},"CompleteConnectRequest":{"properties":{"code":{"type":"string","maxLength":2048,"minLength":1,"title":"Code"},"state":{"type":"string","maxLength":2048,"minLength":1,"title":"State"}},"type":"object","required":["code","state"],"title":"CompleteConnectRequest"},"ConnectUrl":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"ConnectUrl"},"CreateAffiliateRequest":{"properties":{"name":{"type":"string","title":"Name"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"main_platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Main Platform"},"outreach_platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outreach Platform"},"contact_left":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Left"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"payout_method":{"anyOf":[{"type":"string","enum":["paypal","wise"]},{"type":"null"}],"title":"Payout Method"},"payout_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Handle"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","required":["name"],"title":"CreateAffiliateRequest"},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"CreateApiKeyRequest"},"CreateAssetBody":{"properties":{"name":{"type":"string","title":"Name"},"asset_type":{"type":"string","title":"Asset Type"},"channel_id":{"type":"string","title":"Channel Id"},"project_id":{"type":"string","title":"Project Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","asset_type","channel_id","project_id"],"title":"CreateAssetBody"},"CreateChannelRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"CreateChannelRequest"},"CreateCodeRequest":{"properties":{"code":{"type":"string","title":"Code"},"percent_off":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Percent Off"},"amount_off_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Off Cents"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","default":"usd"},"duration":{"type":"string","title":"Duration","default":"once"},"duration_in_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration In Months"},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions"},"redeem_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redeem By"},"first_time_only":{"type":"boolean","title":"First Time Only","default":true}},"type":"object","required":["code"],"title":"CreateCodeRequest","description":"Full admin control over the Stripe code. Provide exactly one of\npercent_off / amount_off_cents."},"CreateProjectRequest":{"properties":{"channel_id":{"type":"string","title":"Channel Id"},"title":{"type":"string","maxLength":300,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"voice_tts_provider":{"anyOf":[{"type":"string","enum":["minimax","elevenlabs"]},{"type":"null"}],"title":"Voice Tts Provider"},"video_format":{"type":"string","enum":["landscape","portrait"],"title":"Video Format","default":"landscape"}},"type":"object","required":["channel_id","title"],"title":"CreateProjectRequest"},"CreatedApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","key_prefix","created_at","last_used_at","revoked_at","key"],"title":"CreatedApiKeyResponse"},"CreditLiability":{"properties":{"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"months":{"items":{"$ref":"#/components/schemas/CreditMonth"},"type":"array","title":"Months"},"outstanding_credits":{"type":"integer","title":"Outstanding Credits"},"outstanding_subscription":{"type":"integer","title":"Outstanding Subscription"},"outstanding_topup":{"type":"integer","title":"Outstanding Topup"},"outstanding_signup":{"type":"integer","title":"Outstanding Signup"},"outstanding_affiliate":{"type":"integer","title":"Outstanding Affiliate"},"outstanding_other":{"type":"integer","title":"Outstanding Other"},"outstanding_topup_value_usd":{"type":"number","title":"Outstanding Topup Value Usd"},"expiring_30d_credits":{"type":"integer","title":"Expiring 30D Credits"},"never_expires_credits":{"type":"integer","title":"Never Expires Credits"},"unpriced_topup_grants":{"type":"integer","title":"Unpriced Topup Grants"}},"type":"object","required":["start","end","months","outstanding_credits","outstanding_subscription","outstanding_topup","outstanding_signup","outstanding_affiliate","outstanding_other","outstanding_topup_value_usd","expiring_30d_credits","never_expires_credits","unpriced_topup_grants"],"title":"CreditLiability"},"CreditMonth":{"properties":{"month":{"type":"string","title":"Month"},"granted_credits":{"type":"integer","title":"Granted Credits"},"granted_subscription":{"type":"integer","title":"Granted Subscription"},"granted_topup":{"type":"integer","title":"Granted Topup"},"granted_signup":{"type":"integer","title":"Granted Signup"},"granted_affiliate":{"type":"integer","title":"Granted Affiliate"},"granted_other":{"type":"integer","title":"Granted Other"},"topup_value_usd":{"type":"number","title":"Topup Value Usd"},"spent_credits":{"type":"integer","title":"Spent Credits"},"expired_credits":{"type":"integer","title":"Expired Credits"},"outstanding_credits":{"type":"integer","title":"Outstanding Credits"}},"type":"object","required":["month","granted_credits","granted_subscription","granted_topup","granted_signup","granted_affiliate","granted_other","topup_value_usd","spent_credits","expired_credits","outstanding_credits"],"title":"CreditMonth"},"CreditPackPricing":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"credits":{"type":"integer","title":"Credits"},"price_cents":{"type":"integer","title":"Price Cents"}},"type":"object","required":["id","name","credits","price_cents"],"title":"CreditPackPricing"},"CustomVoiceResponse":{"properties":{"id":{"type":"string","title":"Id"},"provider_voice_id":{"type":"string","title":"Provider Voice Id"},"name":{"type":"string","title":"Name"},"source":{"type":"string","title":"Source"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"share_disable_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Disable At"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","provider_voice_id","name","source","preview_url","share_disable_at","created_at","updated_at"],"title":"CustomVoiceResponse"},"CustomVoiceSlotResponse":{"properties":{"voice":{"anyOf":[{"$ref":"#/components/schemas/CustomVoiceResponse"},{"type":"null"}]},"swaps_remaining":{"type":"integer","title":"Swaps Remaining"},"next_swap_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Swap At"}},"type":"object","required":["voice","swaps_remaining","next_swap_at"],"title":"CustomVoiceSlotResponse"},"DirectorChatRequest":{"properties":{"scene_id":{"type":"string","title":"Scene Id"},"message":{"type":"string","title":"Message"},"selected_layer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Layer Id"},"conversation_history":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Conversation History","default":[]},"scene_composition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scene Composition"}},"type":"object","required":["scene_id","message"],"title":"DirectorChatRequest"},"DirectorChatResponse":{"properties":{"mutations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Mutations"},"skipped_mutations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Skipped Mutations","default":[]},"summary":{"type":"string","title":"Summary"},"updated_scene":{"additionalProperties":true,"type":"object","title":"Updated Scene"},"undoable":{"type":"boolean","title":"Undoable"},"follow_up_suggestions":{"items":{"type":"string"},"type":"array","title":"Follow Up Suggestions","default":[]}},"type":"object","required":["mutations","summary","updated_scene","undoable"],"title":"DirectorChatResponse"},"DomainCount":{"properties":{"domain":{"type":"string","title":"Domain"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["domain","count"],"title":"DomainCount"},"EmailAudienceStats":{"properties":{"total_users":{"type":"integer","title":"Total Users"},"subscribed":{"type":"integer","title":"Subscribed"},"unsubscribed":{"type":"integer","title":"Unsubscribed"}},"type":"object","required":["total_users","subscribed","unsubscribed"],"title":"EmailAudienceStats"},"EmailCampaign":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"},"steps":{"items":{"$ref":"#/components/schemas/EmailCampaignStep"},"type":"array","title":"Steps"},"converted":{"type":"integer","title":"Converted"}},"type":"object","required":["key","name","promo_code","steps","converted"],"title":"EmailCampaign"},"EmailCampaignStep":{"properties":{"step":{"type":"integer","title":"Step"},"template_key":{"type":"string","title":"Template Key"},"sent":{"type":"integer","title":"Sent"},"opened":{"type":"integer","title":"Opened"},"clicked":{"type":"integer","title":"Clicked"}},"type":"object","required":["step","template_key","sent","opened","clicked"],"title":"EmailCampaignStep"},"EmailSendRow":{"properties":{"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"template_key":{"type":"string","title":"Template Key"},"template_name":{"type":"string","title":"Template Name"},"sent_at":{"type":"string","title":"Sent At"}},"type":"object","required":["email","name","template_key","template_name","sent_at"],"title":"EmailSendRow"},"EmailTemplate":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"subject":{"type":"string","title":"Subject"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"},"step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step"},"trigger":{"type":"string","title":"Trigger"},"gating":{"type":"string","title":"Gating"},"source_path":{"type":"string","title":"Source Path"},"html":{"type":"string","title":"Html"},"text":{"type":"string","title":"Text"},"sent_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sent Count"},"last_sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sent At"}},"type":"object","required":["key","name","subject","kind","status","campaign","step","trigger","gating","source_path","html","text","sent_count","last_sent_at"],"title":"EmailTemplate"},"EmailTestSendResponse":{"properties":{"message_id":{"type":"string","title":"Message Id"}},"type":"object","required":["message_id"],"title":"EmailTestSendResponse"},"EmailsOverview":{"properties":{"from_address":{"type":"string","title":"From Address"},"audience":{"$ref":"#/components/schemas/EmailAudienceStats"},"templates":{"items":{"$ref":"#/components/schemas/EmailTemplate"},"type":"array","title":"Templates"},"campaigns":{"items":{"$ref":"#/components/schemas/EmailCampaign"},"type":"array","title":"Campaigns"},"recent_sends":{"items":{"$ref":"#/components/schemas/EmailSendRow"},"type":"array","title":"Recent Sends"}},"type":"object","required":["from_address","audience","templates","campaigns","recent_sends"],"title":"EmailsOverview"},"EngineMonth":{"properties":{"engine":{"type":"string","title":"Engine"},"prompts_run":{"type":"integer","title":"Prompts Run"},"leaderboard":{"items":{"$ref":"#/components/schemas/BrandShare"},"type":"array","title":"Leaderboard"},"top_domains":{"items":{"$ref":"#/components/schemas/DomainCount"},"type":"array","title":"Top Domains"},"framesail_mentions":{"type":"integer","title":"Framesail Mentions"},"framesail_sov_pct":{"type":"number","title":"Framesail Sov Pct"},"our_channel_citations":{"type":"integer","title":"Our Channel Citations"}},"type":"object","required":["engine","prompts_run","leaderboard","top_domains","framesail_mentions","framesail_sov_pct","our_channel_citations"],"title":"EngineMonth"},"ExpertConfigRow":{"properties":{"id":{"type":"string","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"style_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style Id"},"asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Id"},"segment_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment Asset Id"},"voice_block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Block Id"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","job_type","config","updated_at"],"title":"ExpertConfigRow"},"ExportRequest":{"properties":{"project_data":{"additionalProperties":true,"type":"object","title":"Project Data"}},"type":"object","required":["project_data"],"title":"ExportRequest"},"GenerateArtStyleTemplateRequest":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"style_id":{"type":"string","title":"Style Id"}},"type":"object","required":["style_id"],"title":"GenerateArtStyleTemplateRequest"},"GenerateAssetReferenceBatchRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"assets":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetReferenceTarget"},"type":"array"},{"type":"null"}],"title":"Assets"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["project_id"],"title":"GenerateAssetReferenceBatchRequest"},"GenerateScriptRequest":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"project_id":{"type":"string","title":"Project Id"}},"type":"object","required":["project_id"],"title":"GenerateScriptRequest"},"GenerateScriptScanRequest":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"project_id":{"type":"string","title":"Project Id"}},"type":"object","required":["project_id"],"title":"GenerateScriptScanRequest"},"GenerateSegmentAssetsRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"assets":{"anyOf":[{"items":{"$ref":"#/components/schemas/SegmentAssetTarget"},"type":"array"},{"type":"null"}],"title":"Assets"},"segment_numbers":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Segment Numbers"},"asset_scope":{"type":"string","enum":["all","no_clips","clips_only"],"title":"Asset Scope","default":"all"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["project_id"],"title":"GenerateSegmentAssetsRequest"},"GenerateSegmentAssetsResponse":{"properties":{"status":{"type":"string","title":"Status"},"asset_count":{"type":"integer","title":"Asset Count"},"estimated_credits":{"type":"integer","title":"Estimated Credits"},"segment_count":{"type":"integer","title":"Segment Count"},"available_credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Available Credits"},"video_asset_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Video Asset Count"},"video_credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Video Credits"},"jobs":{"items":{"$ref":"#/components/schemas/SegmentAssetJob"},"type":"array","title":"Jobs","default":[]}},"type":"object","required":["status","asset_count","estimated_credits","segment_count"],"title":"GenerateSegmentAssetsResponse"},"GenerateStoryboardRequest":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"project_id":{"type":"string","title":"Project Id"}},"type":"object","required":["project_id"],"title":"GenerateStoryboardRequest"},"GenerateThumbnailCutoutRequest":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"project_id":{"type":"string","title":"Project Id"},"reference":{"$ref":"#/components/schemas/ThumbnailReference"}},"type":"object","required":["project_id","reference"],"title":"GenerateThumbnailCutoutRequest"},"GenerateThumbnailEditRequest":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"project_id":{"type":"string","title":"Project Id"},"source":{"$ref":"#/components/schemas/ThumbnailReference"},"instruction":{"type":"string","maxLength":2000,"title":"Instruction","default":""},"references":{"items":{"$ref":"#/components/schemas/ThumbnailReference"},"type":"array","maxItems":8,"title":"References","default":[]}},"type":"object","required":["project_id","source"],"title":"GenerateThumbnailEditRequest"},"GenerateThumbnailRequest":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"project_id":{"type":"string","title":"Project Id"},"brief":{"type":"string","maxLength":2000,"title":"Brief","default":""},"references":{"items":{"$ref":"#/components/schemas/ThumbnailReference"},"type":"array","maxItems":8,"title":"References","default":[]}},"type":"object","required":["project_id"],"title":"GenerateThumbnailRequest"},"GenerateVoiceBlockBatchRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"blocks":{"anyOf":[{"items":{"$ref":"#/components/schemas/VoiceBlockTarget"},"type":"array"},{"type":"null"}],"title":"Blocks"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["project_id"],"title":"GenerateVoiceBlockBatchRequest"},"GuideChip":{"properties":{"label":{"type":"string","title":"Label"},"kind":{"type":"string","enum":["navigate","question","preset"],"title":"Kind"},"value":{"type":"string","title":"Value"},"highlight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Highlight"}},"type":"object","required":["label","kind","value"],"title":"GuideChip"},"GuideEscalation":{"properties":{"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"route":{"type":"string","title":"Route"},"step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"}},"type":"object","required":["project_id","route","step","last_error"],"title":"GuideEscalation","description":"What the support email needs prefilled when a turn escalates."},"GuideListBlock":{"properties":{"type":{"type":"string","const":"list","title":"Type","default":"list"},"items":{"items":{"$ref":"#/components/schemas/GuideListItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"GuideListBlock","description":"Numbered rows: steps to read, or options to pick from."},"GuideListItem":{"properties":{"title":{"type":"string","title":"Title"},"detail":{"type":"string","title":"Detail"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"},"highlight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Highlight"}},"type":"object","required":["title","detail"],"title":"GuideListItem"},"GuideMessageRequest":{"properties":{"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"message":{"type":"string","maxLength":1000,"minLength":1,"title":"Message"},"route":{"type":"string","title":"Route"}},"type":"object","required":["message","route"],"title":"GuideMessageRequest"},"GuideMessageResponse":{"properties":{"reply":{"type":"string","title":"Reply"},"step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"},"category":{"type":"string","enum":["workflow","quality","credits","billing","bug","account","unknown"],"title":"Category"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"escalate":{"type":"boolean","title":"Escalate"},"chips":{"items":{"$ref":"#/components/schemas/GuideChip"},"type":"array","title":"Chips"},"escalation":{"anyOf":[{"$ref":"#/components/schemas/GuideEscalation"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"}},"type":"object","required":["reply","step","link","category","confidence","escalate","chips"],"title":"GuideMessageResponse"},"GuideNudgeRequest":{"properties":{"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"route":{"type":"string","title":"Route"}},"type":"object","required":["route"],"title":"GuideNudgeRequest"},"GuidePreset":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"blocks":{"items":{"oneOf":[{"$ref":"#/components/schemas/GuideTextBlock"},{"$ref":"#/components/schemas/GuideTipBlock"},{"$ref":"#/components/schemas/GuideTemplatesBlock"},{"$ref":"#/components/schemas/GuideListBlock"}],"discriminator":{"propertyName":"type","mapping":{"list":"#/components/schemas/GuideListBlock","templates":"#/components/schemas/GuideTemplatesBlock","text":"#/components/schemas/GuideTextBlock","tip":"#/components/schemas/GuideTipBlock"}}},"type":"array","title":"Blocks"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"},"highlight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Highlight"},"route":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route"}},"type":"object","required":["id","title","blocks"],"title":"GuidePreset","description":"A preset message as the panel renders it (generation/guide/presets.py)."},"GuidePresetRequest":{"properties":{"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"route":{"type":"string","title":"Route"},"preset_id":{"type":"string","title":"Preset Id"},"label":{"type":"string","maxLength":200,"title":"Label"}},"type":"object","required":["route","preset_id","label"],"title":"GuidePresetRequest"},"GuideRatingRequest":{"properties":{"rating":{"anyOf":[{"type":"string","enum":["up","down"]},{"type":"null"}],"title":"Rating"}},"type":"object","required":["rating"],"title":"GuideRatingRequest"},"GuideState":{"properties":{"level":{"type":"string","enum":["new","experienced"],"title":"Level"}},"type":"object","required":["level"],"title":"GuideState"},"GuideTemplatesBlock":{"properties":{"type":{"type":"string","const":"templates","title":"Type","default":"templates"}},"type":"object","title":"GuideTemplatesBlock","description":"The channel style's two template images, as they are now."},"GuideTextBlock":{"properties":{"type":{"type":"string","const":"text","title":"Type","default":"text"},"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"GuideTextBlock"},"GuideThreadMessage":{"properties":{"id":{"type":"string","title":"Id"},"scope":{"type":"string","enum":["global","channel","project"],"title":"Scope"},"scope_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Id"},"role":{"type":"string","enum":["user","assistant","nudge"],"title":"Role"},"content":{"type":"string","title":"Content"},"nudge_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nudge Id"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"chips":{"items":{"$ref":"#/components/schemas/GuideChip"},"type":"array","title":"Chips"},"preset":{"anyOf":[{"$ref":"#/components/schemas/GuidePreset"},{"type":"null"}]},"rating":{"anyOf":[{"type":"string","enum":["up","down"]},{"type":"null"}],"title":"Rating"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","scope","scope_id","role","content","nudge_id","category","chips","preset","created_at"],"title":"GuideThreadMessage","description":"One stored message of the thread, as the panel renders it."},"GuideTipBlock":{"properties":{"type":{"type":"string","const":"tip","title":"Type","default":"tip"},"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"GuideTipBlock"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeadlineTotals":{"properties":{"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"our_cost_usd":{"type":"number","title":"Our Cost Usd"},"byok_cost_usd":{"type":"number","title":"Byok Cost Usd"},"revenue_mrr_usd":{"type":"number","title":"Revenue Mrr Usd"},"revenue_topup_usd":{"type":"number","title":"Revenue Topup Usd"},"total_revenue_usd":{"type":"number","title":"Total Revenue Usd"},"margin_usd":{"type":"number","title":"Margin Usd"},"op_count":{"type":"integer","title":"Op Count"},"byok_op_count":{"type":"integer","title":"Byok Op Count"},"distinct_users":{"type":"integer","title":"Distinct Users"}},"type":"object","required":["start","end","our_cost_usd","byok_cost_usd","revenue_mrr_usd","revenue_topup_usd","total_revenue_usd","margin_usd","op_count","byok_op_count","distinct_users"],"title":"HeadlineTotals"},"JobProgress":{"properties":{"stage":{"type":"string","title":"Stage"},"fraction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fraction"}},"type":"object","required":["stage"],"title":"JobProgress","description":"In-flight progress a worker publishes on its own row — see\nbilling.ai_jobs.set_ai_job_progress. `fraction` is 0..1 within `stage`,\nor None when the stage has nothing measurable."},"JobSectionsEntry":{"properties":{"job":{"type":"string","title":"Job"},"section_id":{"type":"string","title":"Section Id"},"kind":{"type":"string","title":"Kind"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["job","section_id","kind","order"],"title":"JobSectionsEntry","description":"Flat (job, section_id) pair targetable by a style optional field's\n`applies_to` list. Excludes `locked` sections."},"JobSectionsResponse":{"properties":{"sections":{"items":{"$ref":"#/components/schemas/JobSectionsEntry"},"type":"array","title":"Sections"}},"type":"object","required":["sections"],"title":"JobSectionsResponse"},"JobStatusRow":{"properties":{"id":{"type":"string","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","enum":["pending","running","complete","error"],"title":"Status"},"resource_type":{"type":"string","enum":["project","script","segment","segment_asset","scene","asset","style","voice_block"],"title":"Resource Type"},"resource_id":{"type":"string","title":"Resource Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"segment_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Segment Number"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"started_at":{"type":"string","title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"batch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id"},"progress":{"anyOf":[{"$ref":"#/components/schemas/JobProgress"},{"type":"null"}]}},"type":"object","required":["id","job_type","status","resource_type","resource_id","project_id","error_message","started_at","completed_at"],"title":"JobStatusRow"},"JobTemplateResponse":{"properties":{"job":{"type":"string","title":"Job"},"sections":{"items":{"$ref":"#/components/schemas/SectionMeta"},"type":"array","title":"Sections"}},"type":"object","required":["job","sections"],"title":"JobTemplateResponse"},"JobsStatusResponse":{"properties":{"server_time":{"type":"string","title":"Server Time"},"jobs":{"items":{"$ref":"#/components/schemas/JobStatusRow"},"type":"array","title":"Jobs"},"batches":{"items":{"$ref":"#/components/schemas/BatchProgress"},"type":"array","title":"Batches","default":[]}},"type":"object","required":["server_time","jobs"],"title":"JobsStatusResponse"},"LandingPathRow":{"properties":{"path":{"type":"string","title":"Path"},"visits":{"type":"integer","title":"Visits"}},"type":"object","required":["path","visits"],"title":"LandingPathRow"},"Lead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"url":{"type":"string","title":"Url"},"contact":{"type":"string","title":"Contact"},"stage":{"type":"string","title":"Stage"},"notes":{"type":"string","title":"Notes"},"source":{"type":"string","title":"Source"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"last_touch_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Touch At"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","type","url","contact","stage","notes","source","metadata","last_touch_at","created_at","updated_at"],"title":"Lead"},"LeadCreate":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","default":"other"},"url":{"type":"string","title":"Url","default":""},"contact":{"type":"string","title":"Contact","default":""},"notes":{"type":"string","title":"Notes","default":""},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}}},"type":"object","required":["name"],"title":"LeadCreate"},"LeadList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Lead"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"LeadList"},"LeadUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"LeadUpdate"},"LoginMethodRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"}},"type":"object","required":["email"],"title":"LoginMethodRequest"},"LoginMethodResponse":{"properties":{"oauth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Provider"}},"type":"object","title":"LoginMethodResponse"},"MarkPaidResponse":{"properties":{"paid_cents":{"type":"integer","title":"Paid Cents"}},"type":"object","required":["paid_cents"],"title":"MarkPaidResponse"},"MeResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"plan_id":{"type":"string","title":"Plan Id"},"api_access":{"type":"boolean","title":"Api Access"},"byok":{"type":"boolean","title":"Byok"}},"type":"object","required":["user_id","email","plan_id","api_access","byok"],"title":"MeResponse"},"MediaUploadResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"MediaUploadResponse"},"MetaBrowserContext":{"properties":{"fbp":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Fbp"},"fbc":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Fbc"},"source_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Source Url"}},"type":"object","title":"MetaBrowserContext","description":"What only the browser knows about a conversion, for the Meta\nConversions API (providers/meta_capi.py). The client IP and user agent come\noff the request itself; these ride in the body (lib/meta-browser.ts).\n\nEvery field is optional: an ad-blocked or cookieless browser has no _fbp,\nmost visitors never clicked an ad (no _fbc), and a stale frontend sends\nnothing at all — none of which may fail the request it rides on."},"ModelBreakdown":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ModelSpend"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ModelBreakdown"},"ModelDefaultRow":{"properties":{"job_type":{"type":"string","title":"Job Type"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"lip_sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lip Sync"},"model":{"type":"string","title":"Model"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["job_type","model","settings","updated_at"],"title":"ModelDefaultRow"},"ModelDefaultsResponse":{"properties":{"families":{"items":{"$ref":"#/components/schemas/ModelFamily"},"type":"array","title":"Families"},"defaults":{"items":{"$ref":"#/components/schemas/ModelDefaultRow"},"type":"array","title":"Defaults"}},"type":"object","required":["families","defaults"],"title":"ModelDefaultsResponse"},"ModelEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"estimate_blurb":{"type":"string","title":"Estimate Blurb"},"preflight_credits":{"type":"integer","title":"Preflight Credits"},"settings_schema":{"additionalProperties":true,"type":"object","title":"Settings Schema"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"lip_sync":{"type":"boolean","title":"Lip Sync","default":false}},"type":"object","required":["id","display_name","estimate_blurb","preflight_credits","settings_schema"],"title":"ModelEntryResponse"},"ModelFamily":{"properties":{"job_type":{"type":"string","title":"Job Type"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"lip_sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lip Sync"}},"type":"object","required":["job_type"],"title":"ModelFamily","description":"One (job_type, provider, lip_sync) family a default can be saved\nfor — the same triple GET /models is queried by."},"ModelSpend":{"properties":{"model":{"type":"string","title":"Model"},"provider":{"type":"string","title":"Provider"},"our_cost_usd":{"type":"number","title":"Our Cost Usd"},"byok_cost_usd":{"type":"number","title":"Byok Cost Usd"},"op_count":{"type":"integer","title":"Op Count"}},"type":"object","required":["model","provider","our_cost_usd","byok_cost_usd","op_count"],"title":"ModelSpend"},"ModelsResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelEntryResponse"},"type":"array","title":"Models"}},"type":"object","required":["models"],"title":"ModelsResponse"},"NarrationTimelineResponse":{"properties":{"blocks":{"items":{"$ref":"#/components/schemas/TimelineBlock"},"type":"array","title":"Blocks","default":[]},"total_duration_ms":{"type":"integer","title":"Total Duration Ms","default":0}},"type":"object","title":"NarrationTimelineResponse"},"OnboardingRequest":{"properties":{"marketing_opted_in":{"type":"boolean","title":"Marketing Opted In","default":false}},"type":"object","title":"OnboardingRequest"},"OnboardingResponse":{"properties":{"terms_accepted_at":{"type":"string","title":"Terms Accepted At"},"terms_version":{"type":"string","title":"Terms Version"}},"type":"object","required":["terms_accepted_at","terms_version"],"title":"OnboardingResponse"},"OnboardingSetupRequest":{"properties":{"youtube_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube Url"},"presets":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Presets"}},"type":"object","title":"OnboardingSetupRequest"},"OnboardingSetupResponse":{"properties":{"channel_id":{"type":"string","title":"Channel Id"},"style_id":{"type":"string","title":"Style Id"}},"type":"object","required":["channel_id","style_id"],"title":"OnboardingSetupResponse"},"PersistSectionRequest":{"properties":{"job_type":{"type":"string","title":"Job Type"},"section_id":{"type":"string","title":"Section Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"style_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style Id"},"asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Id"},"segment_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment Asset Id"},"voice_block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Block Id"},"value":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"title":"Value"}},"type":"object","required":["job_type","section_id","value"],"title":"PersistSectionRequest","description":"Write an entity-backed section's edited value to its subject row.\n\nExactly the scope id matching the job's subject is set (e.g. segment_asset_id\nfor segment_image). `value` is a string for `inputs` sections or\n`{\"asset_refs\": [{\"asset_id\", \"order\"}]}` for `asset_refs` sections."},"PlanPricing":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"tier":{"type":"string","title":"Tier"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"},"monthly_allowance":{"type":"integer","title":"Monthly Allowance"},"price_cents":{"type":"integer","title":"Price Cents"},"sale_price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sale Price Cents"},"max_channels":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Channels"}},"type":"object","required":["id","name","tier","period","monthly_allowance","price_cents","max_channels"],"title":"PlanPricing"},"PortalRequest":{"properties":{"plan_id":{"anyOf":[{"type":"string","enum":["creator_monthly","creator_quarterly","pro_monthly","pro_quarterly","studio_monthly","studio_quarterly","scale_monthly","scale_quarterly"]},{"type":"null"}],"title":"Plan Id"}},"type":"object","title":"PortalRequest"},"PortalResponse":{"properties":{"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["portal_url"],"title":"PortalResponse"},"PricingResponse":{"properties":{"operation_costs":{"additionalProperties":{"type":"string"},"type":"object","title":"Operation Costs"},"plans":{"items":{"$ref":"#/components/schemas/PlanPricing"},"type":"array","title":"Plans"},"credit_packs":{"items":{"$ref":"#/components/schemas/CreditPackPricing"},"type":"array","title":"Credit Packs"}},"type":"object","required":["operation_costs","plans","credit_packs"],"title":"PricingResponse"},"ProjectDirectorChatRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"message":{"type":"string","title":"Message"},"conversation_history":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Conversation History","default":[]}},"type":"object","required":["project_id","message"],"title":"ProjectDirectorChatRequest"},"ProjectDirectorChatResponse":{"properties":{"summary":{"type":"string","title":"Summary"},"scenes":{"items":{"$ref":"#/components/schemas/ProjectSceneEditResult"},"type":"array","title":"Scenes"}},"type":"object","required":["summary","scenes"],"title":"ProjectDirectorChatResponse"},"ProjectSceneEditResult":{"properties":{"scene_id":{"type":"string","title":"Scene Id"},"position":{"type":"integer","title":"Position"},"instruction":{"type":"string","title":"Instruction"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"mutation_count":{"type":"integer","title":"Mutation Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["scene_id","position","instruction","summary","mutation_count","error"],"title":"ProjectSceneEditResult"},"PromoteLeadResponse":{"properties":{"affiliate_id":{"type":"string","title":"Affiliate Id"},"lead":{"$ref":"#/components/schemas/Lead"}},"type":"object","required":["affiliate_id","lead"],"title":"PromoteLeadResponse","description":"Result of promoting a lead into the affiliate CRM."},"ProviderBreakdown":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProviderSpend"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ProviderBreakdown"},"ProviderKeyResponse":{"properties":{"provider":{"type":"string","title":"Provider"},"key_hint":{"type":"string","title":"Key Hint"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["provider","key_hint","created_at","updated_at"],"title":"ProviderKeyResponse"},"ProviderSpend":{"properties":{"provider":{"type":"string","title":"Provider"},"our_cost_usd":{"type":"number","title":"Our Cost Usd"},"byok_cost_usd":{"type":"number","title":"Byok Cost Usd"},"op_count":{"type":"integer","title":"Op Count"}},"type":"object","required":["provider","our_cost_usd","byok_cost_usd","op_count"],"title":"ProviderSpend"},"PublishRequest":{"properties":{"title":{"type":"string","maxLength":100,"minLength":1,"title":"Title"},"description":{"type":"string","maxLength":5000,"title":"Description","default":""},"tags":{"items":{"type":"string"},"type":"array","maxItems":60,"title":"Tags"},"privacy_status":{"type":"string","enum":["private","unlisted","public"],"title":"Privacy Status"},"made_for_kids":{"type":"boolean","title":"Made For Kids"},"contains_synthetic_media":{"type":"boolean","title":"Contains Synthetic Media"}},"type":"object","required":["title","privacy_status","made_for_kids","contains_synthetic_media"],"title":"PublishRequest","description":"The publish form. Limits are YouTube's own; the values are sent to\nYouTube exactly as given."},"PutModelDefaultRequest":{"properties":{"job_type":{"type":"string","title":"Job Type"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"lip_sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lip Sync"},"model":{"type":"string","title":"Model"},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}}},"type":"object","required":["job_type","model"],"title":"PutModelDefaultRequest"},"PutProviderKeyRequest":{"properties":{"key":{"type":"string","maxLength":500,"minLength":8,"title":"Key"}},"type":"object","required":["key"],"title":"PutProviderKeyRequest"},"RedemptionRow":{"properties":{"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"amount_discount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Discount Cents"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["created_at"],"title":"RedemptionRow"},"RegisterRequest":{"properties":{"redirect_uris":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Redirect Uris"},"client_name":{"type":"string","maxLength":100,"title":"Client Name","default":"MCP client"}},"type":"object","required":["redirect_uris"],"title":"RegisterRequest"},"RegisteredResponse":{"properties":{"received":{"type":"boolean","title":"Received","default":true}},"type":"object","title":"RegisteredResponse"},"RescanVoiceBlocksRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"}},"type":"object","required":["project_id"],"title":"RescanVoiceBlocksRequest"},"ResumeResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"ResumeResponse"},"ReviseScriptRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"selected_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Text"},"instruction":{"type":"string","title":"Instruction"},"full_script":{"type":"string","title":"Full Script"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"type":"object","required":["project_id","instruction","full_script"],"title":"ReviseScriptRequest"},"ReviseScriptResponse":{"properties":{"revised_text":{"type":"string","title":"Revised Text"}},"type":"object","required":["revised_text"],"title":"ReviseScriptResponse"},"RollbackAssetRequest":{"properties":{"index":{"type":"integer","title":"Index","default":0}},"type":"object","title":"RollbackAssetRequest"},"RunList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AutomationRun"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"RunList"},"SaveScriptRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"content":{"type":"string","title":"Content"}},"type":"object","required":["project_id","content"],"title":"SaveScriptRequest"},"SaveScriptResponse":{"properties":{"script_id":{"type":"string","title":"Script Id"},"version":{"type":"integer","title":"Version"}},"type":"object","required":["script_id","version"],"title":"SaveScriptResponse"},"SectionMeta":{"properties":{"id":{"type":"string","title":"Id"},"order":{"type":"integer","title":"Order"},"kind":{"type":"string","title":"Kind"},"render":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"from_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"From Paths"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"entity_backed":{"type":"boolean","title":"Entity Backed","default":false}},"type":"object","required":["id","order","kind"],"title":"SectionMeta"},"SegmentAssetJob":{"properties":{"segment_asset_id":{"type":"string","title":"Segment Asset Id"},"job_id":{"type":"string","title":"Job Id"}},"type":"object","required":["segment_asset_id","job_id"],"title":"SegmentAssetJob"},"SegmentAssetTarget":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"segment_asset_id":{"type":"string","title":"Segment Asset Id"}},"type":"object","required":["segment_asset_id"],"title":"SegmentAssetTarget"},"SegmentOperationResponse":{"properties":{"segments":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Segments"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"},"preview":{"anyOf":[{"$ref":"#/components/schemas/TransitionPreview"},{"type":"null"}]}},"type":"object","required":["segments"],"title":"SegmentOperationResponse","description":"Response for all segment operations. A dry_run returns `preview` with\nan empty `segments` list; a real run returns the mutated segments."},"SegmentVideoEstimateRequest":{"properties":{"subject_id":{"type":"string","title":"Subject Id"},"model":{"type":"string","title":"Model"},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}}},"type":"object","required":["subject_id","model"],"title":"SegmentVideoEstimateRequest"},"SegmentVideoEstimateResponse":{"properties":{"credits":{"type":"integer","title":"Credits"},"byok":{"type":"boolean","title":"Byok"},"clip_seconds":{"type":"integer","title":"Clip Seconds"},"segment_seconds":{"type":"number","title":"Segment Seconds"}},"type":"object","required":["credits","byok","clip_seconds","segment_seconds"],"title":"SegmentVideoEstimateResponse"},"SelectThumbnailRequest":{"properties":{"thumbnail_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Id"}},"type":"object","title":"SelectThumbnailRequest"},"SetContinuesFromRequest":{"properties":{"source_asset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Asset Id"}},"type":"object","title":"SetContinuesFromRequest"},"SetSegmentContinuesFromRequest":{"properties":{"source_segment_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Segment Number"}},"type":"object","title":"SetSegmentContinuesFromRequest"},"SetVoiceBody":{"properties":{"voice_id":{"type":"string","title":"Voice Id"}},"type":"object","required":["voice_id"],"title":"SetVoiceBody"},"SignupRequest":{"properties":{"code":{"type":"string","maxLength":64,"minLength":1,"title":"Code"}},"type":"object","required":["code"],"title":"SignupRequest","description":"The ?ref= code a new account's browser carried in, sent once on that\naccount's first session. Untrusted, like ClickRequest.code — resolved\nserver-side against active codes."},"SignupResponse":{"properties":{"received":{"type":"boolean","title":"Received","default":true}},"type":"object","title":"SignupResponse"},"SignupStats":{"properties":{"total":{"type":"integer","title":"Total"},"last_30_days":{"type":"integer","title":"Last 30 Days"},"paying_customers":{"type":"integer","title":"Paying Customers"}},"type":"object","required":["total","last_30_days","paying_customers"],"title":"SignupStats","description":"Accounts created through the affiliate's link (migration 0195).\n\nVisibility only: a signup earns nothing by itself. Commission comes from a\nsubscription bought with the code applied at checkout (ToS 3.2)."},"SovAdminResponse":{"properties":{"generated_at":{"type":"string","title":"Generated At"},"months":{"items":{"$ref":"#/components/schemas/SovMonth"},"type":"array","title":"Months"},"prompts":{"items":{"$ref":"#/components/schemas/SovPromptRow"},"type":"array","title":"Prompts"}},"type":"object","required":["generated_at","months","prompts"],"title":"SovAdminResponse","description":"Public /public/sov-index aggregate (months, branded rows excluded)\nplus per-prompt detail for the latest three months."},"SovIndexResponse":{"properties":{"generated_at":{"type":"string","title":"Generated At"},"months":{"items":{"$ref":"#/components/schemas/SovMonth"},"type":"array","title":"Months"}},"type":"object","required":["generated_at","months"],"title":"SovIndexResponse"},"SovMonth":{"properties":{"month":{"type":"string","title":"Month"},"engines":{"items":{"$ref":"#/components/schemas/EngineMonth"},"type":"array","title":"Engines"}},"type":"object","required":["month","engines"],"title":"SovMonth"},"SovPromptRow":{"properties":{"run_at":{"type":"string","title":"Run At"},"month":{"type":"string","title":"Month"},"engine":{"type":"string","title":"Engine"},"prompt_id":{"type":"string","title":"Prompt Id"},"category":{"type":"string","title":"Category"},"prompt":{"type":"string","title":"Prompt"},"brands_mentioned":{"items":{"type":"string"},"type":"array","title":"Brands Mentioned"},"cited_domains":{"items":{"type":"string"},"type":"array","title":"Cited Domains"},"framesail_mentioned":{"type":"boolean","title":"Framesail Mentioned"},"our_channel_cited":{"type":"boolean","title":"Our Channel Cited"},"error":{"type":"string","title":"Error"}},"type":"object","required":["run_at","month","engine","prompt_id","category","prompt","brands_mentioned","cited_domains","framesail_mentioned","our_channel_cited","error"],"title":"SovPromptRow","description":"One prompt x engine x run result. Unlike the public endpoint, branded\nrows are included — the internal view sees everything."},"SplitSegmentRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"Preview the operation's consequences (assets kept / staled / recreated / deleted, jobs cancelled, rendered assets lost) without applying it.","default":false},"offsets_ms":{"items":{"type":"integer"},"type":"array","maxItems":3,"minItems":1,"title":"Offsets Ms","description":"Time offsets within the segment's duration to cut at (ms). 1 offset = 2 segments, 2 offsets = 3, 3 offsets = 4."},"inherit_index":{"type":"integer","title":"Inherit Index","description":"Which resulting segment (0-indexed) inherits the original's creative data. Others get new creative data via update_segment job.","default":0}},"type":"object","required":["offsets_ms"],"title":"SplitSegmentRequest","description":"Split a segment into 2-4 parts at the given time offsets."},"StyleDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"channel_id":{"type":"string","title":"Channel Id"},"name":{"type":"string","title":"Name"},"inputs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Inputs","default":[]},"fields":{"additionalProperties":true,"type":"object","title":"Fields","default":{}},"inputs_stale":{"type":"boolean","title":"Inputs Stale","default":false},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"templates_stale":{"type":"boolean","title":"Templates Stale"}},"type":"object","required":["id","channel_id","name","templates_stale"],"title":"StyleDetailResponse","description":"GET /styles/{id}: the style plus `templates_stale` — a template image\nwas rendered from art_style text the style no longer has (see\nhandlers.styles.templates_stale). Drives the \"Changed since render\"\nnudge on the Image templates tab."},"StyleResponse":{"properties":{"id":{"type":"string","title":"Id"},"channel_id":{"type":"string","title":"Channel Id"},"name":{"type":"string","title":"Name"},"inputs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Inputs","default":[]},"fields":{"additionalProperties":true,"type":"object","title":"Fields","default":{}},"inputs_stale":{"type":"boolean","title":"Inputs Stale","default":false},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","channel_id","name"],"title":"StyleResponse","description":"Public style shape returned to the frontend.\n\n`fields` is included so the frontend can render content from a single\nquery — no separate /analysis endpoint needed. \"Analysis done\" is\n`fields.art_style.value` non-empty; \"in flight\" is an ai_jobs row\nobserved by useJobWatcher (keyed on style_id)."},"Task":{"properties":{"id":{"type":"string","title":"Id"},"board":{"type":"string","title":"Board"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"title":{"type":"string","title":"Title"},"brief":{"type":"string","title":"Brief"},"platform":{"type":"string","title":"Platform"},"content_type":{"type":"string","title":"Content Type"},"status":{"type":"string","title":"Status"},"assignee":{"type":"string","title":"Assignee"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"source":{"type":"string","title":"Source"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","board","campaign_id","title","brief","platform","content_type","status","assignee","due_date","source","tags","sort_order","payload","completed_at","created_at","updated_at"],"title":"Task"},"TaskCreate":{"properties":{"title":{"type":"string","title":"Title"},"board":{"type":"string","title":"Board","default":"content"},"brief":{"type":"string","title":"Brief","default":""},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"platform":{"type":"string","title":"Platform","default":""},"content_type":{"type":"string","title":"Content Type","default":""},"status":{"type":"string","title":"Status","default":"idea"},"assignee":{"type":"string","title":"Assignee","default":""},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"source":{"type":"string","title":"Source","default":"manual"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"},"payload":{"additionalProperties":true,"type":"object","title":"Payload","default":{}}},"type":"object","required":["title"],"title":"TaskCreate"},"TaskList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Task"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"TaskList"},"TaskUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"board":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Board"},"brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brief"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"assignee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"sort_order":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sort Order"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","title":"TaskUpdate"},"ThumbnailListResponse":{"properties":{"active_thumbnail_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Thumbnail Id"},"thumbnails":{"items":{"$ref":"#/components/schemas/ThumbnailResponse"},"type":"array","title":"Thumbnails"},"parts":{"items":{"$ref":"#/components/schemas/ThumbnailResponse"},"type":"array","title":"Parts"},"channel_thumbnails":{"items":{"$ref":"#/components/schemas/ChannelThumbnailResponse"},"type":"array","title":"Channel Thumbnails"}},"type":"object","required":["active_thumbnail_id","thumbnails","parts","channel_thumbnails"],"title":"ThumbnailListResponse"},"ThumbnailReference":{"properties":{"kind":{"type":"string","enum":["asset","segment_asset","thumbnail"],"title":"Kind"},"id":{"type":"string","title":"Id"}},"type":"object","required":["kind","id"],"title":"ThumbnailReference"},"ThumbnailResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"kind":{"type":"string","title":"Kind"},"image_url":{"type":"string","title":"Image Url"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"reference_refs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reference Refs","default":[]},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"design":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Design"},"source_thumbnail_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Thumbnail Id"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","project_id","kind","image_url","created_at","updated_at"],"title":"ThumbnailResponse","description":"Public thumbnail shape — the column allowlist (project_thumbnails is\nbackend-only, like assets)."},"TimelineBlock":{"properties":{"block_index":{"type":"integer","title":"Block Index"},"speaker":{"type":"string","title":"Speaker"},"text":{"type":"string","title":"Text"},"type":{"type":"string","title":"Type"},"duration_ms":{"type":"integer","title":"Duration Ms"},"cumulative_start_ms":{"type":"integer","title":"Cumulative Start Ms"},"subtitle_data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Subtitle Data"}},"type":"object","required":["block_index","speaker","text","type","duration_ms","cumulative_start_ms"],"title":"TimelineBlock"},"Timeseries":{"properties":{"bucket":{"type":"string","title":"Bucket"},"points":{"items":{"$ref":"#/components/schemas/TimeseriesPoint"},"type":"array","title":"Points"}},"type":"object","required":["bucket","points"],"title":"Timeseries"},"TimeseriesPoint":{"properties":{"bucket":{"type":"string","title":"Bucket"},"our_cost_usd":{"type":"number","title":"Our Cost Usd"},"byok_cost_usd":{"type":"number","title":"Byok Cost Usd"},"op_count":{"type":"integer","title":"Op Count"}},"type":"object","required":["bucket","our_cost_usd","byok_cost_usd","op_count"],"title":"TimeseriesPoint"},"TopUpRequest":{"properties":{"pack_id":{"type":"string","enum":["small","medium","large","xl"],"title":"Pack Id"},"meta":{"$ref":"#/components/schemas/MetaBrowserContext","default":{}}},"type":"object","required":["pack_id"],"title":"TopUpRequest"},"TransitionPreview":{"properties":{"kept":{"type":"integer","title":"Kept"},"stale":{"type":"integer","title":"Stale"},"recreated":{"type":"integer","title":"Recreated"},"deleted":{"type":"integer","title":"Deleted"},"jobs_cancelled":{"type":"integer","title":"Jobs Cancelled"},"rendered_assets_lost":{"items":{"type":"string"},"type":"array","title":"Rendered Assets Lost","description":"What each already-rendered asset this operation destroys is (image, clip, real photo, ...), named by generation.roles.asset_label."}},"type":"object","required":["kept","stale","recreated","deleted","jobs_cancelled"],"title":"TransitionPreview","description":"dry_run disclosure for a destructive segment operation — one payload\nshape for every op and every surface (storyboard UI, editor, MCP)."},"UpdateAffiliateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle"},"main_platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Main Platform"},"outreach_platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outreach Platform"},"contact_left":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Left"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"payout_method":{"anyOf":[{"type":"string","enum":["paypal","wise"]},{"type":"null"}],"title":"Payout Method"},"payout_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Handle"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","title":"UpdateAffiliateRequest"},"UpdateAssetBody":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdateAssetBody"},"UpdateMusicTrackRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"loop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Loop"},"start_frame":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Frame"},"duration_frames":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Frames"},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position"},"trim_start_frame":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trim Start Frame"},"trim_end_frame":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trim End Frame"}},"type":"object","title":"UpdateMusicTrackRequest"},"UpdateSceneRequest":{"properties":{"edits":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Edits"},"layers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Layers"}},"type":"object","required":["edits","layers"],"title":"UpdateSceneRequest","description":"The user's side of a scene: `edits` maps a generated layer's id (or\n\"scene\") to the fields they changed on it; `layers` are the layers they\nadded."},"UpdateSegmentAssetRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"UpdateSegmentAssetRequest"},"UpdateSegmentContentRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"Preview the operation's consequences (assets kept / staled / recreated / deleted, jobs cancelled, rendered assets lost) without applying it.","default":false},"user_input":{"type":"string","title":"User Input","description":"User's feedback or instruction for what to change."}},"type":"object","required":["user_input"],"title":"UpdateSegmentContentRequest","description":"Rewrite a segment's creative direction based on user feedback."},"UpdateSegmentPromptsRequest":{"properties":{"image_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Prompt","description":"The segment's image prompt (every segment; the real-photo fallback too)."},"video_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Prompt","description":"Motion/video prompt (video segments / b-roll fallback)."},"media_queries":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Media Queries","description":"Stock-search queries for fetched media (real b-roll / real photo segments). Replaces the segment's media_query.queries verbatim; the fetched media changes when the segment is fetched again."}},"type":"object","title":"UpdateSegmentPromptsRequest","description":"Directly set a segment's final prompts — no LLM rewrite.\n\nOnly the fields provided are touched; each one is written verbatim to\ndirector_payload and mirrored onto the matching segment_assets\nconfig.description (the text the renderer actually reads). Renders keep\ntheir status: the new prompts apply when the segment renders again."},"UpdateVoiceBlockRequest":{"properties":{"volume":{"type":"number","title":"Volume"}},"type":"object","required":["volume"],"title":"UpdateVoiceBlockRequest"},"UserBreakdown":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserSpend"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"UserBreakdown"},"UserSpend":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"plan_id":{"type":"string","title":"Plan Id"},"sub_status":{"type":"string","title":"Sub Status"},"billing_state":{"type":"string","enum":["paid","inactive"],"title":"Billing State"},"our_cost_usd":{"type":"number","title":"Our Cost Usd"},"byok_cost_usd":{"type":"number","title":"Byok Cost Usd"},"op_count":{"type":"integer","title":"Op Count"},"revenue_usd":{"type":"number","title":"Revenue Usd"},"margin_usd":{"type":"number","title":"Margin Usd"}},"type":"object","required":["user_id","email","full_name","plan_id","sub_status","billing_state","our_cost_usd","byok_cost_usd","op_count","revenue_usd","margin_usd"],"title":"UserSpend"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VoiceBlockRow":{"properties":{"id":{"type":"string","title":"Id"},"script_id":{"type":"string","title":"Script Id"},"project_id":{"type":"string","title":"Project Id"},"block_index":{"type":"integer","title":"Block Index"},"speaker":{"type":"string","title":"Speaker"},"text":{"type":"string","title":"Text"},"type":{"type":"string","enum":["narration","dialogue"],"title":"Type"},"scene_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scene Direction"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"audio_storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Storage Path"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"subtitle_data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Subtitle Data"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"}},"type":"object","required":["id","script_id","project_id","block_index","speaker","text","type"],"title":"VoiceBlockRow"},"VoiceBlockTarget":{"properties":{"model":{"type":"string","title":"Model","default":""},"editable_sections":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"object","title":"Editable Sections","default":{}},"settings":{"additionalProperties":true,"type":"object","title":"Settings","default":{}},"voice_block_id":{"type":"string","title":"Voice Block Id"}},"type":"object","required":["voice_block_id"],"title":"VoiceBlockTarget"},"VoiceBlocksResponse":{"properties":{"blocks":{"items":{"$ref":"#/components/schemas/VoiceBlockRow"},"type":"array","title":"Blocks","default":[]},"total_duration_ms":{"type":"integer","title":"Total Duration Ms","default":0},"all_complete":{"type":"boolean","title":"All Complete","default":false}},"type":"object","title":"VoiceBlocksResponse"},"VoiceInfoResponse":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"group":{"type":"string","title":"Group","default":"Premade"}},"type":"object","required":["id","label"],"title":"VoiceInfoResponse"},"VoiceSettingsBody":{"properties":{"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"voice_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Voice Settings"},"voice_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Description"},"narrator_voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narrator Voice Id"}},"type":"object","title":"VoiceSettingsBody"},"VoicesResponse":{"properties":{"voices":{"items":{"$ref":"#/components/schemas/VoiceInfoResponse"},"type":"array","title":"Voices"}},"type":"object","required":["voices"],"title":"VoicesResponse"},"YouTubeAccess":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"YouTubeAccess"},"YouTubeAnalytics":{"properties":{"totals":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Totals"},"daily":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Daily"}},"type":"object","required":["totals","daily"],"title":"YouTubeAnalytics","description":"YouTube Analytics rows as YouTube returned them, keyed by metric name.\n`totals` is null when YouTube has no data for the period yet."},"YouTubeConnection":{"properties":{"channel_id":{"type":"string","title":"Channel Id"},"youtube_channel_id":{"type":"string","title":"Youtube Channel Id"},"title":{"type":"string","title":"Title"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"connected_at":{"type":"string","title":"Connected At"}},"type":"object","required":["channel_id","youtube_channel_id","title","avatar_url","connected_at"],"title":"YouTubeConnection"},"YouTubePublication":{"properties":{"id":{"type":"string","title":"Id"},"youtube_video_id":{"type":"string","title":"Youtube Video Id"},"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"},"privacy_status":{"type":"string","title":"Privacy Status"},"published_at":{"type":"string","title":"Published At"}},"type":"object","required":["id","youtube_video_id","url","title","privacy_status","published_at"],"title":"YouTubePublication"},"schemas__admin_affiliates__CommissionRow":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"net_revenue_cents":{"type":"integer","title":"Net Revenue Cents"},"rate_bps":{"type":"integer","title":"Rate Bps"},"commission_cents":{"type":"integer","title":"Commission Cents"},"reversed_cents":{"type":"integer","title":"Reversed Cents"},"is_first_payment":{"type":"boolean","title":"Is First Payment"},"billing_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Reason"},"created_at":{"type":"string","title":"Created At"},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved At"},"paid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid At"}},"type":"object","required":["id","type","status","net_revenue_cents","rate_bps","commission_cents","reversed_cents","is_first_payment","created_at"],"title":"CommissionRow","description":"A ledger row as the admin drill-down shows it. Mirrors the affiliate's\nown view (schemas/affiliate_portal.CommissionRow) so the two can be read\nside by side without translating fields."},"schemas__admin_affiliates__TierProgress":{"properties":{"next_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Tier"},"next_rate_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Rate Bps"},"revenue_cents":{"type":"integer","title":"Revenue Cents","default":0},"revenue_target_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revenue Target Cents"}},"type":"object","title":"TierProgress"},"schemas__affiliate_portal__CommissionRow":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"net_revenue_cents":{"type":"integer","title":"Net Revenue Cents"},"rate_bps":{"type":"integer","title":"Rate Bps"},"commission_cents":{"type":"integer","title":"Commission Cents"},"reversed_cents":{"type":"integer","title":"Reversed Cents"},"is_first_payment":{"type":"boolean","title":"Is First Payment"},"billing_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Reason"},"created_at":{"type":"string","title":"Created At"},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved At"},"paid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid At"}},"type":"object","required":["id","type","status","net_revenue_cents","rate_bps","commission_cents","reversed_cents","is_first_payment","created_at"],"title":"CommissionRow"},"schemas__affiliate_portal__TierProgress":{"properties":{"next_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Tier"},"next_rate_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Rate Bps"},"revenue_cents":{"type":"integer","title":"Revenue Cents"},"revenue_target_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revenue Target Cents"}},"type":"object","required":["revenue_cents"],"title":"TierProgress","description":"Progress toward the next tier — cumulative approved revenue only\n(TOS 3.1.1). The referral count is a stat on AffiliateStats, not a gate."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}