creative_id or a product_sku. For each item it makes three calls:
- Look up the item’s object in the bucket. No object means you never submitted it.
- Submit the item once, only when the lookup finds nothing.
- Read the item’s documents once its object is
COMPLETED.
creatives whose schema has a creative_id string and an image blob, and a retriever creative_lookup with one input, creative_id.
Object states
An object’sstatus tells you where processing stands.
Treat any other status as still processing. Combined with the lookup, an item is in one of four states:
A read alone cannot tell “never submitted” from “not ready”, because both return an empty list. The lookup can.
1. Look up an item
List the bucket’s objects with a filter on your id:results has object_id, status, error, document_count, created_at and updated_at.
2. Submit an item
Create the object withauto_process=true, so processing starts at once:
status: "PENDING". Look it up again until status is COMPLETED or FAILED.
3. Read an item’s documents
Execute the retriever with your id as its input:documents, and check status and warnings with it. A run that timed out or skipped a stage answers HTTP 200 with status: "degraded", and its documents can be short.
You can also read every document made from one object, across all collections, with GET /v1/objects/{object_id}/documents.
Duplicates and retries
Each create makes a new object, even when its fields match an object you created before. Two submits of one item give two objects, two processing charges, and a read that returns the documents of both. You have three ways to prevent it:idempotency_key protects a retry that follows the first call. Two creates with the same key sent at the same moment can both succeed, so use a unique key when submits can race.
Unique keys
Setunique_key when you create the bucket. It cannot be added to a bucket created without one. Its fields name the schema fields that identify an item:
?policy= on the create call wins over the bucket’s default_policy. With neither, the create answers 400.
A typed contract for one retriever
The API reference shows the execute call for every retriever, so its document shape is generic. A specific retriever’s request and response are fixed by its configuration, and you can read both. Request.GET /v1/retrievers/{retriever_id} returns input_schema, a flat map of input names to {"type": ..., "required": ...}. Those names are the keys of inputs:
collection_ids. GET /v1/collections/{collection_id} returns each collection’s output_schema: the fields its documents carry, which are your passthrough fields plus the extractor’s outputs. Stages that enrich or reshape documents add or change fields; each stage page lists what it adds. Every document also has document_id and collection_id.
From those two reads you can write the types once:
Related
- Buckets and objects
- Filters, including
from_objectfor an object’s documents - Retrievers
- Deduplication and re-processing
- Create object API

