openapi: 3.1.0 info: title: sizzle-server general videos API version: 1.0.0 servers: - url: /api/v1 tags: - name: videos paths: /videos: get: tags: - videos summary: List Videos description: Get videos operationId: list_videos_videos_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/VideoResponse' type: array title: Response List Videos Videos Get security: - APIKeyHeader: [] post: tags: - videos summary: Create Video description: Create a video based on a source draft or a recipe_id operationId: create_video_videos_post requestBody: content: application/json: schema: $ref: '#/components/schemas/InitiatorVideoRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VideoResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /videos/{video_id}: get: tags: - videos summary: Get Video By Id description: Get video by id operationId: get_video_by_id_videos__video_id__get parameters: - required: true schema: type: string title: Video Id name: video_id in: path responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VideoResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] delete: tags: - videos summary: Delete Video By Id description: Delete video by id operationId: delete_video_by_id_videos__video_id__delete parameters: - required: true schema: type: string title: Video Id name: video_id in: path responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /videos/{video_id}/subtitles: post: tags: - videos summary: Create Subtitles description: Create subtitles operationId: create_subtitles_videos__video_id__subtitles_post parameters: - required: true schema: type: string title: Video Id name: video_id in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/SubtitlesApiRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SubtitlesApiResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] /videos/{video_id}/metadata: get: tags: - videos summary: Get Video Metadata description: Get video by id operationId: get_video_metadata_videos__video_id__metadata_get parameters: - required: true schema: type: string title: Video Id name: video_id in: path responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VideoMetadataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] components: schemas: SubtitlesApiRequest: properties: language_code: $ref: '#/components/schemas/SupportedTranslationSubtitlesLanguagesCode' format: allOf: - $ref: '#/components/schemas/SubtitlesFileExtension' default: vtt type: object required: - language_code title: SubtitlesApiRequest SupportedTranslationSubtitlesLanguagesCode: type: string enum: - en - es - de - pt - it - fr - nl - ja - tr - pl - hu - cz - he - zh - hi - ru - ko - ar title: SupportedTranslationSubtitlesLanguagesCode description: An enumeration. VideoResponse: properties: id: type: string title: Id name: type: string title: Name status: $ref: '#/components/schemas/VideoStatusEnum' progress: type: integer maximum: 100.0 minimum: -1.0 title: Progress description: The videos rendering progress default: 0 req_id: type: string title: Req Id draft_id: type: string title: Draft Id description: The id of the project created by this video request source_draft_id: type: string title: Source Draft Id recipe_id: type: string title: Recipe Id template_id: type: string title: Template Id palette_id: type: string title: Palette Id description: The palette_id used in this video character_id: type: string title: Character Id description: The character_id used in this video voice_id: type: string title: Voice Id description: The character_id used in this video scenes: anyOf: - items: $ref: '#/components/schemas/VideoScene' type: array - items: $ref: '#/components/schemas/NewVideoScene' type: array title: Scenes description: The videos scene description video_player_url: type: string title: Video Player Url description: the final videos url download_url: type: string title: Download Url metadata: additionalProperties: anyOf: - type: string - type: integer - type: boolean type: object title: Metadata description: request metadata correlation_id: type: string title: Correlation Id description: request correlation id palette: items: $ref: '#/components/schemas/RequestPalette' type: array title: Palette global_media_elements: items: $ref: '#/components/schemas/SceneMediaAttribute' type: array title: Global Media Elements type: object required: - id - status - req_id - draft_id - video_player_url title: VideoResponse SubtitlesApiResponse: properties: language_code: $ref: '#/components/schemas/SupportedTranslationSubtitlesLanguagesCode' format: allOf: - $ref: '#/components/schemas/SubtitlesFileExtension' default: vtt url: type: string title: Url type: object required: - language_code - url title: SubtitlesApiResponse VideoScene: properties: name: type: string title: Name description: The name of this scene. type: type: string enum: - override_scene title: Type default: override_scene media: items: type: string type: array title: Media description: This array will contain image/video urls which will be used as this scenes media attributes such as background images and videos. If the number of media assets in this array exceeds the current layouts amount of assets, the extra assets will be dismissed. If the number of media assets provided in this array is smaller then the amount of assets the layout supports, the base projects default values will be chosen texts: items: type: string type: array title: Texts description: 'This array will contain text values which will be used as this scenes text attributes such as titles. If the number of text assets in this array exceeds the current layouts amount of text assets, the extra assets will be dismissed.If the number of media assets provided in this array is smaller then the amount of assets the layout supports, the base projects default values will be chosen ' transcript: type: string maxLength: 1000 title: Transcript description: This scenes transcript. must contain less than 500 characters voice_recording_url: type: string title: Voice Recording Url description: This scenes voice recording url. type: object required: - name title: VideoScene NewVideoScene: properties: name: type: string title: Name description: The name of this scene. type: type: string enum: - create_scene title: Type default: create_scene layout_id: type: string title: Layout Id description: The layout on the video media_elements: items: $ref: '#/components/schemas/SceneMediaAttribute' type: array title: Media Elements description: This array will contain image/video urls which will be used as this scenes media attributes such as background images and videos. If the number of media assets in this array exceeds the current layouts amount of assets, the extra assets will be dismissed. If the number of media assets provided in this array is smaller then the amount of assets the layout supports, the base projects default values will be chosen texts_elements: items: $ref: '#/components/schemas/SceneTextAttribute' type: array title: Texts Elements description: 'This array will contain text values which will be used as this scenes text attributes such as titles. If the number of text assets in this array exceeds the current layouts amount of text assets, the extra assets will be dismissed.If the number of media assets provided in this array is smaller then the amount of assets the layout supports, the base projects default values will be chosen ' transcript: type: string maxLength: 1000 title: Transcript description: This scenes transcript. must contain less than 500 characters voice_recording_url: type: string title: Voice Recording Url description: This scenes voice recording url. type: object required: - name - layout_id title: NewVideoScene SceneMediaAttribute: properties: id: type: string title: Id url: type: string maxLength: 2083 minLength: 1 format: uri title: Url media_id: type: string title: Media Id type: object title: SceneMediaAttribute HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError VariableMapping: properties: name: type: string title: Name variable_id: type: string title: Variable Id value: type: string title: Value type: object required: - value title: VariableMapping SubtitlesFileExtension: type: string enum: - vtt - srt title: SubtitlesFileExtension description: An enumeration. RequestPalette: properties: color: type: string pattern: ^#?(?:[0-9A-Fa-f]{8}|[0-9A-Fa-f]{6})$ title: Color type: object required: - color title: RequestPalette VideoStatusEnum: type: string enum: - started - processing - ready - published - failed - not_started - stopped - cancelled title: VideoStatusEnum description: An enumeration. NewVideoRequest: properties: type: type: string enum: - create title: Type name: type: string title: Name description: The name of the project created by this request template_id: type: string title: Template Id description: The id of the recipe your video will be based on. folder_id: type: string title: Folder Id description: The id of the folder your video will be based on. palette_id: type: string title: Palette Id description: The palette_id of a color-palette you would like to use instead of the source project one. if no value is given, the source projects color-palette will be used. character_id: type: string title: Character Id description: The character_id of a character you would like to use instead of the source projects one. if no value is given, the source projects character will be used. voice_id: type: string title: Voice Id description: The id of a voice you would like to use instead of the source projects one. if no value is given, the source projects voice will be used. scenes: items: $ref: '#/components/schemas/NewVideoScene' type: array minItems: 1 title: Scenes description: 'Each object in this array will represent a scene in the final video. the video will be generated based on this arrays order (the first object in this array will represent the first scene in the video etc.). The length of this array must be equal to the number of the source projects scenes. ' global_media_elements: items: $ref: '#/components/schemas/SceneMediaAttribute' type: array title: Global Media Elements description: The array will contain global media values of the video palette: items: $ref: '#/components/schemas/RequestPalette' type: array title: Palette metadata: additionalProperties: anyOf: - type: string - type: integer - type: boolean type: object title: Metadata description: request metadata correlation_id: type: string maxLength: 100 title: Correlation Id description: request correlation id type: object required: - type - template_id - character_id - voice_id - scenes title: NewVideoRequest InitiatorVideoRequest: oneOf: - $ref: '#/components/schemas/OverrideVideoRequest' - $ref: '#/components/schemas/NewVideoRequest' - $ref: '#/components/schemas/WorkflowVideoRequest' title: InitiatorVideoRequest discriminator: propertyName: type mapping: override: '#/components/schemas/OverrideVideoRequest' create: '#/components/schemas/NewVideoRequest' workflow: '#/components/schemas/WorkflowVideoRequest' OverrideVideoRequest: properties: type: type: string enum: - override title: Type name: type: string title: Name description: The name of the project created by this request source_draft_id: type: string title: Source Draft Id description: The id of the project your video will be based on. recipe_id: type: string title: Recipe Id description: The id of the recipe your video will be based on. folder_id: type: string title: Folder Id description: The id of the folder your video will be based on. palette_id: type: string title: Palette Id description: The palette_id of a color-palette you would like to use instead of the source project one. if no value is given, the source projects color-palette will be used. character_id: type: string title: Character Id description: The character_id of a character you would like to use instead of the source projects one. if no value is given, the source projects character will be used. voice_id: type: string title: Voice Id description: The id of a voice you would like to use instead of the source projects one. if no value is given, the source projects voice will be used. scenes: items: $ref: '#/components/schemas/VideoScene' type: array title: Scenes description: 'Each object in this array will represent a scene in the final video. the video will be generated based on this arrays order (the first object in this array will represent the first scene in the video etc.). The length of this array must be equal to the number of the source projects scenes. ' logo_url: type: string title: Logo Url description: The url of the logo you would like to use instead of the source projects one. if no value is given, the source projects logo will be used. metadata: additionalProperties: anyOf: - type: string - type: integer - type: boolean type: object title: Metadata description: request metadata correlation_id: type: string maxLength: 100 title: Correlation Id description: request correlation id type: object required: - type - scenes title: OverrideVideoRequest ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError VideoMetadataResponse: properties: duration: type: number title: Duration scenes_metadata: items: $ref: '#/components/schemas/SceneMetadataResponse' type: array title: Scenes Metadata type: object required: - duration - scenes_metadata title: VideoMetadataResponse SceneTextAttribute: properties: id: type: string title: Id text: type: string title: Text type: object required: - text title: SceneTextAttribute WorkflowVideoRequest: properties: type: type: string enum: - workflow title: Type workflow_id: type: string title: Workflow Id description: The id of the workflow your video will be based on. variables: items: $ref: '#/components/schemas/VariableMapping' type: array title: Variables description: The variables of the workflow correlation_id: type: string maxLength: 100 title: Correlation Id description: request correlation id metadata: additionalProperties: anyOf: - type: string - type: integer - type: boolean type: object title: Metadata description: request metadata type: object required: - type - workflow_id - variables title: WorkflowVideoRequest SceneMetadataResponse: properties: scene_index: type: integer title: Scene Index start_time: type: number title: Start Time duration: type: number title: Duration type: object required: - scene_index - start_time - duration title: SceneMetadataResponse securitySchemes: APIKeyHeader: type: apiKey in: header name: api-key HTTPBearer: type: http scheme: bearer