Skip to main content
The Dafty API turns a prompt into an on-brand image. Generation is asynchronous: you create a job, then poll it until it completes and returns image URLs.

1. Get an API key

Create a key from your dashboard at /api-keys. The plaintext key is shown once - store it securely. Send it on every request as x-api-key (or Authorization: Bearer).

2. Start a generation

Returns 202 Accepted with a pending job:
Only prompt is required. aspectRatio, quality (low|medium|high), and resolution (1K|2K|4K) have sensible defaults. Optionally pass a saved styleId and up to 4 references (image URLs or upload/job ids).

3. Poll for the result

Use ?wait=true to long-poll until the job finishes (up to ~55s):
Read the image from data.result.images[0].url. See Polling & wait for the loop and backoff details.

Next steps