Lumen API documentation

Quality-floor cascade

quality_floor is a 0..1 number that says "the chosen tier's min_quality must be at least this high." Default is 0.75.

How it interacts with classification

The router takes max(classifier_score, quality_floor) as the effective floor, then picks the cheapest tier whose min_quality clears it.

This means:

  • A hard prompt (high classifier score) auto-escalates to a frontier tier, even if you set quality_floor=0.0.
  • An easy prompt with quality_floor=0.98 still gets routed to a high tier — you've told us not to compromise.

Recommended floors by use case

| Use case | quality_floor | Why |

|---------------------|---------------|------------------------------------|

| Internal chatbot | 0.70 | Most queries are trivial |

| Customer support | 0.80 | Wrong answer is a complaint |

| Code generation | 0.90 | Bugs are expensive |

| Legal / medical | 0.95 | Liability |

| RAG with citations | 0.85 | Need to follow instructions |

Inspecting what was chosen

Every response includes lumen.tier and lumen.difficulty_score so you can see how the classifier rated your prompt and which tier won.

Cost vs quality trade

Raising the floor by 0.10 typically moves you up one tier (small -> mid -> high), which is 3-5x cost. Lowering it doesn't always save money — the classifier dominates for hard prompts.