curl --request POST \
--url https://api.developer.pixelcut.ai/v1/outpaint \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"image_url": "https://cdn3.pixelcut.app/product.jpg",
"left": 0,
"top": 0,
"right": 0,
"bottom": 0,
"creativity": 0,
"output_format": "jpeg"
}
'import requests
url = "https://api.developer.pixelcut.ai/v1/outpaint"
payload = {
"image_url": "https://cdn3.pixelcut.app/product.jpg",
"left": 0,
"top": 0,
"right": 0,
"bottom": 0,
"creativity": 0,
"output_format": "jpeg"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
image_url: 'https://cdn3.pixelcut.app/product.jpg',
left: 0,
top: 0,
right: 0,
bottom: 0,
creativity: 0,
output_format: 'jpeg'
})
};
fetch('https://api.developer.pixelcut.ai/v1/outpaint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.developer.pixelcut.ai/v1/outpaint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image_url' => 'https://cdn3.pixelcut.app/product.jpg',
'left' => 0,
'top' => 0,
'right' => 0,
'bottom' => 0,
'creativity' => 0,
'output_format' => 'jpeg'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.developer.pixelcut.ai/v1/outpaint"
payload := strings.NewReader("{\n \"image_url\": \"https://cdn3.pixelcut.app/product.jpg\",\n \"left\": 0,\n \"top\": 0,\n \"right\": 0,\n \"bottom\": 0,\n \"creativity\": 0,\n \"output_format\": \"jpeg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.developer.pixelcut.ai/v1/outpaint")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image_url\": \"https://cdn3.pixelcut.app/product.jpg\",\n \"left\": 0,\n \"top\": 0,\n \"right\": 0,\n \"bottom\": 0,\n \"creativity\": 0,\n \"output_format\": \"jpeg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.developer.pixelcut.ai/v1/outpaint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image_url\": \"https://cdn3.pixelcut.app/product.jpg\",\n \"left\": 0,\n \"top\": 0,\n \"right\": 0,\n \"bottom\": 0,\n \"creativity\": 0,\n \"output_format\": \"jpeg\"\n}"
response = http.request(request)
puts response.read_body{
"result_url": "https://assets.pixelcut.app/public/result/a16646be-91c8-4e3a-b359.jpg"
}{
"error": "File size too large",
"error_code": "file_size_too_large"
}{
"error": "API Token not found",
"error_code": "invalid_auth_token"
}{
"error": "Insufficient credits available",
"error_code": "insufficient_api_credits"
}{
"error": "Too many requests",
"error_code": "rate_limit_exceeded"
}Outpaint
Expands an image by generating AI content beyond its original boundaries. Use this to extend images in any direction while maintaining visual coherence.
Input Image Limits:
- Max size: 25MB
- Min resolution: 128x128px
- Max resolution: 6000x6000px
- Supported formats: JPEG, PNG (PNG will be converted to JPEG for processing)
Expansion Limits: - Each direction (left, top, right, bottom) can be extended by 0-2000 pixels
- At least one direction must have a non-zero value
curl --request POST \
--url https://api.developer.pixelcut.ai/v1/outpaint \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"image_url": "https://cdn3.pixelcut.app/product.jpg",
"left": 0,
"top": 0,
"right": 0,
"bottom": 0,
"creativity": 0,
"output_format": "jpeg"
}
'import requests
url = "https://api.developer.pixelcut.ai/v1/outpaint"
payload = {
"image_url": "https://cdn3.pixelcut.app/product.jpg",
"left": 0,
"top": 0,
"right": 0,
"bottom": 0,
"creativity": 0,
"output_format": "jpeg"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
image_url: 'https://cdn3.pixelcut.app/product.jpg',
left: 0,
top: 0,
right: 0,
bottom: 0,
creativity: 0,
output_format: 'jpeg'
})
};
fetch('https://api.developer.pixelcut.ai/v1/outpaint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.developer.pixelcut.ai/v1/outpaint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image_url' => 'https://cdn3.pixelcut.app/product.jpg',
'left' => 0,
'top' => 0,
'right' => 0,
'bottom' => 0,
'creativity' => 0,
'output_format' => 'jpeg'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.developer.pixelcut.ai/v1/outpaint"
payload := strings.NewReader("{\n \"image_url\": \"https://cdn3.pixelcut.app/product.jpg\",\n \"left\": 0,\n \"top\": 0,\n \"right\": 0,\n \"bottom\": 0,\n \"creativity\": 0,\n \"output_format\": \"jpeg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.developer.pixelcut.ai/v1/outpaint")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image_url\": \"https://cdn3.pixelcut.app/product.jpg\",\n \"left\": 0,\n \"top\": 0,\n \"right\": 0,\n \"bottom\": 0,\n \"creativity\": 0,\n \"output_format\": \"jpeg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.developer.pixelcut.ai/v1/outpaint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image_url\": \"https://cdn3.pixelcut.app/product.jpg\",\n \"left\": 0,\n \"top\": 0,\n \"right\": 0,\n \"bottom\": 0,\n \"creativity\": 0,\n \"output_format\": \"jpeg\"\n}"
response = http.request(request)
puts response.read_body{
"result_url": "https://assets.pixelcut.app/public/result/a16646be-91c8-4e3a-b359.jpg"
}{
"error": "File size too large",
"error_code": "file_size_too_large"
}{
"error": "API Token not found",
"error_code": "invalid_auth_token"
}{
"error": "Insufficient credits available",
"error_code": "insufficient_api_credits"
}{
"error": "Too many requests",
"error_code": "rate_limit_exceeded"
}Authorizations
All API requests require a valid api key. Include your token as a HTTP request header in the following format: X-API-Key: skXXXXXXXXXXXXXXXX. You can obtain an api key by signing up for developer access in your Pixelcut account.
Scopes
Submit editing and generation jobs that consume credits.
Headers
Acceptable response media type(s). application/json, image/*. Default is application/json.
Body
URL of the image to be processed.
"https://cdn3.pixelcut.app/product.jpg"
Number of pixels to extend the image in this direction (0-2000).
0 <= x <= 2000Number of pixels to extend the image in this direction (0-2000).
0 <= x <= 2000Number of pixels to extend the image in this direction (0-2000).
0 <= x <= 2000Number of pixels to extend the image in this direction (0-2000).
0 <= x <= 2000Controls the creativity of the generated content. Higher values produce more creative but potentially less coherent results. 0 means maximum coherence, 1 means maximum creativity.
0 <= x <= 1The format of the output image. Default is jpeg.
jpeg, png Response
Success
A URL to access the resultant image. The file is deleted after at most 24 hours. File format will be jpeg.
"https://assets.pixelcut.app/public/result/a16646be-91c8-4e3a-b359.jpg"