Skip to main content

Overview

All generate endpoints (Video to Video, Video Effects, Face Swap, Image APIs, etc.) accept an optional top-level custom_callback_url field. When provided, GoEnhance sends a POST request to that URL every time the task status changes, so you don’t need to poll the Get Job Status API.

Requirements

  • The URL must be a publicly accessible HTTPS endpoint.
  • Your server must respond with HTTP 200 within 3 seconds. Do any heavy processing asynchronously after responding.

Callback Payload

The request body is identical to the response of Get Job Status (GET /api/v1/jobs/detail), so you can reuse the same parsing logic:
The data.status field is one of:
  • pending: Job is queued and waiting to be processed
  • processing: Job is currently being processed
  • success: Job has finished successfully — results are in data.json
  • failed: Job has failed with an error

Retry Policy

If your server does not respond with HTTP 200 (including timeouts and connection errors), the notification is retried up to 3 times, with a 3-second timeout per attempt. If all attempts fail, the notification is dropped — you can always fall back to polling Get Job Status.

Best Practices

  1. Respond with 200 immediately after receiving the payload, then process it asynchronously.
  2. Make your handler idempotent — deduplicate by img_uuid + status, as the same notification may be delivered more than once due to retries.
  3. Keep polling as a fallback for critical workflows, in case your endpoint is temporarily unreachable.