Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/openai_deno/mod.ts>OpenAI#createImageEdit

OpenAI API wrapper for deno.
Latest
method OpenAI.prototype.createImageEdit
import { OpenAI } from "https://deno.land/x/openai_deno@v0.9.8/mod.ts";

Creates an edited or extended image given an original image and a prompt.

Parameters

image: string | BlobPart

The image(or image path) to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.

prompt: string

A text description of the desired image(s). The maximum length is 1000 characters.

optional
params: CreateImageEditParams

Optional parameters for the API.

optional
filename: string

Returns

URLs(or base64 encoded) of edited images.