Your email address belongs to a school and you are eligible for a free educational premium account.
Learn more

Convert anything using IMAGE-INPAINT


The API for converting any file using IMAGE-INPAINT.

Here you can see all available conversion options which you can use within the "options" section of conversions (see the example JSON below the table).

Here you can see all available conversion options which you can use within the "options" section of conversions (see the example JSON on the right).

Option Name Description
allow_multiple_outputs
Type: boolean
Default: False
If the conversion produces more than one output file, by default all of them are compressed in just one file. Set this option to true if you want a download link for each file.
aspect_ratio
Type: string
Enum: 1:1 3:2 4:3 4:5 9:16 16:9 21:9
The aspect ratio of the final image. It is ignored if width or height are set. Please note that not all the ratios are available for every style.
cfg_scale
Type: number
Minimum: True
Maximum: 30
Classifier Free Guidance Scale. How strongly the image should conform to prompt. Lower values produce more creative results.
denoising_strength
Type: number
Minimum: False
Maximum: True
Determines how little respect the algorithm should have for image's content. 0) nothing changes; 1) totally unrelated image.
download_password
Type: string
Pattern: ^[ -~]{0,1000}$
Example: secret_password
A password to protect the download. To download the file send the password in the x-oc-download-password header or set a cookie named x-oc-download-password. The value contains a comma separated list of passwords.
height
Type: number
Minimum: 64
Maximum: 5120
Sets the height of the image in pixels
num_inference_steps
Type: integer
Minimum: True
Maximum: 60
How many times to improve the generated image iteratively; higher values take longer; very low values can produce bad results.
preset
Type: string
Pattern: ^[\w\W]{1,255}$
Predefined options
resize_mode
Type: string
Enum: simple crop fill
Resize strategy. Please check API documentation.
seed
Type: integer
Minimum: True
Maximum: 4294967295
A value that determines the output of random number generator. If you create an image with same parameters and seed as another image, you'll get the same result.
style
Type: string
Pattern: ^[\w\W]{0,255}$
Optimizes the generated images to the selected style
width
Type: number
Minimum: 64
Maximum: 5120
Sets the width of the image in pixels

Output Example

POST /v2/jobs HTTP/1.1
Host: https://api.api2convert.com
X-Oc-Api-Key: <your API key here>
Content-Type: application/json
{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/raster%20image/png/example_small.png"
    }],
    "conversion": [{
        "category": "operation",
        "target": "image-inpaint",
        "options": {
            <conversion options here>
        }
    }]
}