MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / buildGeminiVideoApiUrl

Function buildGeminiVideoApiUrl

ai/ai.ts:2259–2273  ·  view source on GitHub ↗
(
  baseUrl: string,
  model: string,
  key: string,
  endpoint?: string,
)

Source from the content-addressed store, hash-verified

2257
2258const buildGeminiVideoApiUrl = (
2259 baseUrl: string,
2260 model: string,
2261 key: string,
2262 endpoint?: string,
2263): string => {
2264 const urlObj = new URL(baseUrl);
2265 const finalModel = model || "veo-2.0-generate-001";
2266 const endpointTemplate = endpoint || "v1beta/models/{model}:generateVideos";
2267 urlObj.pathname = endpointTemplate
2268 .replace("{model}", finalModel)
2269 .replace(/^\/+/, "/");
2270 urlObj.searchParams.set("key", key);
2271 return urlObj.toString();
2272};
2273
2274const buildGeminiOperationUrl = (
2275 baseOrigin: string,
2276 name: string,

Callers 1

generateGeminiVideoMethod · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected