Generate a template from text
The image counterpart takes its count from the number of references; here the
caller asks for count presets (1-6). Above 1 the lambda plans ONE shoot and
returns that many shots of it: the fields that define the scene (background,
style, mood, palette, lighting) are written word-for-word identically in every
preset, while pose, framing and angle vary per shot. A description that names
the shots it wants overrides that default.
On success, atomically creates a new template plus count Presets and
attaches them. Costs count credits (1 per preset).
token_authAuthorizationBearer <token>Token-based authentication using access tokens.
application/json- body
text*TextPlain-language description of the look to build the template around.
length <= 2000count?CountHow many presets to generate, 1..6. Above 1 the model plans one shoot and returns that many shots of it.
1 <= value <= 61type?TypePreset type. Currently flat_2_model and create_packshot support set 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 generated presets.
presets*array<>The created presets, in the order the shots would be taken.
shared_traits*Map of top-level fields held identical across the set, with canonical wording. Empty when a single preset was requested.
curl -X POST "https://example.com/preset/templates/extract-from-text" \ -H "Content-Type: application/json" \ -d '{ "text": "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": {}}