Generate Template

Fire 3 Fal NB2 text-to-image candidates for an in-app hand template.

Sequence: compose prompt → charge $0.20 via Platform SDK → spawn N parallel NB2 calls + anatomy stub → upload candidates to S3 → persist draft row with the candidate list → return presigned candidate URLs.

Refund on Fal/Platform-Storage failure mid-flight: if ALL N candidates fail to produce bytes, we refund the charge and return 502. Partial failures (1-2 candidates succeed) keep the charge — the user can still finalize one of the surviving candidates.

Latency: ~10-30s wall (dominated by NB2). Sync response; no SQS. The frontend renders a "Generating…" state while the request hangs.

post/api/hand-templates/generate

Request

  • Base URL: https://api.tintin-x.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.tintin-x.com/api/hand-templates/generate
  • Auth: HTTP bearer

Request body

labelstring required
pose'single_hand' | 'two_hands_layered' | 'fist_flat_dual' | 'holding_prop' required
skin_tone'fair' | 'light' | 'medium' | 'tan' | 'deep' required
aspect_ratio'1:1' | '4:5' | '3:4' | '16:9' required
background'white' | 'gradient' | 'extended'
refinementstring nullable

Response

Successful Response

draft_template_idstring uuid required
composed_promptstring required
cents_chargedinteger required
charge_idstring uuid nullable

Changes

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