Quickstart
From zero to your first image and video in about ten minutes — get a key, submit, read the result.
Get an API key
Sign in to Jiufeng (Google or GitHub account) and open the Console → API Keys ↗ page, then click "Create key". The full key is shown only once — copy and store it immediately (it starts with sk-).
New accounts get 5 free credits — enough for 62 GPT Image 2 images at 1K, or one 5-second 768P video. Repeated runs (especially the video example) can use up the free credits — when your balance runs out, the submit call returns 402; top up on the pricing page. All examples below use the placeholder sk-YOUR_KEY; replace it with your own key.
Submit a generation task
Pick one. Every call returns a task_id immediately — generation is asynchronous.
0.08 credits at 1K — cheapest, best with text in the image
0.212 credits at 1K — photoreal detail; version is flare or sunburst, same price
3.75 credits for 5 s at 768P — note the endpoint is POST /v1/videos/generations
Response:
Want to try it in the browser? Use “Try it live” on the Generate images page (paste your own key; GPT Image 2 only), or sign in and use the console with no key.
Poll for the result
When status reaches completed, the files are here:
- Images:
data.result.images[0].url(an array) - Video:
data.result.videos[0].url(an array)
With jq: jq -r '.data.result.images[0].url[0]' (image) or jq -r '.data.result.videos[0].url[0]' (video).
The status values are pending / processing / completed / failed (not queued / success). Result files are kept for 30 days (the exact deadline is expires_at) — download or re-host them before then.
Images usually finish in a few seconds; video from tens of seconds to a few minutes.
(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.
Next steps
- Generate images — all image parameters, reference images, Python / JS examples
- Generate videos — text, first-frame and multimodal-reference video
- Pricing & billing — what each call costs