Quickstart
Generate your first image in five minutes — get a key, submit, poll.
1. Get an API key
Sign in to Jiufeng and open the Console → API Keys page (opens in a new tab), then click "Create key". The full key is shown only once — copy and store it immediately (it starts with sk-jf-live-).
All examples below use the placeholder sk-jf-live-YOUR_KEY; replace it with your own key.
2. Submit a generation task
You get a task_id back immediately (generation is asynchronous):
Prefer to try it without leaving the page? Paste your key and generate right here:
Paste your own sk- key to confirm your public API access is wired up correctly.
⚠ This makes a real API call with your key and consumes credits.
🔒 Your key is used only for this call and is never saved — it clears when you refresh.
Get a key in the console →3. Poll for the result
Query the task with the task_id from the previous step:
When status reaches completed, the result images are in data.result.url (an array):
The real status values are pending / processing / completed / failed (not queued / success). Result image URLs expire 24 hours after completion — download or re-host them promptly.
4. (Optional) Use a webhook instead of polling
Include a webhook field on submission and the platform will POST to <webhook>/callback when the task reaches a terminal state (completed / failed), so you can skip polling. See Webhook callbacks.
Polling tips
Use exponential backoff: start around 1s and stretch to a few seconds between calls — don't hammer every 100ms. See Query tasks.