Intent Routing

How perstudio turns natural language into the right ComfyUI workflow.

How it works

When you call POST /generate with an intent string, perstudio uses Claude (Sonnet) to analyze your request and match it to the best available workflow. The routing process:

  1. 1. Intent analysis — Claude parses your natural language to identify what type of image you want, the subject, style, and any technical requirements.
  2. 2. Workflow matching — The router compares your intent against all available workflows and their annotated capabilities (template_slots, categories).
  3. 3. Slot filling — Claude maps your intent into the workflow's template slots (prompt, negative_prompt, dimensions, etc.).
  4. 4. Execution — The patched workflow runs on the GPU pod and returns your generated assets.

Supported categories

Product Photography

Studio-quality product shots with controlled lighting

Portrait Generation

Character and face generation with style control

Landscape / Scene

Environment and architectural visualization

Style Transfer

Apply artistic styles to reference images

ControlNet (Depth/Canny)

Structure-guided generation from control images

IP-Adapter

Style/subject transfer from reference images

Image-to-Image

Transform existing images with prompts

Upscaling

4x resolution enhancement with detail recovery

Video Generation

Short-form video from text or image

Sticker Creation

Die-cut stickers with transparent backgrounds

Logo Design

Simple logo and icon generation

Text Overlay

Add styled text to generated images

Tip
Write descriptive intents. Instead of "photo of earbuds", try "Professional product photo of wireless earbuds on marble countertop, soft studio lighting, 4:3 aspect ratio". More detail helps the router pick the optimal workflow and fill slots accurately.

Routing transparency

Every response from /generate includes the workflow_name and category fields so you can see which pipeline was selected. If the routing isn't choosing the workflow you want, you can use Tier 3 endpoints to target a specific workflow directly.