kie.ai API.md
kie.ai API
Request Endpoint
Request Param
- header ‘Authorization: Bearer TOKEN’
- model: z-image
- input
- prompt
- aspect_ratio
- nsfw_checker (optional)
Example
curl --location --request POST 'https://api.kie.ai/api/v1/jobs/createTask' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data-raw '{ "model": "z-image", "callBackUrl": "https://your-domain.com/api/callback", "input": { "prompt": "Generate a photorealistic image of a cafe terrace in the Marais district of Paris on a Wednesday morning in March 2025. It is a crisp, cool spring morning with clear skies. Locals are drinking coffee. In sharp focus should be a young woman with a pixie cut wearing a scarf, stirring a cappuccino and looking thoughtfully to the side; the waiter and street traffic behind her are blurred. The photo should have the candid, natural morning light feel of an iPhone image.", "aspect_ratio": "1:1", "nsfw_checker": true } }'
Get Task Details
curl --location --request GET 'https://api.kie.ai/api/v1/jobs/recordInfo?taskId' \ --header 'Authorization: Bearer <token>'
Get Download URL
- https://api.kie.ai/api/v1/common/download-url
- Header: Bearer token
- Body Param
- url
- curl –location –request POST ‘https://api.kie.ai/api/v1/common/download-url’ \ –header ‘Authorization: Bearer
’ \ –header ‘Content-Type: application/json’ \ –data-raw ‘{ “url”: “https://tempfile.aiquickdraw.com/path/to/image.jpg” }’