The gateway handles upstream output retrieval
The service can receive image bytes, validate dimensions, remove metadata and save the private asset before delivery. Your application should handle the documented job shape and private download rather than depending on a provider's internal encoding. This also avoids copying large base64 strings into browser logs or application task records.
What to do next
- 01
Inspect the first response
Read its id, kind, status and poll_url. Store those values with the user's approved request instead of searching for an immediate image data array.
- 02
Wait for completion
Use bounded status checks and retain unknown or saving states. A 2xx creation response is not enough to draw an image that has not been delivered.
- 03
Download the owned content
Request the returned content route with the server-side key, check its MIME type and save or stream the actual bytes to the authorized user.
A concrete example
Illustrative integration error: a client calls atob on an undefined b64_json property and reports that generation failed. The remote image may still be processing; updating the client to the job lifecycle recovers the intended flow without another paid request.
Before you call it ready
- The customer response shape drives parsing.
- Provider encoding is not assumed to leak through.
- Large media is not logged as JSON.
When to stop or choose another method
If a third-party component only accepts immediate base64 results, add a backend adapter after private download. Do not misrepresent the creation endpoint as synchronous.
