POST /generate
Intent-based generation — Tier 1. Send natural language, get production-quality images. Claude routes your intent to the optimal ComfyUI workflow automatically.
Request
POST /generate
{
"intent": "string (required) — natural language description of what to generate",
"style_hint": "string (optional) — style guidance: 'photorealistic', 'anime', 'illustration'",
"aspect_ratio": "string (optional) — '1:1', '16:9', '9:16', '4:3'",
"quality": "string (optional) — 'draft' | 'standard' | 'high'"
}Headers
| Header | Required | Description |
|---|---|---|
| X-API-Key | Yes | Your API key (ps_live_...) |
| Content-Type | Yes | application/json |
Response
200 OK
{
"job_id": "j_8f2k9x3m",
"status": "completed",
"workflow_name": "FLUX Product Photography",
"workflow_id": "wf_abc123",
"category": "product_photography",
"tokens_used": 10,
"output_assets": [
{
"asset_id": "a_q7w2e1r4",
"filename": "output_001.png",
"mime_type": "image/png",
"size_bytes": 2048576
}
],
"elapsed_seconds": 12.4
}How intent routing works
When you send a request to /generate, Claude analyzes your intent and matches it to the best available workflow from 14+ curated pipelines. The routing considers:
- What type of image you want (product, portrait, landscape, style transfer, etc.)
- Required techniques (ControlNet, IP-Adapter, LoRA, upscaling)
- Quality and style preferences
- Available workflow capabilities and their template slots
Info
Token cost varies by workflow category (5-50 tokens). Use Tokens & Billing for the full cost table.
Error responses
400 Bad Request
{
"detail": "intent field is required"
}402 Payment Required
{
"detail": "Insufficient token balance. Need 10, have 3."
}503 Service Unavailable
{
"detail": "No GPU pod available. Try again in a moment."
}