conductor-oss/conductor · error · RuntimeException
Failed to download image from
Error message
Failed to download image from
What it means
OpenAIVideoModel.downloadFromUrl() catches a non-RuntimeException and wraps it in RuntimeException with message "Failed to download image from " + url. This is the fallback catch for the image-to-video input image download: any checked Exception (IOException from the OkHttp execute()/bytes() call, or other I/O error) is wrapped. RuntimeExceptions (including error 214) are rethrown unchanged.
Source
Thrown at ai/src/main/java/org/conductoross/conductor/ai/providers/openai/OpenAIVideoModel.java:212
} else if (inputImage.toLowerCase().endsWith(".png")) {
return "image/png";
} else if (inputImage.toLowerCase().endsWith(".webp")) {
return "image/webp";
}
return "image/jpeg";
}
private byte[] downloadFromUrl(String url) {
okhttp3.Request request = new okhttp3.Request.Builder().url(url).get().build();
try (okhttp3.Response response = httpClient.newCall(request).execute()) {
if (response.body() == null) {
throw new RuntimeException("Empty response downloading image from " + url);
}
return response.body().bytes();
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException("Failed to download image from " + url, e);
}
}
}
View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Verify the URL is reachable from the Conductor worker's network (curl from the worker host).
- Check DNS resolution and firewall rules for the image hostname.
- Increase the OkHttp read timeout if the image server is slow (configured via AIHttpClients / OpenAIConfiguration timeout).
- Convert the image to a data: URI or raw base64 to avoid the network dependency entirely.
- Host the image on a reliable CDN or local file server accessible to the worker.
Example fix
// before
req.setInputImage("https://internal-lan-host:8080/image.jpg"); // unreachable from worker
// after — embed the image to avoid network
req.setInputImage("data:image/jpeg;base64," + Base64.getEncoder().encodeToString(imageBytes)); Defensive patterns
Strategy: try-catch
Validate before calling
// Validate input image URL reachability before video job submission
private void validateImageReachable(String url) {
try {
URI uri = URI.create(url);
String host = uri.getHost();
if (host == null) {
throw new IllegalArgumentException("Invalid image URL (no host): " + url);
}
// Optionally: resolve DNS and do a connectivity check
java.net.InetAddress.getByName(host); // throws if DNS fails
} catch (Exception e) {
throw new IllegalArgumentException(
"Input image URL is not reachable: " + url, e);
}
} Type guard
null
Try / catch
try {
videoModel.call(prompt);
} catch (RuntimeException e) {
Throwable cause = e.getCause();
if (cause != null && cause instanceof Exception) {
String msg = cause.getMessage() != null ? cause.getMessage() : "";
if (msg.contains("download image") || msg.contains("Failed to download")) {
// Network error fetching input image
throw new IllegalArgumentException(
"Cannot download input image from URL. " +
"Verify network access or use a data: URI.", e);
}
}
throw e;
} Prevention
- Verify the input image host is reachable and resolvable from the Conductor worker.
- Convert images to data: URIs or base64 to avoid network download entirely.
- Ensure the OkHttp read timeout is sufficient for large images.
- Use a reliable CDN or local file server for input images.
When it happens
Trigger: VideoGenRequest.inputImage is an HTTP/HTTPS URL. The OkHttp GET request throws an IOException: DNS resolution failure, connection refused, connection timeout, read timeout (slow server), TLS handshake failure, or the server resets the connection.
Common situations: Input image hosted on a server behind a firewall blocking the Conductor worker; DNS not resolving the image hostname; slow image server causing read timeout; TLS certificate issues; the URL host is down; network partition between the Conductor worker and the image CDN.
Related errors
- Empty response downloading image from
- Failed to submit video generation:
- Failed to check video status:
- Failed to download from {url}
- Failed to download image from {url}
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/ec99c7ccf0c6e504.
Report an issue: GitHub.