Analyze Product
Where AI Fashion Studio starts actually spending money
- product_front
- product_bundle
- product_specification
- specification_json
This is the paid sibling of AFS_AnalyzeProductMock, and it's the node that makes AI Fashion Studio stop being a plumbing demo. It sends your product image and your product text to OpenAI's gpt-5.5 and gets back a structured product specification - the same AFS_PRODUCT_SPEC contract the mock version fabricates from keywords, except this one actually looked at the garment.
Mechanically it's a clean example of the API-wrapper pattern that this pack is built around. The image tensor is encoded to PNG, base64'd, and sent to the Responses API with a strict JSON schema (additionalProperties: false, every field required). The model fills in category, primary color, fit, sleeve length, a concrete must_preserve list ("six buttons, left chest logo"), and forbidden_changes ("do not mirror logos or text"). Structured output means the node doesn't have to gamble on freeform prose - it parses the schema straight into the spec object. The README is explicit that these model names are verified against OpenAI's catalog, and the pricing table the pack ships matches.
The three inputs matter in order:
product_front(IMAGE) - required here, unlike the mock. No image, no analysis; the node raises if you don't pass a tensor.product_bundle- supplies the product text. Both the image and the text go to the model, and the text is your chance to feed it facts the photo can't show ("recycled polyester", "size XS-3XL").provider(COMBO, defaultopenai) - the escape hatch. Flip it tomockand the graph runs free again with deterministic output. This is the pack's whole design: the same workflow, zero-cost or paid, per stage.
Outputs are product_specification and specification_json. The latter is where you'll actually see what the model decided - and note it carries analyzer: "openai:gpt-5.5" and an estimated_cost_usd, so the manifest keeps a per-stage price tag.
Cost and security are the two things to respect here, and the pack handles both unusually well. Spend is estimated from token usage and charged against a per-run ceiling (AIFS_MAX_RUN_COST_USD, default $10.00); if a call would blow past it, the run raises before the money is spent rather than after. Transient failures (rate limits, 5xx, timeouts) retry with bounded backoff; auth errors fail fast. The API key is read from the process environment at construction time and is never stored in settings, logged, or serialized into workflows - a genuine advantage over packs that want the key pasted into a node widget. Which is also the reminder from the wider ecosystem: an API-wrapper node is arbitrary Python that holds a credential and phones home by design, so on a brand-new pack with no community track record, skim the source before your first paid run.
To use it: install the pack, pip install -r requirements.txt into the ComfyUI Python environment, put OPENAI_API_KEY in the environment you launch ComfyUI with, restart, and wire product_front from a Load Image plus the bundle from Load Product Assets.
Where people get burned: no key in the process env → the node raises ConfigurationError: OPENAI_API_KEY is required... at execution. And the natural first instinct - run the mock slice, swap in this node, keep the rest mocked - is exactly right. Test the graph free first, then let it spend.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| product_front | IMAGE | — | |
| product_bundle | AFS_PRODUCT_BUNDLE | — | |
| provider | COMBO | openai | 2 options: openai, mock |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| product_specification | AFS_PRODUCT_SPEC | — |
| specification_json | STRING | — |