curl --request POST \
--url https://api.sinancode.com/v1/generate/k/mj-img2img \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Make it more colorful and vibrant",
"aspectRatio": "16:9",
"enableTranslation": false,
"fileUrls": [
"https://example.com/image.jpg"
],
"speed": "relaxed",
"stylization": 1,
"variety": 10,
"version": "7",
"waterMark": "my_watermark",
"weirdness": 1
}
'import requests
url = "https://api.sinancode.com/v1/generate/k/mj-img2img"
payload = {
"prompt": "Make it more colorful and vibrant",
"aspectRatio": "16:9",
"enableTranslation": False,
"fileUrls": ["https://example.com/image.jpg"],
"speed": "relaxed",
"stylization": 1,
"variety": 10,
"version": "7",
"waterMark": "my_watermark",
"weirdness": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'Make it more colorful and vibrant',
aspectRatio: '16:9',
enableTranslation: false,
fileUrls: ['https://example.com/image.jpg'],
speed: 'relaxed',
stylization: 1,
variety: 10,
version: '7',
waterMark: 'my_watermark',
weirdness: 1
})
};
fetch('https://api.sinancode.com/v1/generate/k/mj-img2img', 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.sinancode.com/v1/generate/k/mj-img2img",
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([
'prompt' => 'Make it more colorful and vibrant',
'aspectRatio' => '16:9',
'enableTranslation' => false,
'fileUrls' => [
'https://example.com/image.jpg'
],
'speed' => 'relaxed',
'stylization' => 1,
'variety' => 10,
'version' => '7',
'waterMark' => 'my_watermark',
'weirdness' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sinancode.com/v1/generate/k/mj-img2img"
payload := strings.NewReader("{\n \"prompt\": \"Make it more colorful and vibrant\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": false,\n \"fileUrls\": [\n \"https://example.com/image.jpg\"\n ],\n \"speed\": \"relaxed\",\n \"stylization\": 1,\n \"variety\": 10,\n \"version\": \"7\",\n \"waterMark\": \"my_watermark\",\n \"weirdness\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sinancode.com/v1/generate/k/mj-img2img")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Make it more colorful and vibrant\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": false,\n \"fileUrls\": [\n \"https://example.com/image.jpg\"\n ],\n \"speed\": \"relaxed\",\n \"stylization\": 1,\n \"variety\": 10,\n \"version\": \"7\",\n \"waterMark\": \"my_watermark\",\n \"weirdness\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sinancode.com/v1/generate/k/mj-img2img")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"Make it more colorful and vibrant\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": false,\n \"fileUrls\": [\n \"https://example.com/image.jpg\"\n ],\n \"speed\": \"relaxed\",\n \"stylization\": 1,\n \"variety\": 10,\n \"version\": \"7\",\n \"waterMark\": \"my_watermark\",\n \"weirdness\": 1\n}"
response = http.request(request)
puts response.read_body{
"task_id": "01234567-89ab-cdef-0123-456789abcdef"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}Midjourney Image to Image
Generate images from input images using Midjourney AI model (async)
curl --request POST \
--url https://api.sinancode.com/v1/generate/k/mj-img2img \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Make it more colorful and vibrant",
"aspectRatio": "16:9",
"enableTranslation": false,
"fileUrls": [
"https://example.com/image.jpg"
],
"speed": "relaxed",
"stylization": 1,
"variety": 10,
"version": "7",
"waterMark": "my_watermark",
"weirdness": 1
}
'import requests
url = "https://api.sinancode.com/v1/generate/k/mj-img2img"
payload = {
"prompt": "Make it more colorful and vibrant",
"aspectRatio": "16:9",
"enableTranslation": False,
"fileUrls": ["https://example.com/image.jpg"],
"speed": "relaxed",
"stylization": 1,
"variety": 10,
"version": "7",
"waterMark": "my_watermark",
"weirdness": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'Make it more colorful and vibrant',
aspectRatio: '16:9',
enableTranslation: false,
fileUrls: ['https://example.com/image.jpg'],
speed: 'relaxed',
stylization: 1,
variety: 10,
version: '7',
waterMark: 'my_watermark',
weirdness: 1
})
};
fetch('https://api.sinancode.com/v1/generate/k/mj-img2img', 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.sinancode.com/v1/generate/k/mj-img2img",
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([
'prompt' => 'Make it more colorful and vibrant',
'aspectRatio' => '16:9',
'enableTranslation' => false,
'fileUrls' => [
'https://example.com/image.jpg'
],
'speed' => 'relaxed',
'stylization' => 1,
'variety' => 10,
'version' => '7',
'waterMark' => 'my_watermark',
'weirdness' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sinancode.com/v1/generate/k/mj-img2img"
payload := strings.NewReader("{\n \"prompt\": \"Make it more colorful and vibrant\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": false,\n \"fileUrls\": [\n \"https://example.com/image.jpg\"\n ],\n \"speed\": \"relaxed\",\n \"stylization\": 1,\n \"variety\": 10,\n \"version\": \"7\",\n \"waterMark\": \"my_watermark\",\n \"weirdness\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sinancode.com/v1/generate/k/mj-img2img")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Make it more colorful and vibrant\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": false,\n \"fileUrls\": [\n \"https://example.com/image.jpg\"\n ],\n \"speed\": \"relaxed\",\n \"stylization\": 1,\n \"variety\": 10,\n \"version\": \"7\",\n \"waterMark\": \"my_watermark\",\n \"weirdness\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sinancode.com/v1/generate/k/mj-img2img")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"Make it more colorful and vibrant\",\n \"aspectRatio\": \"16:9\",\n \"enableTranslation\": false,\n \"fileUrls\": [\n \"https://example.com/image.jpg\"\n ],\n \"speed\": \"relaxed\",\n \"stylization\": 1,\n \"variety\": 10,\n \"version\": \"7\",\n \"waterMark\": \"my_watermark\",\n \"weirdness\": 1\n}"
response = http.request(request)
puts response.read_body{
"task_id": "01234567-89ab-cdef-0123-456789abcdef"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}{
"error_code": "<string>",
"message": "<string>"
}- Feature Preservation - Retain core features of original images while adding creative elements
- Style Transformation - Transform photos into unique Midjourney artistic styles
- Flexible Control - Control original image influence through weight parameters
- High-Quality Output - V7 enhanced textures and detail representation
Authorizations
Please use your API Token for authentication
Body
Task parameters
Prompt (required, max 2000 characters) - Text description for generation
1 - 2000"Make it more colorful and vibrant"
aspect ratio(optional)- outputaspect ratio
1:2, 9:16, 2:3, 3:4, 5:6, 6:5, 4:3, 3:2, 1:1, 16:9, 2:1 "16:9"
Enable translation (optional, default false) - Enable automatic translation
false
File URL list (optional) - Input image URL array
["https://example.com/image.jpg"]
Speed (optional) - API generation speed
relaxed, fast, turbo "relaxed"
Stylization (optional, range 0-1000) - Art style strength
0 <= x <= 10001
Diversity (optional, range 0-100, step 5) - Content diversity
0 <= x <= 10010
version(optional)- Midjourney modelversion
7, 6.1, 6, 5.2, 5.1, niji6 "7"
Watermark (optional) - Watermark identifier
"my_watermark"
Weirdness (optional, range 0-3000) - Creative uniqueness
0 <= x <= 30001
Response
OK
Task ID
"01234567-89ab-cdef-0123-456789abcdef"