コンテンツへスキップ

画像から画像への AI 画像生成タスク V2 を実行します。

リクエスト

AI タスクは非同期です。機能ごとに Webhook がサポートされている場合は、Webhook による完了処理を優先します。Webhook エンドポイントを設定し、Webhook 署名を検証したうえで、success または error の通知が来たら、受け取った task_id を使ってタスクの結果を照会します。設定と検証の詳細は Webhook 統合ガイド を参照してください。

Webhook がサポートされていない場合、または統合に使えない場合は、ポーリングを実装します。AI タスクを送信した後、一定の間隔(例:10 秒ごと)でステータスエンドポイントをポーリングし、success または error になるまで待ちます。

セキュリティ
BearerAuthenticationV2
ボディapplication/json必須
Any of:
modelstring必須

モデル名。

Value:"youcam-image-v2"
promptstring, [ 1 .. 800 ] characters必須

生成画像に含めたい要素や視覚的特徴を記述する画像編集指示(ポジティブプロンプト)です。
このパラメータは中国語と英語に対応しており、最大長は 800 文字です。中国語 1 文字または英語 1 文字につき 1 文字としてカウントされます。

例:"Make the girl from Image 1 wear the black dress from Image 2 and sit in the pose from Image 3. Keep her clothing, hairstyle, and expression unchanged
negative_promptstring, [ 1 .. 500 ] characters

生成画像に含めたくないコンテンツを記述するネガティブプロンプトです。
このパラメータは中国語と英語に対応しており、最大長は 500 文字です。中国語 1 文字または英語 1 文字につき 1 文字としてカウントされます。

例:"low resolution, error, worst quality, low quality, disfigured, extra fingers, bad proportions."
sizestring

出力画像の解像度を幅*高さの形式(例:"1024*1536")で指定します。
- 幅と高さはそれぞれ [512, 2048] ピクセルの範囲内である必要があります。
- デフォルトでは、総ピクセル数は約 1024*1024 で、入力画像(または複数画像リクエストの場合は最後の画像)と類似のアスペクト比になります。
size パラメータを指定する場合、システムは size で指定された幅と高さをターゲットとして使用し、実際の出力画像の幅と高さを 16 の倍数に最も近い値に調整します。例えば、1033*1032 を指定した場合、出力画像の寸法は 1040*1024 になります。
一般的なアスペクト比の推奨解像度:
- 1:1: 1024*1024, 1536*1536
- 2:3: 768*1152, 1024*1536
- 3:2: 1152*768, 1536*1024
- 3:4: 960*1280, 1080*1440
- 4:3: 1280*960, 1440*1080
- 9:16: 720*1280, 1080*1920
- 16:9: 1280*720, 1920*1080
- 21:9: 1344*576, 2048*872

例:"1024*1024"
prompt_extendboolean

スマートプロンプト書き換えを有効にします。モデルがポジティブプロンプトを最適化します。ネガティブプロンプトには影響しません。

デフォルト:true
Enum ValueDescription
true

Enables rewriting. Use this for more diverse image content; the model adds details.

false

Disables rewriting. Use this for tighter control over image details.

例:true
src_file_urlsArray of strings, [ 1 .. 3 ] items必須

ファイルアップロード API から取得したファイル URL です。src_file_urls または src_file_ids のいずれかを指定してください。

例:
[ "https://example.com/selfie.jpg", "https://example.com/selfie.jpg", "https://example.com/selfie.jpg" ]
curl -i -X POST \
  https://yce-api-01.makeupar.com/s2s/v2.0/task/image-to-image/youcam \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "src_file_urls": [
      "https://example.com/selfie.jpg",
      "https://example.com/selfie.jpg",
      "https://example.com/selfie.jpg"
    ],
    "model": "youcam-image-v2",
    "prompt": "Make the girl from Image 1 wear the black dress from Image 2 and sit in the pose from Image 3. Keep her clothing, hairstyle, and expression unchanged, and ensure the action is natural and smooth.",
    "negative_prompt": "low resolution, error, worst quality, low quality, disfigured, extra fingers, bad proportions.",
    "size": "1024*1024",
    "prompt_extend": true
  }'

レスポンス

タスクの実行に成功しました

ボディapplication/json
statusinteger

レスポンスステータス

例:200
dataobject
レスポンス
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }