Submit a batch job
submit_batchQueue up to 1,000 photo URLs for background face indexing or matching; poll the returned batch ID or register a webhook to receive completion results.
Instructions
Queue up to 1000 photo URLs for background processing. op=index stores their faces in the collection; op=match matches them against the collection. Submitting is free; each photo costs 62 credits when it is processed (some accounts pay the real-time 93 for a batch of one photo). The collection is created if missing; one that is being deleted is refused with 409 collection_not_writable. Only URLs are accepted, not base64. Returns batch_id; poll get_batch or register a webhook to hear when it finishes. op=index results are readable with get_batch_photos. op=match results (the matched photo ids per photo) are delivered only to a webhook today: without webhook_endpoint_id the matches are charged but cannot be read back, so prefer search_faces for a few photos. URLs are not checked at submit time: unreachable ones fail individually later.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | index = store faces; match = search with each photo. | |
| photos | Yes | Photos to process (1-1000). | |
| override | No | op=index only: replace faces of photos indexed before. | |
| collection_id | Yes | Collection to index into or match against. | |
| idempotency_key | No | Reusing a key returns the original batch instead of creating a duplicate. Use a new key for each different batch. | |
| webhook_endpoint_id | No | Webhook to notify when the batch completes. |