export type GetApiVideosVideoIdContentArgs = {video_id: string}; export type GetApiVideosVideoIdContentOptions = {baseUrl: string, APIKeyHeader?: string | undefined, fetch?: typeof fetch | undefined}; /** * Video Content * * GET /videos/{video_id}/content */ export const getApiVideosVideoIdContent = async (args: GetApiVideosVideoIdContentArgs, options: GetApiVideosVideoIdContentOptions) => { const {baseUrl, fetch: fetchFn = fetch, APIKeyHeader} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyHeader !== undefined) headers.set("x-litellm-api-key", APIKeyHeader) const url = `${baseUrl.replace(/\/+$/, '')}/videos/${encodeURIComponent(String(args.video_id))}/content${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };