vercel/ai · error
Fireworks image generation failed with status: ${status}
Error message
Fireworks image generation failed with status: ${status} What it means
During polling, if the Fireworks image request reports status 'Error' or 'Failed', the model throws an Error embedding that status string. The actual failure details live in the Fireworks request state, so the message only surfaces the terminal status.
Source
Thrown at packages/fireworks/src/fireworks-image-model.ts:373
),
abortSignal,
fetch: this.config.fetch,
});
const status = pollResponse.status;
if (status === 'Ready') {
const imageUrl = pollResponse.result?.sample;
if (typeof imageUrl === 'string') {
return imageUrl;
}
throw new Error(
'Fireworks poll response is Ready but missing result.sample',
);
}
if (status === 'Error' || status === 'Failed') {
throw new Error(
`Fireworks image generation failed with status: ${status}`,
);
}
// Wait before next poll attempt
await delay(pollIntervalMillis);
}
throw new Error(
`Fireworks image generation timed out after ${pollTimeoutMillis}ms`,
);
}
}
View on GitHub (pinned to 69428b1f8b)
Solutions
- Check the Fireworks dashboard/logs for the underlying request error details
- Verify the model id and generation options (size, aspect ratio, steps) are valid for that model
- Confirm the Fireworks API key has quota/credits and isn't rate-limited
- Adjust the prompt if it's being rejected by content filters
Example fix
// before
const model = fireworks.image('accounts/fireworks/models/typo-model');
// after
const model = fireworks.image('accounts/fireworks/models/flux1-dev-fp8'); Defensive patterns
Strategy: try-catch
Validate before calling
// validate inputs before submitting
if (!modelId.includes('/models/')) throw new Error('invalid Fireworks model id');
if (!prompt || prompt.length > 4000) throw new Error('prompt missing or too long'); Type guard
function isFireworksStatusFailure(e: unknown): boolean {
return e instanceof Error && e.message.startsWith('Fireworks image generation failed with status:');
} Try / catch
try {
return await generateImage({ model: fireworks.image(modelId), prompt });
} catch (e) {
if (e instanceof Error && e.message.startsWith('Fireworks image generation failed with status:')) {
// check Fireworks console/logs for the underlying request error, then fix inputs
}
throw e;
} Prevention
- Validate the Fireworks model id (accounts/fireworks/models/...) before submitting
- Pre-check prompts against content policy and keep options within the model's supported sizes/steps
- Monitor API key quota and rate limits
- Read the underlying Fireworks request state via their dashboard for root cause
When it happens
Trigger: Calling `fireworks.image(...).doGenerate` where Fireworks transitions the generation request to `Error` or `Failed` — invalid model id, prompt rejected by safety filters, bad parameters (aspect ratio/size), or insufficient account quota/credits.
Common situations: Using a model id that doesn't exist on the account; prompts triggering content policy; exceeded rate limits or quota; invalid image size options for the chosen model.
Related errors
- Fireworks poll response is Ready but missing result.sample
- Fireworks image generation timed out after ${pollTimeoutMill
- Transcription failed: ${transcript.error ?? 'Unknown error'}
- Black Forest Labs poll response is Ready but missing result.
- Black Forest Labs generation failed.
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/83d451878e2c3c03.
Report an issue: GitHub.