Image Generation
With image generation on, Dline can call the generate_image tool during a task to create or edit images. Requests go through the image source configured on the current API Profile.
Turning it on and configuring it
Section titled “Turning it on and configuring it”-
Under Settings → Features, turn on Enable Image Generation (off by default). Its description is “Expose the generate_image tool and route calls through the configured image source.”
-
Under Settings → API Configuration, expand the API Profile the task uses and set Image source.
-
Complete the model and other settings for the source you chose.
Image source options:
| Option | Description |
|---|---|
| None | No image generation |
| GPT Subscription, GPT API, Hosted | Generate images through the Profile’s own OpenAI-family connection; which options are available depends on the Profile’s provider and transport |
| Independent | Use a separately configured image Profile; you must select an enabled Image profile and an Image model |
For Independent, create an image connection with Add image profile in the Image Generation Profiles section: choose OpenAI or Gemini, enter an API key, optionally set a custom base URL, and make sure Enabled is checked. If the selected image Profile is unavailable, Dline does not fall back to another connection.
Built-in image models:
- OpenAI: GPT Image 1, GPT Image 2, GPT Image 2.5 (default);
- Gemini: Nano Banana 2 (default), Nano Banana 2 Lite, Nano Banana Pro, Nano Banana.
You can also set Image generation limits on the Profile: a task budget, a request timeout, and concurrency.
Tool parameters
Section titled “Tool parameters”| Parameter | Description |
|---|---|
prompt | Required; the image description |
count | Number of images; default 1 |
width / height | Target size, used as a pair; the default target is 2048×1152 |
aspect_ratio | Aspect ratio |
quality | auto (default), low, medium, high |
background | auto (default), opaque, transparent |
output_format | png (default), jpeg, webp |
output_compression | Compression for JPEG/WebP, 0–100 |
reference_artifact_ids | Artifact IDs of reference images; providing references makes it an edit request |
mask_artifact_id | Mask used for edits |
There is no output-path parameter.
Output location
Section titled “Output location”Generated images are saved as task artifacts, not written straight into the workspace:
<documents-root>/tasks/<task-id>/artifacts/images/<sha256>.<extension><documents-root> defaults to dline inside your system Documents folder and can be overridden with DLINE_DOCS_DIR. The tool result includes the artifact ID, absolute path, and metadata. To put an image into your project, ask Dline to copy the file.
Limits
Section titled “Limits”- 1–4 images per call (or fewer if the model’s limit is lower);
- at most 4 reference images;
- requested size at most 4096×4096 and at most 16,777,216 pixels in total;
- the Hosted source generates exactly 1 image per call and does not support mask edits;
- some models add their own size and ratio limits;
- each image file is at most 25 MiB, and a task’s images total at most 250 MiB.
Approval
Section titled “Approval”Generate images in the auto-approve menu is off by default. While it is off, each generation shows Approve / Reject for you to confirm. See Auto-approve.
Following along in the chat
Section titled “Following along in the chat”Each generation appears as an expandable row whose status moves through Image generation queued, Generating image, and Image preview, ending as Image generation completed, Image generation failed, or Image generation cancelled. The row shows the prompt, the model, any error, a preview while generating, and the final images.
- Click an image to open it;
- Copy Artifact ID copies the artifact ID;
- Use as Reference uses the image as a reference for later generations.
Images are already saved in the task folder, so there is no separate save button.
Other notes
Section titled “Other notes”- The tool is available with both the Standard and Lite prompt profiles;
- Strict Plan Mode does not block image generation;
- for a subagent to use
generate_image, it must list the tool explicitly and name a Profile with the Subagents usage checked; it does not inherit the main task’s image configuration. See Subagents.
Common errors
Section titled “Common errors”| Message | Cause |
|---|---|
| Image generation is disabled in Feature Settings. | Enable Image Generation is off |
| Image generation is disabled for the current API Profile. | The current Profile’s Image source is None |
| The current API Profile is not configured for image generation. | The current Profile has no usable image source |
| The current API Profile could not be resolved. | The Profile bound to the task cannot be resolved |
| OpenAI image generation was rate limited. / OpenAI image generation request was rejected. | The provider rate-limited or rejected the request |
| OpenAI hosted image generation failed. / Gemini image generation failed. | The provider call failed |
| Image generation failed. | Another unexpected error |