Midjourney 画像から画像生成
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
Midjourney 画像から画像
Midjourney AI モデルを使用して入力画像から画像を生成します(非同期)
POST
/
generate
/
k
/
mj-img2img
Midjourney 画像から画像生成
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 V7 モデルを使用して画像をベースに新しいアート作品を生成します。
モデルの特徴:
- 特徴保持 - 元画像のコア特徴を保持しながらクリエイティブな要素を追加
- スタイル変換 - 写真を独自の Midjourney アートスタイルに変換
- 柔軟なコントロール - 重みパラメータで元画像の影響度を制御
- 高品質出力 - V7 で強化されたテクスチャとディテール表現
承認
API Tokenを使用して認証を行ってください
ボディ
application/json
タスクパラメータ
プロンプト(必須、最大2000文字)- 生成するテキスト記述
Required string length:
1 - 2000例:
"Make it more colorful and vibrant"
アスペクト比(オプション)- 出力アスペクト比
利用可能なオプション:
1:2, 9:16, 2:3, 3:4, 5:6, 6:5, 4:3, 3:2, 1:1, 16:9, 2:1 例:
"16:9"
翻訳を有効にする(オプション、デフォルト false)- 自動翻訳を有効にする
例:
false
ファイルURLリスト(オプション)- 入力画像URLの配列
例:
["https://example.com/image.jpg"]
速度(オプション)- API生成速度
利用可能なオプション:
relaxed, fast, turbo 例:
"relaxed"
スタイライゼーション(オプション、範囲 0-1000)- 芸術的スタイルの強度
必須範囲:
0 <= x <= 1000例:
1
多様性(オプション、範囲 0-100、ステップ5)- コンテンツの多様性
必須範囲:
0 <= x <= 100例:
10
バージョン(オプション)- Midjourneyモデルバージョン
利用可能なオプション:
7, 6.1, 6, 5.2, 5.1, niji6 例:
"7"
ウォーターマーク(オプション)- ウォーターマーク識別子
例:
"my_watermark"
奇妙さ(オプション、範囲 0-3000)- 創造的な独自性
必須範囲:
0 <= x <= 3000例:
1
レスポンス
OK
タスクID
例:
"01234567-89ab-cdef-0123-456789abcdef"
⌘I