メインコンテンツへスキップ
POST
/
generate
/
k
/
gpt-image-2-image-to-image
GPT Image 2 画像から画像
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/gpt-image-2-image-to-image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input_urls": [
    "https://media.sinancode.com/examples/gpt-image-2/input.png"
  ],
  "prompt": "take a photo with Sam Altman in the conference room",
  "aspect_ratio": "auto",
  "nsfw_checker": true,
  "resolution": "1K"
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sinancode.com/llms.txt

Use this file to discover all available pages before exploring further.

OpenAI の GPT Image 2 モデルを使用して画像を編集します。 モデルの特徴:
  • 画像編集 - 1 枚以上の入力画像をサポート(各最大 30MB、jpeg/png/webp/jpg 対応)
  • 長いプロンプト - 最大 20000 文字のプロンプトに対応
  • 複数のアスペクト比 - auto、1:1、5:4、9:16、21:9、16:9、4:3、3:2、4:5、3:4、2:3 をサポート
  • 高解像度 - 1K / 2K / 4K 出力に対応
  • NSFW フィルタ - NSFW コンテンツチェックを選択可能(デフォルト有効)

承認

Authorization
string
header
必須

API Tokenを使用して認証を行ってください

ボディ

application/json

Task parameters

input_urls
string[]
必須

入力画像 URL リスト(必須、最大30MB、jpeg/png/webp/jpg対応)

Minimum array length: 1
:
[
"https://media.sinancode.com/examples/gpt-image-2/input.png"
]
prompt
string
必須

プロンプト(必須、最大20000文字)

Required string length: 1 - 20000
:

"take a photo with Sam Altman in the conference room"

aspect_ratio
enum<string>
デフォルト:auto

アスペクト比(オプション、デフォルト auto)

利用可能なオプション:
auto,
1:1,
5:4,
9:16,
21:9,
16:9,
4:3,
3:2,
4:5,
3:4,
2:3
:

"auto"

nsfw_checker
boolean
デフォルト:true

NSFW チェック(オプション、デフォルト true)

:

true

resolution
enum<string>
デフォルト:1K

解像度(オプション、デフォルト 1K)

利用可能なオプション:
1K,
2K,
4K
:

"1K"

レスポンス

OK

task_id
string
必須

タスクID

:

"01234567-89ab-cdef-0123-456789abcdef"