quote_paint_lab
Quote one Paint Lab AI action on an uploaded image. Does not generate or charge. Upload first with presign_generation_asset and complete_generation_asset. Returns quoteId, the job facts line, and the result size. Quotes expire after about 5 minutes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | AI action: finish (finish a sketch, optional style), edit (edit with words; prompt required), fill (fill the white area of maskAssetId; prompt required), colorize (color line art without changing the lines; optional paletteHex), upscale (2× or 4×), or remove_background (cutout). | |
| factor | No | upscale only: 2 or 4 (default 2). The result must stay within 4096 × 4096. | |
| quality | No | fast or best. finish only (default best). Ignored for other actions. | |
| variations | No | How many results to make: 1, 2, or 4. finish, edit, and fill only (default 1). One quote covers every variation. | |
| sourceAssetId | Yes | Ready image generation-asset id from complete_generation_asset: the drawing to change. For colorize this is the line art (dark lines on a white background; transparency is not kept). The quote is sized from this image. The longest side must be 256–2048 px. | |
| trainedStyleId | No | finish and edit only. Id of one of your ready trained styles from list_paint_lab_trained_styles. The result is made in that style, and the quote includes it. On generate_paint_lab with quoteId this is ignored: the quote already decides the style. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | AI action this quote covers. | |
| facts | No | Job facts line for this quote (action · quality · size · variations). | |
| width | No | Source width in px. | |
| factor | No | Upscale factor, when the action is upscale. | |
| height | No | Source height in px. | |
| quality | No | Quality tier this quote locked in, when the action has tiers. | |
| quoteId | Yes | Quote id. Pass this to the matching generate tool. Quotes expire. | |
| expiresAt | No | ISO timestamp when this quote expires. | |
| variations | No | Variations this quote covers. | |
| outputWidth | No | Result width in px. | |
| outputHeight | No | Result height in px. | |
| sourceAssetId | No | Image this quote was sized from. Pass it again on generate_paint_lab. | |
| pricingVersion | No | Pricing version used for this quote. | |
| trainedStyleId | No | Your trained style this quote applies, when one was set. | |
| requiredCredits | No | Usage this quote would consume from this month’s generation allowance (internal units). |