Extract a template from images
Accepts 2-6 reference image file_ids. Fields that look the same across all images get word-for-word identical wording in every preset; fields that visibly differ get per-image descriptions.
On success, atomically creates a new template plus N Presets and attaches them. Costs N credits (1 per preset).
token_authAuthorizationBearer <token>Token-based authentication using access tokens.
application/json- body
file_ids*array<string>UUIDs of the uploaded assets to analyze. 2..6 items, in the desired preset order.
2 <= items <= 6type?TypePreset type. Currently flat_2_model and create_packshot support batch extraction.
"flat_2_model""flat_2_model""create_packshot"name?|Optional template name. Auto-generated from type and timestamp when omitted.
nulldescription?|Optional template description.
nulloutput?|Optional delivery settings (size, ar) stamped onto every preset in the
set. Extraction writes the look and has no concept of an output size, so this
is applied by the backend afterwards. Values outside the allowed enums are
dropped, and size is clamped to the caller's entitlement.
nullSuccessful Response
application/json- response
category*The newly created template grouping the extracted presets.
presets*array<>The created presets, in the same order as input file_ids.
shared_traits*Map of top-level fields the model treated as shared across the set, with canonical wording.
curl -X POST "https://example.com/preset/templates/extract-from-images" \ -H "Content-Type: application/json" \ -d '{ "file_ids": [ "string", "string" ] }'{ "category": { "id": "string", "name": "string", "description": "string", "thumbnail_url": "string", "visibility": "shared", "created_by": "string", "created_at": "string", "swatch_source": null, "preset_count": 0, "preset_types": [ "flat_2_model" ], "groups": [ "string" ], "preset_previews": [ { "preset_code": "string", "name": "string", "preview_url": null, "framing": null, "angle": null } ] }, "presets": [ { "preset_code": "string", "name": "string", "description": "string", "type": "flat_2_model", "visibility": "shared", "groups": [ "string" ], "categories": [ { "id": "string", "name": "string", "description": "string", "thumbnail_url": "string", "visibility": "shared", "created_by": "string", "created_at": "string", "swatch_source": null, "preset_count": 0, "preset_types": [ "flat_2_model" ], "groups": [ "string" ], "preset_previews": [ { "preset_code": "string", "name": "string", "preview_url": null, "framing": null, "angle": null } ] } ], "instruction_data": {}, "created_by": "string", "created_at": "string", "updated_at": "string" } ], "shared_traits": {}}