Image Generation
Runnit image generation is a single-call, auto-save operation. One request generates an image, downloads it server-side, and saves it straight into your asset library: you never handle binary data or base64 payloads.
Ask Ru for a project image
Section titled “Ask Ru for a project image”Open a conversation about your project and describe the image you need. Include the subject, style and intended size or aspect ratio. Ru generates and saves the image, then shows the result in chat and in the project’s Assets tab.
Each generated image appears once on the project. If it is already available there, automatic filing reuses it. Copies saved to another destination keep their AI creator attribution. Existing duplicate files are not removed automatically. See Assets for organising saved files.
How it works
Section titled “How it works”When you call the image-generation endpoint, Runnit:
- Generates the image (default model
fal-ai/nano-banana). - Downloads the result server-side.
- Saves it into the unified assets system.
- Returns a lightweight success response with the saved asset metadata.
This collapses what used to be a three-step workflow (generate → download → save) into one request, which keeps token usage low for AI agents.
Requesting an image
Section titled “Requesting an image”Send a POST to /api/images/generate with at least a prompt, a file name, and
either a jobId or a requestId:
curl -X POST https://api.runnit.io/api/images/generate \ -H "Content-Type: application/json" \ -H "X-Agent-Api-Key: <your-agent-api-key>" \ -d '{ "organizationId": "your-org-id", "jobId": "your-job-id", "prompt": "A beautiful sunset over mountains", "fileName": "sunset.jpg", "description": "Hero image for the launch campaign", "aspectRatio": "16:9", "outputFormat": "jpeg" }'Common parameters
Section titled “Common parameters”| Field | Required | Notes |
|---|---|---|
prompt | Yes | Description of the image to generate. |
fileName | Yes | Saved file name; include .jpg or .png. |
jobId or requestId | One required | Associates the asset with a job. |
organizationId | Yes | Must match your agent API key’s organisation. |
numImages | No | 1–10, defaults to 1. |
aspectRatio | No | Defaults to 1:1. |
outputFormat | No | jpeg or png, defaults to jpeg. |
description | No | Stored on the asset; recommended for organisation. |
Response
Section titled “Response”{ "success": true, "message": "Images generated and saved successfully", "assets": [ { "id": "asset-uuid", "fileName": "sunset.jpg", "fileType": "image", "mimeType": "image/jpeg", "fileSize": 125432, "createdAt": "2025-10-08T12:00:00Z" } ], "generationInfo": { "model": "fal-ai/nano-banana", "prompt": "A beautiful sunset over mountains", "aspectRatio": "16:9", "outputFormat": "jpeg" }}The saved image is immediately viewable in the app under the associated job’s assets.
Image generation uses the organisation’s active AI billing mode. A platform credit organisation needs enough credits to cover the estimated request, and the member making the request must hold a paid seat (Go, Pro, or Enterprise); image generation is not included in the free plan. An own-key organisation needs its fal.ai key under Settings → AI API Keys; Runnit never falls back to a platform key in that mode. See AI Credits for top-ups and key setup, and Billing and subscriptions for seats.