SeaLinkSeaLink
/
← Docs

Images

AI image generation, editing, variations, upscaling, style transfer, and background removal. Use SeaLink /v1/images/* and choose model capabilities and parameters from the model detail page.

POST /v1/images/generations

AI image generation. The example uses qwen-image-max; use /models and the model detail page for available models, sizes, and response formats.

Parameters

ParameterTypeRequiredDescription
modelstringYesqwen-image-max, qwen-image-plus
promptstringYes*Image description; *no if using template_id
template_idstringNoPrompt template ID
promptsarrayNoA/B test prompt array, up to 10
nintegerNo1 - 10 (default 1)
sizestringNo256x256, 512x512, 1024x1024, 1792x1024, 1024x1792
response_formatstringNourl, b64_json (default url)
qualitystringNostandard, hd
stylestringNovivid, natural
reference_imagestringNoReference image base64 or URL
tagsarrayNoArray of tag strings
cURL
curl https://test.sealink.io/v1/images/generations \
-H "Authorization: Bearer <your-sealink-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-max",
"prompt": "A serene Japanese garden with cherry blossoms, soft morning light",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}'
Python
from openai import OpenAI
client = OpenAI(
base_url="https://test.sealink.io/v1",
api_key="<your-sealink-key>",
)
response = client.images.generate(
model="qwen-image-max",
prompt="A serene Japanese garden with cherry blossoms, soft morning light",
n=1,
size="1024x1024",
)
print(response.data[0].url)
Node.js
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://test.sealink.io/v1",
apiKey: "<your-sealink-key>",
});
const response = await client.images.generate({
model: "qwen-image-max",
prompt: "A serene Japanese garden with cherry blossoms, soft morning light",
n: 1,
size: "1024x1024",
});
console.log(response.data[0].url);

POST /v1/images/edits

Image editing. Edit images using prompts. Supports JSON and multipart/form-data. Multipart files max 10MB.

Parameters

ParameterTypeRequiredDescription
modelstringYesqwen-image-edit-max
promptstringYesEdit instruction
image / image_urlstringYesSource image base64 or URL; multipart mode uses image file field
mask / mask_urlstringNoMask base64 or URL
nintegerNo1 - 10
sizestringNo256x256, 512x512, 1024x1024
response_formatstringNourl, b64_json
cURL
# JSON mode — reference image as URL
curl https://test.sealink.io/v1/images/edits \
-H "Authorization: Bearer <your-sealink-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-edit-max",
"image_url": "https://example.com/photo.png",
"prompt": "Add a rainbow in the sky",
"n": 1,
"size": "1024x1024"
}'
Python
from openai import OpenAI
client = OpenAI(
base_url="https://test.sealink.io/v1",
api_key="<your-sealink-key>",
)
response = client.images.edit(
model="qwen-image-edit-max",
image=open("photo.png", "rb"),
prompt="Add a rainbow in the sky",
n=1,
size="1024x1024",
)
print(response.data[0].url)
Node.js
import OpenAI from "openai";
import fs from "fs";
const client = new OpenAI({
baseURL: "https://test.sealink.io/v1",
apiKey: "<your-sealink-key>",
});
const response = await client.images.edit({
model: "qwen-image-edit-max",
image: fs.createReadStream("photo.png"),
prompt: "Add a rainbow in the sky",
n: 1,
size: "1024x1024",
});
console.log(response.data[0].url);

POST /v1/images/variations

Image variations. Generate variations of an input image with similar style but different content. Multipart/form-data only.

Parameters

ParameterTypeRequiredDescription
imagefileYesPNG image file, max 10MB, square
modelstringNoqwen-image-edit-max
nintegerNo1 - 10
sizestringNo256x256, 512x512, 1024x1024
cURL
# Multipart mode — upload local image
curl https://test.sealink.io/v1/images/variations \
-H "Authorization: Bearer <your-sealink-key>" \
-F "image=@photo.png" \
-F "model=qwen-image-edit-max" \
-F "n=2" \
-F "size=1024x1024"
Python
from openai import OpenAI
client = OpenAI(
base_url="https://test.sealink.io/v1",
api_key="<your-sealink-key>",
)
response = client.images.create_variation(
model="qwen-image-edit-max",
image=open("photo.png", "rb"),
n=2,
size="1024x1024",
)
print(response.data[0].url)
Node.js
import OpenAI from "openai";
import fs from "fs";
const client = new OpenAI({
baseURL: "https://test.sealink.io/v1",
apiKey: "<your-sealink-key>",
});
const response = await client.images.createVariation({
model: "qwen-image-edit-max",
image: fs.createReadStream("photo.png"),
n: 2,
size: "1024x1024",
});
console.log(response.data[0].url);

POST /v1/images/upscale

Image upscaling. Enlarge low-resolution images by 2x or 4x with enhanced clarity and detail.

Parameters

ParameterTypeRequiredDescription
modelstringYesreal-esrgan-x4
imagestringYesSource image base64 or URL
scaleintegerNo2 or 4
response_formatstringNourl, b64_json
cURL
curl https://test.sealink.io/v1/images/upscale \
-H "Authorization: Bearer <your-sealink-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "real-esrgan-x4",
"image": "https://example.com/low-res.jpg",
"scale": 4,
"response_format": "url"
}'
Python
import requests
res = requests.post(
"https://test.sealink.io/v1/images/upscale",
headers={"Authorization": "Bearer <your-sealink-key>"},
json={
"model": "real-esrgan-x4",
"image": "https://example.com/low-res.jpg",
"scale": 4,
"response_format": "url",
},
)
print(res.json()["data"][0]["url"])
Node.js
const res = await fetch("https://test.sealink.io/v1/images/upscale", {
method: "POST",
headers: {
Authorization: "Bearer <your-sealink-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "real-esrgan-x4",
image: "https://example.com/low-res.jpg",
scale: 4,
response_format: "url",
}),
});
const data = await res.json();
console.log(data.data[0].url);

POST /v1/images/style-transfer

Style transfer. Apply the artistic style of one image to the content of another.

Parameters

ParameterTypeRequiredDescription
modelstringYesip-adapter
imagestringYesContent image base64 or URL
style_referencestringYesStyle reference image base64 or URL
strengthnumberNo0 - 1
response_formatstringNourl, b64_json
cURL
curl https://test.sealink.io/v1/images/style-transfer \
-H "Authorization: Bearer <your-sealink-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "ip-adapter",
"image": "https://example.com/content.jpg",
"style_reference": "https://example.com/style.jpg",
"strength": 0.7,
"response_format": "url"
}'
Python
import requests
res = requests.post(
"https://test.sealink.io/v1/images/style-transfer",
headers={"Authorization": "Bearer <your-sealink-key>"},
json={
"model": "ip-adapter",
"image": "https://example.com/content.jpg",
"style_reference": "https://example.com/style.jpg",
"strength": 0.7,
"response_format": "url",
},
)
print(res.json()["data"][0]["url"])
Node.js
const res = await fetch("https://test.sealink.io/v1/images/style-transfer", {
method: "POST",
headers: {
Authorization: "Bearer <your-sealink-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "ip-adapter",
image: "https://example.com/content.jpg",
style_reference: "https://example.com/style.jpg",
strength: 0.7,
response_format: "url",
}),
});
const data = await res.json();
console.log(data.data[0].url);

POST /v1/images/background-remove

Background removal. Automatically detect and remove image backgrounds, returning a transparent PNG.

Parameters

ParameterTypeRequiredDescription
modelstringYesrmbg-v2
imagestringYesSource image base64 or URL
response_formatstringNourl, b64_json
cURL
curl https://test.sealink.io/v1/images/background-remove \
-H "Authorization: Bearer <your-sealink-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "rmbg-v2",
"image": "https://example.com/product.jpg",
"response_format": "url"
}'
Python
import requests
res = requests.post(
"https://test.sealink.io/v1/images/background-remove",
headers={"Authorization": "Bearer <your-sealink-key>"},
json={
"model": "rmbg-v2",
"image": "https://example.com/product.jpg",
"response_format": "url",
},
)
print(res.json()["data"][0]["url"])
Node.js
const res = await fetch("https://test.sealink.io/v1/images/background-remove", {
method: "POST",
headers: {
Authorization: "Bearer <your-sealink-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "rmbg-v2",
image: "https://example.com/product.jpg",
response_format: "url",
}),
});
const data = await res.json();
console.log(data.data[0].url);