Templates

Generate a template from text

POST
/preset/templates/extract-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).

Authorization

token_auth
headerAuthorizationBearer <token>

Token-based authentication using access tokens.

Request Body

application/json
  1. body
text*Text

Plain-language description of the look to build the template around.

Lengthlength <= 2000
count?Count

How many presets to generate, 1..6. Above 1 the model plans one shoot and returns that many shots of it.

Range1 <= value <= 6
Default1
type?Type

Preset type. Currently flat_2_model and create_packshot support set extraction.

Default"flat_2_model"
Value in"flat_2_model""create_packshot"
name?|

Optional template name. Auto-generated from type and timestamp when omitted.

Defaultnull
description?|

Optional template description.

Defaultnull
output?|

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.

Defaultnull

Response Body

Successful Response

application/json
  1. 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": {}}