/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { HeygenTemplateRequest } from '../models/HeygenTemplateRequest'; import type { HeygenTemplateResponseSingle } from '../models/HeygenTemplateResponseSingle'; import type { HeygenVideoDetail } from '../models/HeygenVideoDetail'; import type { HeygenVideoRequest } from '../models/HeygenVideoRequest'; import type { PaginatedHeygenMarketingVideoListList } from '../models/PaginatedHeygenMarketingVideoListList'; import type { PaginatedHeygenTemplateResponseSingleList } from '../models/PaginatedHeygenTemplateResponseSingleList'; import type { PaginatedVeoVideoListList } from '../models/PaginatedVeoVideoListList'; import type { VeoVideoDetail } from '../models/VeoVideoDetail'; import type { VeoVideoRequest } from '../models/VeoVideoRequest'; import type { VideoCaption } from '../models/VideoCaption'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class AiMediaService { /** * API view to list or append Heygen template ids for a tenant. * @returns PaginatedHeygenTemplateResponseSingleList * @throws ApiError */ public static aiMediaOrgsUsersHeygenTemplatesList({ org, userId, page, }: { org: string, userId: string, /** * A page number within the paginated result set. */ page?: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/templates/', path: { 'org': org, 'user_id': userId, }, query: { 'page': page, }, }); } /** * Endpoint to add a Heygen template id to an org. * * Only platform admins have access to this endpoint. * @returns HeygenTemplateResponseSingle * @throws ApiError */ public static aiMediaOrgsUsersHeygenTemplatesCreate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: HeygenTemplateRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/templates/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Endpoint to delete a Heygen template id for an org. * * * The reponse status code is always 204 when no error. * * * Only platform admins have access to this endpoint. * @returns void * @throws ApiError */ public static aiMediaOrgsUsersHeygenTemplatesDestroy({ org, templateName, userId, }: { org: string, templateName: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/templates/{template_name}/', path: { 'org': org, 'template_name': templateName, 'user_id': userId, }, }); } /** * Endpoint to download caption for a video. * @returns any No response body * @throws ApiError */ public static aiMediaOrgsUsersHeygenVideoCaptionsRetrieve({ heygenMarketingVideoId, org, userId, }: { heygenMarketingVideoId: string, org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/video-captions/{heygen_marketing_video_id}/', path: { 'heygen_marketing_video_id': heygenMarketingVideoId, 'org': org, 'user_id': userId, }, }); } /** * Endpoint to upload a new caption for a generated video. * * Only platform admins have access to this endpoint. * @returns HeygenVideoDetail * @throws ApiError */ public static aiMediaOrgsUsersHeygenVideoCaptionsCreate({ heygenMarketingVideoId, org, userId, formData, }: { heygenMarketingVideoId: string, org: string, userId: string, formData: VideoCaption, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/video-captions/{heygen_marketing_video_id}/', path: { 'heygen_marketing_video_id': heygenMarketingVideoId, 'org': org, 'user_id': userId, }, formData: formData, mediaType: 'multipart/form-data', }); } /** * Endpoint used to download a heygen video. * * * Only platform admins have access to this endpoint. * @returns any No response body * @throws ApiError */ public static aiMediaOrgsUsersHeygenVideoDownloadRetrieve({ heygenMarketingVideoId, org, userId, }: { heygenMarketingVideoId: string, org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/video-download/{heygen_marketing_video_id}/', path: { 'heygen_marketing_video_id': heygenMarketingVideoId, 'org': org, 'user_id': userId, }, }); } /** * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin * @returns PaginatedHeygenMarketingVideoListList * @throws ApiError */ public static aiMediaOrgsUsersHeygenVideosList({ org, userId, page, }: { org: string, userId: string, /** * A page number within the paginated result set. */ page?: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/videos/', path: { 'org': org, 'user_id': userId, }, query: { 'page': page, }, }); } /** * Endpoint to create a Heygen video * * Only platform admins have access to this endpoint. * @returns HeygenVideoDetail * @throws ApiError */ public static aiMediaOrgsUsersHeygenVideosCreate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: HeygenVideoRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/videos/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin * @returns HeygenVideoDetail * @throws ApiError */ public static aiMediaOrgsUsersHeygenVideosRetrieve({ heygenMarketingVideoId, org, userId, }: { heygenMarketingVideoId: string, org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/videos/{heygen_marketing_video_id}/', path: { 'heygen_marketing_video_id': heygenMarketingVideoId, 'org': org, 'user_id': userId, }, }); } /** * Endpoint used to delete a heygen video. * * Only platform admins have access to this endpoint. * @returns void * @throws ApiError */ public static aiMediaOrgsUsersHeygenVideosDestroy({ heygenMarketingVideoId, org, userId, }: { heygenMarketingVideoId: string, org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-media/orgs/{org}/users/{user_id}/heygen/videos/{heygen_marketing_video_id}/', path: { 'heygen_marketing_video_id': heygenMarketingVideoId, 'org': org, 'user_id': userId, }, }); } /** * Endpoint used to download a Veo video. * * * Only platform admins have access to this endpoint. * @returns any No response body * @throws ApiError */ public static aiMediaOrgsUsersVeoVideoDownloadRetrieve({ org, userId, veoVideoId, }: { org: string, userId: string, veoVideoId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-media/orgs/{org}/users/{user_id}/veo/video-download/{veo_video_id}/', path: { 'org': org, 'user_id': userId, 'veo_video_id': veoVideoId, }, }); } /** * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin * @returns PaginatedVeoVideoListList * @throws ApiError */ public static aiMediaOrgsUsersVeoVideosList({ org, userId, page, }: { org: string, userId: string, /** * A page number within the paginated result set. */ page?: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-media/orgs/{org}/users/{user_id}/veo/videos/', path: { 'org': org, 'user_id': userId, }, query: { 'page': page, }, }); } /** * Endpoint to create a Veo3 video * * Only platform admins have access to this endpoint. * @returns VeoVideoDetail * @throws ApiError */ public static aiMediaOrgsUsersVeoVideosCreate({ org, userId, formData, }: { org: string, userId: string, formData: VeoVideoRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-media/orgs/{org}/users/{user_id}/veo/videos/', path: { 'org': org, 'user_id': userId, }, formData: formData, mediaType: 'multipart/form-data', }); } /** * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin * @returns VeoVideoDetail * @throws ApiError */ public static aiMediaOrgsUsersVeoVideosRetrieve({ org, userId, veoVideoId, }: { org: string, userId: string, veoVideoId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-media/orgs/{org}/users/{user_id}/veo/videos/{veo_video_id}/', path: { 'org': org, 'user_id': userId, 'veo_video_id': veoVideoId, }, }); } /** * Endpoint used to delete a veo3 video. * * Only platform admins have access to this endpoint. * @returns void * @throws ApiError */ public static aiMediaOrgsUsersVeoVideosDestroy({ org, userId, veoVideoId, }: { org: string, userId: string, veoVideoId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-media/orgs/{org}/users/{user_id}/veo/videos/{veo_video_id}/', path: { 'org': org, 'user_id': userId, 'veo_video_id': veoVideoId, }, }); } /** * Endpoint to generate video scripts from a audio file. The audio file can be one of mp3 and wav. * * The request should be a multipart form with your audio file in the `file` field. * * Initial Response: * ``` * {"script": None, "status": "started_generation", "generation_id": "your-generation-id."} * ``` * This signals the generation has started. You can use the generation id to query video script generation status from this endpoint, using a JSON like below: * ``` * {"generation_id": "your-generation-id"} * ``` * * Example response: * ``` * {"script": "hello this is a video script.", "status": "finished", "generation_id": "your-generation-id"} * * ``` * @returns any No response body * @throws ApiError */ public static aiMediaOrgsUsersVideoScriptGenerationAudioCreate({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-media/orgs/{org}/users/{user_id}/video-script-generation/audio/', path: { 'org': org, 'user_id': userId, }, }); } /** * Endpoint to generate video scripts from a document file. The document file can be one of docx, doc, pptx, ppt, txt and pdf. * * The request should be a multipart form with your document file in the `file` field. * Initial Response: * ``` * {"script": None, "status": "started_generation", "generation_id": "your-generation-id."} * ``` * This signals the generation has started. You can use the generation id to query video script generation status from this endpoint, using a JSON like below: * ``` * {"generation_id": "your-generation-id"} * ``` * * Example response: * ``` * {"script": "hello this is a video script.", "status": "finished", "generation_id": "your-generation-id"} * * ``` * @returns any No response body * @throws ApiError */ public static aiMediaOrgsUsersVideoScriptGenerationDocumentCreate({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-media/orgs/{org}/users/{user_id}/video-script-generation/document/', path: { 'org': org, 'user_id': userId, }, }); } /** * Endpoint to generate video scripts from a text. * * The request body should be a JSON with your text, like below: * ``` * {"text": "Generate a script about a campus comedy."} * ``` * * Example response: * ``` * {"script": "hello this is a video script."} * * ``` * @returns any No response body * @throws ApiError */ public static aiMediaOrgsUsersVideoScriptGenerationTextCreate({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-media/orgs/{org}/users/{user_id}/video-script-generation/text/', path: { 'org': org, 'user_id': userId, }, }); } }