Runs

Refine a run until on-brand, within budget

Bounded generate → score → refine loop. Repeats score → refine (re-rolling with the specific deviations fed back in) on a completed run and stops the instant brandFit >= minScore, iterations >= maxIterations, or the credit budget would be exceeded — whichever first. Returns the best result and exactly how many iterations and credits it took. The credit cap is never exceeded.

post/runs/{runId}/refine-to-brand

Request

  • Base URL: https://app.uselamina.ai/v1
  • URL: https://app.uselamina.ai/v1/runs/{runId}/refine-to-brand
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Path parameters

runIdstring uuid required

Request body

minScorenumber

Target brand-fit score to stop at (default 80).

maxIterationsinteger

Most refine passes to try (default 3).

maxCreditsnumber

Hard credit ceiling — never exceeded (default 200).

brandProfileIdstring

Brand to score against. Defaults to the run's workflow brand.

Response

Refine loop result

Changes

No recorded changes to this operation across all 1 revision of this API.