Documentation Index
Fetch the complete documentation index at: https://docs.img-processing.com/llms.txt
Use this file to discover all available pages before exploring further.
Uploads a new image to the system from a file. This method is used to create a new Image object by uploading an
image file.upload(body: ImageUploadParams, options?: RequestOptions): APIPromise<ImageObject>;
The body parameters for uploading an image.
The image file to upload. It must be a valid image format (jpeg, png, webp) and not larger than
20MB.
The name of the image to identify it on the dashboard.
import fs from 'fs';
const imageObject = await client.images.upload({
image: fs.createReadStream('path/to/file'),
name: 'example-image',
});
Creates a new image by downloading it from a URL. This method is used when you have an image hosted online and want
to import it into the system.createFromURL(body: ImageCreateFromURLParams, options?: RequestOptions): APIPromise<ImageObject>;
Show createFromURLOptions
The body parameters for creating an image from a URL.Show ImageCreateFromURLParams
The name of the image to identify it on the dashboard.
The URL of the image to download. It must point to a supported image format (jpeg, png, webp).
const imageObject = await client.images.createFromURL({
name: 'example-image',
url: 'https://example.com/image.jpg',
});
Generates a new image using AI based on a text prompt. This method allows you to create images from textual
descriptions.imagine(body: ImageImagineParams, options?: RequestOptions): APIPromise<ImageObject>;
The body parameters for generating an image using AI.
The name of the image to identify it on the dashboard.
The prompt for the image. It should describe what you want to see in the generated image.
The model to use for the image. If not provided, the default model will be used.
The negative prompt for the image. It should describe what you don’t want to see in the generated
image.
The seed for the image. It is used to generate the image. If not provided, a random seed will be
used.
const imageObject = await client.images.imagine({
name: 'example-image',
prompt: 'A beautiful sunset over the ocean.',
});