Skip to main content

Step 1: Upload or Reference an Image

First, you need to provide the source image. You can either:
  • Upload an image file as a base64 data URI.
  • Provide a publicly accessible image URL.
Replace with your API TokenTo replace the YOUR_API_TOKEN placeholder in the above examples, you’ll need to generate an API token in krea.ai/settings/api-tokens. Follow the instructions on the API Keys & Billing page if you need help.

Step 2: Generate Image

Make a POST request to the appropriate endpoint with your image and parameters.
Example Response

Step 3: Poll for Results

Image generation is asynchronous. You’ll receive a job ID immediately, then poll for results until the image is ready. Poll /jobs/{job_id} every 2 seconds until the job completes.
Example Completed Response
Webhooks available!Set up webhooks to receive notifications when jobs complete. See the Webhooks guide to get started.