v1

latestOpenAPI 3.1.0Apache 2.02026-07-264001921002.3 KB
Async Jobs

Create async image edit

Submits an image edit request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

post/v1/async/images/edits

Headers

x-bf-async-job-result-ttlinteger

Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.

x-bf-async-webhookstring

Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled; otherwise the submission is rejected with HTTP 400. If the endpoint is not subscribed to the resulting event, the job still completes normally but no delivery is enqueued. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.

Response

Job accepted for processing

idstring required

Unique identifier for the async job

status'pending' | 'processing' | 'completed' | 'failed' required

The status of an async job

expires_atstring date-time

When the job result expires and will be cleaned up

created_atstring date-time required

When the job was created

completed_atstring date-time

When the job completed (successfully or with failure)

status_codeinteger

HTTP status code of the completed operation

{"stackTrail":"components:schemas:AsyncJobResponse:properties:result","oasType":"schema","type":"unknown","description":"The result of the completed operation (shape depends on the request type)"}