conductor-oss/conductor · error · IOException
OpenAI Video API status check failed with status %d: %s
Error message
OpenAI Video API status check failed with status %d: %s
What it means
Thrown by OpenAIVideoApi.getVideoStatus when polling GET /v1/videos/{videoId} returns non-2xx. IOException carries the status code and response body. This is the status-poll call used to track an already-submitted job through completion.
Source
Thrown at ai/src/main/java/org/conductoross/conductor/ai/providers/openai/api/OpenAIVideoApi.java:139
/**
* Poll the status of a video generation job.
*
* @param videoId The video job ID
* @return Current status including progress percentage
*/
public VideoStatusResponse getVideoStatus(String videoId) throws IOException {
Request request =
new Request.Builder()
.url(baseUrl + "/v1/videos/" + videoId)
.header("Authorization", "Bearer " + apiKey)
.get()
.build();
try (Response response = httpClient.newCall(request).execute()) {
String responseBody = readResponseBody(response);
if (!response.isSuccessful()) {
throw new IOException(
"OpenAI Video API status check failed with status %d: %s"
.formatted(response.code(), responseBody));
}
return objectMapper.readValue(responseBody, VideoStatusResponse.class);
}
}
/**
* Download the completed video as a streaming InputStream. The caller is responsible for
* closing the returned stream.
*
* <p>Note: The underlying OkHttp response is not auto-closed here since the caller needs to
* consume the stream. The stream wrapper closes the response when the stream is closed.
*
* @param videoId The video job ID
* @return InputStream of the MP4 binary data
*/
public InputStream downloadVideoStream(String videoId) throws IOException {View on GitHub (pinned to cf7c3e4a8a)
Solutions
- On 404, stop polling: the job/asset is no longer available; treat as a terminal failure.
- Respect the poll cadence implied by the job's progress and avoid tight poll loops that trigger 429.
- Verify the videoId matches the 'id' field returned by submitVideoJob.
- For 429, increase the poll interval and add backoff.
Defensive patterns
Strategy: try-catch
Validate before calling
if (StringUtils.isBlank(videoId)) {
throw new IllegalArgumentException("videoId is required to poll status");
} Try / catch
try {
VideoStatusResponse status = videoApi.getVideoStatus(videoId);
} catch (IOException e) {
if (e.getMessage().contains("status 404")) {
// asset expired/gone - stop polling, treat as terminal
} else if (e.getMessage().contains("status 429")) {
// increase poll interval
} else {
throw e;
}
} Prevention
- Poll at a reasonable interval to avoid rate limits.
- Stop polling on 404 - the asset is no longer available.
- Verify the videoId matches the submit response's 'id' field.
- Cache the videoId to avoid re-deriving it each poll.
When it happens
Trigger: Polling with a videoId that has expired or never existed (404), an invalid key (401), or hitting poll rate limits (429). A 404 here typically means the result has aged out of OpenAI's retention window.
Common situations: Polling too long after generation completed and the asset TTL elapsed (404), a videoId copied incorrectly from the submit response, or aggressive polling tripping rate limits.
Related errors
- OpenAI Video API submit failed with status %d: %s
- OpenAI Video download failed with status %d: %s
- OpenAI Video download failed with status %d
- OpenAI Video thumbnail download failed with status %d
- Failed to check video status:
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/ecbbbdcfa111dafb.
Report an issue: GitHub.