export type GetApiV1AssetImageVideoFrameIdArgs = {video_frame_id: string}; export type GetApiV1AssetImageVideoFrameIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get an image * * GET /v1/asset/image/{video_frame_id} */ export const getApiV1AssetImageVideoFrameId = async (args: GetApiV1AssetImageVideoFrameIdArgs, options?: GetApiV1AssetImageVideoFrameIdOptions) => { const {baseUrl = "https://api.navigateai.co", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set('authorization', `Bearer ${ApiKeyAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/asset/image/${encodeURIComponent(String(args.video_frame_id))}${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 };