{"record":{"id":"972c7c9e8ed3a768","repo":"openclaw/openclaw","slug":"deepinfra-api-key-missing","errorCode":null,"errorMessage":"DeepInfra API key missing","messagePattern":"DeepInfra API key missing","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/deepinfra/video-generation-provider.ts","lineNumber":221,"sourceCode":"      videoToVideo: {\n        enabled: false,\n      },\n    },\n    async generateVideo(req) {\n      if ((req.inputImages?.length ?? 0) > 0) {\n        throw new Error(\"DeepInfra video generation currently supports text-to-video only.\");\n      }\n      if ((req.inputVideos?.length ?? 0) > 0) {\n        throw new Error(\"DeepInfra video generation does not support video reference inputs.\");\n      }\n      const auth = await resolveApiKeyForProvider({\n        provider: \"deepinfra\",\n        cfg: req.cfg,\n        agentDir: req.agentDir,\n        store: req.authStore,\n      });\n      if (!auth.apiKey) {\n        throw new Error(\"DeepInfra API key missing\");\n      }\n\n      const model = normalizeDeepInfraModelRef(req.model, defaultModel);\n      const deadline = createProviderOperationDeadline({\n        timeoutMs: req.timeoutMs,\n        label: \"DeepInfra video generation\",\n      });\n      const { baseUrl, allowPrivateNetwork, headers, dispatcherPolicy } =\n        resolveProviderHttpRequestConfig({\n          baseUrl: resolveDeepInfraVideoBaseUrl(req),\n          defaultBaseUrl: DEEPINFRA_BASE_URL,\n          allowPrivateNetwork: false,\n          defaultHeaders: {\n            Authorization: `Bearer ${auth.apiKey}`,\n            \"Content-Type\": \"application/json\",\n          },\n          provider: \"deepinfra\",\n          capability: \"video\",","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/openclaw/openclaw/blob/01804a75319da4b69c9ab98ceaa30477e22b8c0b/extensions/deepinfra/video-generation-provider.ts#L203-L239","documentation":"Thrown in generateVideo (extensions/deepinfra/video-generation-provider.ts:221) after resolveApiKeyForProvider returns an empty apiKey. The provider resolves the key from the auth store, agent config, and environment; if none yields a usable key, no request is sent. This mirrors the image provider's missingApiKeyError behavior.","triggerScenarios":"A video generation request is made to DeepInfra, and resolveApiKeyForProvider({ provider: 'deepinfra', cfg, agentDir, store }) returns { apiKey: undefined }.","commonSituations":"DeepInfra API key not configured in credentials; running in an environment without the key; key stored under a different provider id; auth store not initialized; first run without onboarding.","solutions":["Set the DeepInfra API key via 'openclaw configure' or the credentials store.","Run 'openclaw doctor' to verify DeepInfra credential discovery.","Confirm the key is associated with the 'deepinfra' provider id.","Validate the key is active in the DeepInfra console."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const auth = await resolveApiKeyForProvider({ provider: \"deepinfra\", cfg, agentDir, store });\nif (!auth.apiKey) throw new Error(\"Configure the DeepInfra API key before video generation\");","typeGuard":"async function isDeepInfraVideoKeyAvailable(ctx: { cfg: unknown; agentDir: unknown; store: unknown }): Promise<boolean> {\n  const auth = await resolveApiKeyForProvider({ provider: \"deepinfra\", ...ctx });\n  return typeof auth.apiKey === \"string\" && auth.apiKey.length > 0;\n}","tryCatchPattern":null,"preventionTips":["Run onboarding ('openclaw configure') to store the DeepInfra key before first use.","Use 'openclaw doctor' to confirm credentials resolve.","Gate video features behind an isConfigured check in the UI."],"tags":["deepinfra","video-generation","api-key","auth"],"backgroundTag":null,"analyzedSha":"01804a75319da4b69c9ab98ceaa30477e22b8c0b","analyzedAt":"2026-08-12T04:37:58.197Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}