English

Job webhooks

Receive and verify signed events for completed media jobs.

Job webhooks

Submit with a signed callback

curl "https://api.apimodel.store/v1/jobs" \
  -H "Authorization: Bearer $MODELPORT_API_KEY" \
  -H "Idempotency-Key: YOUR_UNIQUE_REQUEST_KEY" \
  -H "Content-Type: application/json" \
  --data '{"model":"nano-banana-2-1","prompt":"A ceramic cup in soft morning light","parameters":{"resolution":"1K"},"max_price_usd":"0.05","callback_url":"https://app.example.com/hooks/modelport","callback_secret":"REPLACE_WITH_A_RANDOM_WEBHOOK_SECRET"}'

Verify ModelPort-Signature with HMAC-SHA256 over the ModelPort-Timestamp, a dot, and the raw body. Reject timestamps older than five minutes, compare signatures in constant time, and deduplicate by event ID. Return 2xx to acknowledge.

Events are job.succeeded, job.failed, and job.cancelled. Poll the same job if a callback is delayed.