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 / Avatar

Photorealistic portraits, headshots, and group photos

Illustration

Editorial art and illustrations (Illustrious-based)

Cartoon / Anime

Cartoon, anime, and manga-style art

Architecture

Architectural visualization and interior design

Style Transfer

Apply artistic styles from reference images

ControlNet (Depth/Canny)

Structure-guided generation from control images

Image-to-Image

Transform existing images with prompts

Upscaling

4x resolution enhancement with detail recovery

Inpainting

Edit specific regions of an image using a mask

Sticker / Icon

Die-cut stickers with transparent backgrounds

Video Generation

Text-to-video, image-to-video, and talking heads

Audio / TTS

Text-to-speech with voice cloning

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.