openclaw/openclaw · error · Error

DeepInfra video generation failed

Error message

DeepInfra video generation failed

What it means

Thrown in generateVideo (extensions/deepinfra/video-generation-provider.ts:271-273) immediately after submission when submitted.status === 'failed'. The thrown message is normalizeOptionalString(submitted.error) if present, otherwise this exact fallback 'DeepInfra video generation failed'. So this literal message appears only when the job failed AND the error field is empty/null/missing. (The same fallback string is also used in the polling getFailureMessage path.)

Source

Thrown at extensions/deepinfra/video-generation-provider.ts:271

        dispatcherPolicy,
      });
      let submitted: DeepInfraVideoJob;
      try {
        await assertOkOrThrowHttpError(response, "DeepInfra video generation failed");
        submitted = await readProviderJsonResponse<DeepInfraVideoJob>(
          response,
          "DeepInfra video generation failed",
        );
      } finally {
        await release();
      }

      const jobId = normalizeOptionalString(submitted.id);
      if (!jobId) {
        throw new Error("DeepInfra video generation response missing job id");
      }
      if (submitted.status === "failed") {
        throw new Error(
          normalizeOptionalString(submitted.error) ?? "DeepInfra video generation failed",
        );
      }

      const completed =
        submitted.status === "succeeded"
          ? submitted
          : await pollProviderOperationJson<DeepInfraVideoJob>({
              url: `${baseUrl}/videos/${encodeURIComponent(jobId)}`,
              headers,
              deadline,
              defaultTimeoutMs: DEFAULT_HTTP_TIMEOUT_MS,
              fetchFn: fetch,
              maxAttempts: MAX_POLL_ATTEMPTS,
              pollIntervalMs: POLL_INTERVAL_MS,
              requestFailedMessage: "DeepInfra video status request failed",
              timeoutMessage: `DeepInfra video generation job ${jobId} did not finish in time`,
              allowPrivateNetwork,

View on GitHub (pinned to 01804a7531)

Solutions

  1. Inspect the full failed job payload via debug logging for any detail field the normalizer missed.
  2. Simplify the prompt and retry to rule out content-policy rejection.
  3. Verify the model id is valid and available on your DeepInfra account.
  4. Check DeepInfra account quota/billing status.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  const result = await provider.generateVideo(req);
} catch (err) {
  if (err instanceof Error && /video generation failed/i.test(err.message)) {
    // DeepInfra reported a failed job; inspect prompt/model/quota.
  }
  throw err;
}

Prevention

When it happens

Trigger: POST /videos returns a job object with status 'failed' and no (or empty) error string. Or, during polling, the job transitions to 'failed' with no error detail.

Common situations: DeepInfra rejected the prompt (content policy), the model is unavailable, quota/rate limit expressed as a failed job, or invalid parameters — but the API omitted the error detail field.

Related errors


AI-assisted analysis of openclaw/openclaw@01804a7531 (2026-08-12). Data as JSON: /api/errors/8524444dda591c68. Report an issue: GitHub.