Generate an image (logged-in): a prepaid credit, else a Lightning offer
A standard generation consumes ONE prepaid generation credit when the account holds one (answered 201 with the job dispatched); otherwise — and always for quality and edit — answers a 402 Lightning offer for the mode's price ($0.08 standard / $0.20 quality / $0.15 edit, invoiced in sats at the current BTC/USD rate), to be paid and then redeemed at POST /v1/images/generate/redeem. edit takes up to 3 references: existing image ids (ref_image_ids) and/or ephemeral uploads (ref_upload_ids from /v1/images/generate/ref-upload). Idempotency-Key is REQUIRED — the credit arm is a mutation, and a same-key retry of a 402 hands back the SAME offer rather than minting a second invoice. Requires a fresh account. Rate limited 20/min/user. Returns 403 while IMAGE_GEN_ENABLED is off.
Request
- Base URL: https://api.memestack.ai
- URL: https://api.memestack.ai/v1/images/generate
- Auth: HTTP bearer
Headers
Client-generated key (e.g. crypto.randomUUID()). A replayed key returns the original response; missing header is a 400 MISSING_IDEMPOTENCY_KEY.
Request body
Response
A prepaid credit covered the generation; the job is dispatched. Poll GET /v1/images/{id}/generation-status.
Changes
No recorded changes to this operation across all 1 revision of this API.