conductor-oss/conductor · error · RuntimeException
Failed to submit video generation: {message}
Error message
Failed to submit video generation: {message} What it means
GeminiVideoModel.call() catches any Exception during the async Veo video generation job submission (api.generateVideos) and wraps it with the cause's message. This is the broadest catch in the class — it covers IOException from the HTTP call, RuntimeException from input parsing, and any other failure. The original exception is preserved as the cause and logged at ERROR level before rethrowing.
Source
Thrown at ai/src/main/java/org/conductoross/conductor/ai/providers/gemini/GeminiVideoModel.java:108
GeminiApi.GenerateVideosOperation operation =
api.generateVideos(opts.getModel(), text, inputBytes, inputMime, config);
String operationName = operation.name();
log.info(
"Gemini Veo video job submitted: operation={}, model={}",
operationName,
opts.getModel());
VideoResponseMetadata metadata = new VideoResponseMetadata();
metadata.setJobId(operationName);
metadata.setStatus("PROCESSING");
return new VideoResponse(List.of(), metadata);
} catch (Exception e) {
log.error("Failed to submit Gemini Veo video generation job", e);
throw new RuntimeException("Failed to submit video generation: " + e.getMessage(), e);
}
}
@Override
public VideoResponse checkStatus(String jobId) {
try {
GeminiApi.GenerateVideosOperation operation = api.getVideosOperation(jobId);
VideoResponseMetadata metadata = new VideoResponseMetadata();
metadata.setJobId(jobId);
if (Boolean.TRUE.equals(operation.done())) {
// Check for error
if (operation.error() != null) {
metadata.setStatus("FAILED");
metadata.setErrorMessage(operation.error().message());
log.error("Gemini Veo video failed: operation={}", jobId);
return new VideoResponse(List.of(), metadata);View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Inspect getCause() for the specific exception and its message.
- Verify the model name is a valid Veo model available in your region/API tier.
- For image-to-video: verify the input image is valid PNG/JPEG — test with downloadFromUrl or base64 decode separately first.
- Check API key / Vertex AI credentials and quota for the Veo API.
- Review the prompt for content that may trigger safety filters.
Example fix
// before
VideoOptions opts = VideoOptionsBuilder.builder()
.model("gemini-2.5-flash") // not a video model
.build();
// after
VideoOptions opts = VideoOptionsBuilder.builder()
.model("veo-3.0-generate-001")
.build(); Defensive patterns
Strategy: try-catch
Validate before calling
// Validate Veo video model and input before submitting
private static final Set<String> VEO_MODELS =
Set.of("veo-2.0-generate-001", "veo-3.0-generate-001", "veo-3.1-generate-001");
void validateVideoRequest(VideoPrompt prompt) {
String model = prompt.getOptions().getModel();
if (!VEO_MODELS.contains(model)) {
throw new IllegalArgumentException(
"Use a Veo model for Gemini video generation. Got: " + model);
}
String img = prompt.getOptions().getInputImage();
if (img != null && !img.isBlank()
&& !(img.startsWith("data:") || img.startsWith("http")
|| img.matches("^[A-Za-z0-9+/=]+$"))) {
throw new IllegalArgumentException("Invalid input image format");
}
} Try / catch
try {
return videoModel.call(videoPrompt);
} catch (RuntimeException e) {
log.error("Video submission failed", e.getCause());
throw new RuntimeException(
"Failed to submit Veo video job — check model name, input image, "
+ "and content policy. Cause: " + e.getCause().getMessage(), e);
} Prevention
- Verify the model name is a valid Veo model available in your API tier and region.
- For image-to-video: test the input image separately — verify it's valid PNG/JPEG before passing.
- Use data: URI base64 for input images to avoid network download failures.
- Check the Veo API quota and content policy for your prompt.
- Log the cause exception to distinguish authentication errors from content-policy rejections.
When it happens
Trigger: The api.generateVideos() call fails: invalid Veo model name, malformed input image (corrupt base64 or unsupported format for image-to-video), API authentication failure, quota exceeded, content policy violation on the prompt, or network failure to the Gemini/Vertex video endpoint.
Common situations: Model name not a Veo model (must be 'veo-2.0-generate-001', 'veo-3.0-generate-001', or 'veo-3.1-generate-001' — or the API-key variants). Input image for image-to-video is corrupt or wrong MIME type. Prompt violates content safety. API key not enabled for Veo. Quota for video generation exhausted. Region doesn't support Veo.
Related errors
- Failed to check video status: {message}
- Empty response downloading image from {url}
- Failed to download image from {url}
- OpenAI Video API submit failed with status %d: %s
- Anthropic Messages API failed with status %d: %s
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/7aa38172b57d9d00.
Report an issue: GitHub.