Personalised image generation API

Personalised image generation API: templates, idempotency and webhooks

A practical architecture for generating visual outputs from JSON without creating duplicate jobs or losing completion events.

Reviewed 2026-08-19.Reviewed by

FotoFit's API is for applications that already own the input workflow. Your system sends structured values for an approved template, receives a job reference and uses status checks or signed webhooks to follow asynchronous work.

The minimum production flow

  1. 1Create an API keyKeep it server-side and store it in a secret manager.
  2. 2Choose a templateUse a stable template identifier and known field contract.
  3. 3Submit structured dataSend only the fields and output options your workflow needs.
  4. 4Provide an idempotency keyReuse the same key when retrying the same logical request.
  5. 5Handle completionPoll the job or verify the signature on a configured webhook event.

Idempotency prevents expensive duplicates

A timeout does not prove the server rejected a request. Retrying with a new identity can create two render jobs. Use one stable idempotency key for the same business operation and store the returned job identifier.

Treat webhooks as untrusted input

  • Verify the FotoFit signature before reading the event as authoritative.
  • Deduplicate events by delivery or event identifier.
  • Return a successful response only after durable receipt.
  • Process business work asynchronously so the receiver remains fast.

Temporary and managed API renders

Use temporary renders when your application owns the durable record and only needs generated files. Use managed rendering when FotoFit should maintain credential history, verification and later regeneration within the workspace.

Common questions

Is API work separate from plan credits?

No. API rendering uses the workspace's shared generated-output allowance.

Can two workspace members submit at the same time?

Yes. Allowance reservation is workspace-scoped and atomic, preventing both jobs from claiming the same remaining capacity.

Related resources