Generate

Preview an idea before creating a collection

Synchronous, throwaway image generation for iterating on mascot ideas cheaply before committing to a collection. No collection required. Tweak the prompt, regenerate, compare, then use the winning prompt + a reference image in POST /v1/collections. Also supports reference_image_urls to check "does this prompt resemble my sketch?". Returns signed URLs with a 1-hour expiry - the images are not stored. Costs 1 credit per image (the cost field in the response confirms the amount). Returns 402 if credits are insufficient.

post/v1/generate/preview

Request

  • Base URL: https://api.masko.ai
  • URL: https://api.masko.ai/v1/generate/preview
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Account-scoped key (1 to 255 characters, ideally a UUID). Retries must preserve the credential workspace, effective API version, URL, content type and exact body bytes, including multipart boundaries; different inputs return 409 idempotency_key_reused. Completed responses, including 500 errors, replay for 24 hours after completion with current resource access checked again. Running or unconfirmed executions return 409 idempotency_request_in_progress and do not expire automatically. A receipt persistence failure returns 503 idempotency_persistence_failed: retry only with the same key and inspect the operation outcome before starting a new request.

Request body

promptstring required

Text description of the mascot to preview. Preview exists for cheap idea iteration: tweak the prompt, regenerate, compare, then create the collection with the winning reference. Costs 1 credit per image generated.

preset_idstring

Optional style preset ID. List presets via GET /v1/styles.

countnumber

Number of preview variants to generate. 1 to 6. Defaults to 1.

reference_image_urlsstring[]

Optional "check against" images. Feed an image you want the mascot to resemble; the preview tries to match it. Useful for "does this prompt produce something close to my sketch?" iterations. Not stored - use POST /v1/collections/:id/references for persistent references.

Response

Preview images

Changes

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