fashn-logo

FASHNAI

December 19, 2025

[API] Edit Endpoint Improvements and Better Error Handling

New Input Parameters: image_context and mask

The Edit API endpoint has been expanded with additional capabilities. Alongside the newly introduced Image Context support, the endpoint now also accepts a mask parameter, enabling the same Brush Edit functionality available in the app.

The mask can be combined with Image Context to perform precise, localized edits guided by a reference image. This allows targeted changes such as placing logos, modifying buckles, or applying embroidery with greater accuracy.

New Runtime Error Type: UnavailableError

We’ve also improved error handling across the API and introduced a new UnavailableError. This error explicitly indicates temporary service unavailability or overload, making it easier to implement appropriate handling strategies such as retries with backoff or fallback workflows.

For more details see our API documentation: Edit API reference: https://docs.fashn.ai/api-reference/edit Error handling: https://docs.fashn.ai/api-overview/error-handling