Flux API error: the validation failures specific to this model
Most API errors are the same on every model. These are the ones specific to Flux Pro v1.1 — payloads another model would accept.
| What you sent | You get | Why |
|---|---|---|
aspect_ratio outside 16:9, 9:16, 1:1, 4:3, 3:4 | 400 INVALID_PARAM | The widest set on the platform |
n above 4 | 400 INVALID_PARAM | Batch cap, not a cost limit |
model misspelled | 400 UNKNOWN_MODEL | The exact id is flux-pro |
All of these fail before anything is submitted upstream, so no credits are
touched and there is nothing to reconcile. The response names the offending
field in error.param.
The errors that are not your fault
Different category, and they arrive differently: a job that was accepted and then failed returns a successful HTTP response describing a failure.
{ "state": "failed", "error": { "code": "UPSTREAM_EMPTY_RESULT" } }
Your try/catch will not see it. Check state, not the status code. Credits
refund in full. Full taxonomy in
job state failed and UPSTREAM_FAIL.
Errors that apply to every model
- MISSING_API_KEY and INVALID_API_KEY
- NOT_ENOUGH_CREDITS
- api rate limit exceeded and CONCURRENCY_LIMIT_EXCEEDED
- INVALID_JSON
Full parameter reference: Flux API parameters.
Models covered on this page
Where these facts come from
- codebase: src/ai/providers/flux.ts — paramsSchema
- codebase: src/ai/jobs/service.ts — validation and error mapping