Uploads images to the Vimmerse platform for use in API requests.
After uploading, you'll receive a URL that can be used with the image_url parameter in other endpoints.
New Image URLs
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "ASSET_ID",
- "customer_id": "CUSTOMER_ID",
- "primary_user_id": "CUSTOMER_ID",
- "args": { },
- "results": [
- "result_url1",
- "result_url2"
], - "thumbnails": [ ],
- "status": "success",
- "mime_type": "MIMETYPE",
- "app_name": "FUNCTION_NAME",
- "created_at": "2025-05-06 16:35:59.840508+00:00",
- "updated_at": "2025-05-06 16:35:59.840508+00:00",
- "history": [ ]
}
}Generates high-quality images from text prompts using advanced AI models.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt |
string | Yes | - | Text description of the desired image. Be specific about style, composition, colors, and mood. |
quantity |
integer | No | 1 | Number of images to generate. Range: 1-4. |
option |
string | No | "Auto" | AI model to use. "Auto" automatically selects the best model. Other options depend on available models. |
aspect_ratio |
string | No | "16:9" | Image dimensions. Available: "21:9", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "9:21" |
creativity_strength |
integer | No | 5 | Control over creativity level. Range: 1-10. Higher values produce more creative variations. |
enhance_image |
boolean | No | false | Apply 1× super-resolution enhancement during post-processing for higher quality output. |
async_mode |
boolean | No | false | Enable asynchronous processing mode. Returns immediately with asset_id for polling. |
webhook_url |
string | No | null | URL to receive completion notification via POST request when processing completes. |
import requests
url = "https://api.vimmerse.net/image/text-2-image"
headers = {
'X-Api-Key': 'YOUR_API_KEY',
}
payload = {
"quantity": 3, # Number of images to generate (1-4)
"prompt": "A serene landscape with mountains and a lake at sunset",
"option": "Auto", # Image generation model
"aspect_ratio": "16:9" # Image aspect ratio
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
The API may return the following HTTP status codes:
200 - Success. Image generation initiated or completed (depending on async_mode).400 - Bad Request. Invalid parameters or missing required fields.402 - Payment Required. Insufficient credits in your account.500 - Internal Server Error. Please retry or contact support.New Image URLs
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "ASSET_ID",
- "customer_id": "CUSTOMER_ID",
- "primary_user_id": "CUSTOMER_ID",
- "args": { },
- "results": [
- "result_url1",
- "result_url2"
], - "thumbnails": [ ],
- "status": "success",
- "mime_type": "MIMETYPE",
- "app_name": "FUNCTION_NAME",
- "created_at": "2025-05-06 16:35:59.840508+00:00",
- "updated_at": "2025-05-06 16:35:59.840508+00:00",
- "history": [ ]
}
}Transforms images using text prompts with various editing modes.
image_file or image_url: Source image (required)prompt: Description of desired changes (required)option: Edit mode (required)aspect_ratio: Desired output ratio (optional)creativity_strength: 1-10 scale for creativity (default: 5)quantity: Number of variations, 1-4 (default: 1)import requests
url = "https://api.vimmerse.net/image/image-2-image"
payload = {
'prompt': 'Make the shoe blue and change the wall to a sky background',
'aspect_ratio': '16:9',
'option': 'Remake', # Redesign the image based on prompt
'creativity_strength': 3, # 1-10 scale
}
files=[
('image_file', ('image.png', open('/path/to/image.png', 'rb'), 'image/png'))
]
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.vimmerse.net/image/image-2-image"
payload = {
'prompt': 'Transform into a well-manicured shrub in an English garden',
'aspect_ratio': '16:9',
'creativity_strength': 3,
'option': "Restructure" # Completely restructures the image
}
files=[
('image_file', ('image.png', open('/path/to/image.png', 'rb'), 'image/png'))
]
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.vimmerse.net/image/image-2-image"
payload = {
'prompt': 'Transform into a majestic portrait style',
'aspect_ratio': '16:9',
'creativity_strength': 3,
'option': "Restyle" # Applies artistic style changes
}
files=[
('image_file', ('image.png', open('/path/to每一個.png', 'rb'), 'image/png'))
]
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.vimmerse.net/image/image-2-image"
payload = {
'prompt': 'Convert to a medieval castle scene',
'aspect_ratio': '16:9',
'creativity_strength': 3,
'option': "Sketch" # Converts image to sketch style
}
files=[
('image_file', ('image.png', open('/path/to/image.png', 'rb'), 'image/png'))
]
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.vimmerse.net/image/image-2-image"
payload = {
'prompt': 'Replace the shoe with a can of Pepsi',
'aspect_ratio': '16:9',
'creativity_strength': 3,
'option': "ReplaceWith"
}
files=[
('image_file', ('image.png', open('/path/to/image.png', 'rb'), 'image/png'))
]
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.vimmerse.net/image/image-2-image"
payload = {
'prompt': 'Recolor the green shirt to white',
'aspect_ratio': '16:9',
'creativity_strength': 3,
'option': "RecolorTo" # Changes colors in the image
}
files=[
('image_file', ('image.png', open('/path/to/image.png', 'rb'), 'image/png'))
]
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
New Image URLs
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "ASSET_ID",
- "customer_id": "CUSTOMER_ID",
- "primary_user_id": "CUSTOMER_ID",
- "args": { },
- "results": [
- "result_url1",
- "result_url2"
], - "thumbnails": [ ],
- "status": "success",
- "mime_type": "MIMETYPE",
- "app_name": "FUNCTION_NAME",
- "created_at": "2025-05-06 16:35:59.840508+00:00",
- "updated_at": "2025-05-06 16:35:59.840508+00:00",
- "history": [ ]
}
}Generates images with elements or replaces items based on prompts.
New Image URLs
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "ASSET_ID",
- "customer_id": "CUSTOMER_ID",
- "primary_user_id": "CUSTOMER_ID",
- "args": { },
- "results": [
- "result_url1",
- "result_url2"
], - "thumbnails": [ ],
- "status": "success",
- "mime_type": "MIMETYPE",
- "app_name": "FUNCTION_NAME",
- "created_at": "2025-05-06 16:35:59.840508+00:00",
- "updated_at": "2025-05-06 16:35:59.840508+00:00",
- "history": [ ]
}
}Manipulates the background of images with three modes: remove, replace, or restyle.
image2_file or image2_url to provide the replacement backgroundimage2_file or image2_url to provide the style reference| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image_file or image_url |
file/string | Yes | - | Main image with background to modify |
image2_file or image2_url |
file/string | Yes* | - | Background image for ReplaceBackground or RestyleBackground |
option |
string | Yes | - | Operation mode: "RemoveBackground", "ReplaceBackground", or "RestyleBackground" |
async_mode |
boolean | No | false | Enable asynchronous processing mode |
webhook_url |
string | No | null | URL to receive completion notification |
*Required for ReplaceBackground and RestyleBackground options
{REMOVE_BG_EXAMPLE}
{REPLACE_BG_EXAMPLE}
{RESTYLE_BG_EXAMPLE}
400 - Bad Request. Invalid parameters or missing required fields.402 - Insufficient credits.500 - Internal Server Error.Modified image url.
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "ASSET_ID",
- "customer_id": "CUSTOMER_ID",
- "primary_user_id": "CUSTOMER_ID",
- "args": { },
- "results": [
- "result_url1",
- "result_url2"
], - "thumbnails": [ ],
- "status": "success",
- "mime_type": "MIMETYPE",
- "app_name": "FUNCTION_NAME",
- "created_at": "2025-05-06 16:35:59.840508+00:00",
- "updated_at": "2025-05-06 16:35:59.840508+00:00",
- "history": [ ]
}
}Performs various image editing operations including text removal, upscaling, expansion, and inpainting.
aspect_ratio parameter| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image_file or image_url |
file/string | Yes | - | Source image to edit |
mask_file or mask_url |
file/string | Yes* | - | Mask image for inpainting (required for Inpaint option) |
option |
string | Yes | - | Edit operation: "RemoveText", "Upscale", "ExpandToAspectRatio", or "Inpaint" |
aspect_ratio |
string | Yes* | - | Desired ratio for ExpandToAspectRatio (e.g., "16:9", "9:16", "1:1") |
prompt |
string | Yes* | - | Description for Inpaint option (what to generate in masked area) |
quantity |
integer | No | 1 | Number of variations for Inpaint. Range: 1-4 |
expand_method |
string | No | "Outpaint" | Method for ExpandToAspectRatio: "Outpaint" or "Pad" |
expand_direction |
string | No | "center" | Direction for expansion: "center", "top/left", "bottom/right" |
reframe_parameters |
string (JSON) | No | null | JSON string for reframe parameters (grid_position_x, grid_position_y, x_start, x_end, y_start, y_end) |
async_mode |
boolean | No | false | Enable asynchronous processing mode |
webhook_url |
string | No | null | URL to receive completion notification |
*Required for specific options only
{REMOVE_TEXT_EXAMPLE}
{UPSCALE_IMAGE_EXAMPLE}
{EXPAND_IMAGE_EXAMPLE}
{INPAINT_IMAGE_EXAMPLE}
400 - Bad Request. Invalid parameters, missing required fields, or invalid option.402 - Insufficient credits.500 - Internal Server Error.Modified image url.
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "ASSET_ID",
- "customer_id": "CUSTOMER_ID",
- "primary_user_id": "CUSTOMER_ID",
- "args": { },
- "results": [
- "result_url1",
- "result_url2"
], - "thumbnails": [ ],
- "status": "success",
- "mime_type": "MIMETYPE",
- "app_name": "FUNCTION_NAME",
- "created_at": "2025-05-06 16:35:59.840508+00:00",
- "updated_at": "2025-05-06 16:35:59.840508+00:00",
- "history": [ ]
}
}Swaps faces in an image with faces from other uploaded images.
image_files: List of image files to upload (required if not using URLs)image_urls: List of image URLs (required if not using files)order_indices: Array of face indices to swap (optional, e.g., [0, 1])main_image_url: Deprecated - use image_urls insteadhuman_image_url: Deprecated - use image_urls insteadimport requests
url = "https://api.vimmerse.net/image/face-swap"
files=[
('image_files', ('main_image.png', open('/path/to/main_image.png', 'rb'), 'image/png')),
('image_files', ('human1_image.jpeg', open('/path/to/human_image.jpeg', 'rb'), 'image/jpeg')),
('image_files', ('human2_image.jpeg', open('/path/to/second_face.jpeg', 'rb'), 'image/jpeg'))
]
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
payload = {
'order_indices': [0, 1] # Optional: specify which faces to swap
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.vimmerse.net/image/face-swap"
payload = {
'image_urls': [
"https://example.com/main_image.png",
"https://example.com/human_image1.png",
"https://example.com/human_image2.png"
],
'order_indices': [0, 1] # Optional
}
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
New Image URLs
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "ASSET_ID",
- "customer_id": "CUSTOMER_ID",
- "primary_user_id": "CUSTOMER_ID",
- "args": { },
- "results": [
- "result_url1",
- "result_url2"
], - "thumbnails": [ ],
- "status": "success",
- "mime_type": "MIMETYPE",
- "app_name": "FUNCTION_NAME",
- "created_at": "2025-05-06 16:35:59.840508+00:00",
- "updated_at": "2025-05-06 16:35:59.840508+00:00",
- "history": [ ]
}
}Generates a virtual try-on image by overlaying clothing onto a human subject.
This API combines a human image and a clothing image to create a realistic visualization of how the clothing looks on the person.
human_image_file or human_image_url: Image of a person (required)clothes_image_file or clothes_image_url: Image of clothing to try on (required)option: Try-on method (default: "Auto")import requests
url = "https://api.vimmerse.net/image/try-on"
files=[
('human_image_file', ('human_image.jpeg', open('/path/to/human_image.jpeg', 'rb'), 'image/jpeg')),
('clothes_image_file', ('clothes_image.jpeg', open('/path/to/clothes_image.jpeg', 'rb'), 'image/jpeg'))
]
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
payload = {} # Optional parameters
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
import requests
url = "https://api.vimmerse.net/image/try-on"
payload = {
"human_image_url": "https://example.com/human_image.png",
"clothes_image_url": "https://example.com/clothes_image.png"
}
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
New Image URLs
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "ASSET_ID",
- "customer_id": "CUSTOMER_ID",
- "primary_user_id": "CUSTOMER_ID",
- "args": { },
- "results": [
- "result_url1",
- "result_url2"
], - "thumbnails": [ ],
- "status": "success",
- "mime_type": "MIMETYPE",
- "app_name": "FUNCTION_NAME",
- "created_at": "2025-05-06 16:35:59.840508+00:00",
- "updated_at": "2025-05-06 16:35:59.840508+00:00",
- "history": [ ]
}
}Transforms images into various artistic styles using AI-powered stylization.
image_file or image_url: Source image (required)style: Artistic style to apply (required)import requests
url = "https://api.vimmerse.net/image/restyle"
payload = {
'style': 'anime_style' # Apply anime style transformation
}
files=[
('image_file', ('image.png', open('/path/to/image.png', 'rb'), 'image/png'))
]
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
New Image URLs
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "ASSET_ID",
- "customer_id": "CUSTOMER_ID",
- "primary_user_id": "CUSTOMER_ID",
- "args": { },
- "results": [
- "result_url1",
- "result_url2"
], - "thumbnails": [ ],
- "status": "success",
- "mime_type": "MIMETYPE",
- "app_name": "FUNCTION_NAME",
- "created_at": "2025-05-06 16:35:59.840508+00:00",
- "updated_at": "2025-05-06 16:35:59.840508+00:00",
- "history": [ ]
}
}