コンテンツへスキップ

V2.0

AI 画像生成 V2.0 API で、テキストプロンプトまたは既存の画像から画像を生成します。

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

リクエスト

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

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

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

モデル名。

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

望ましい画像の内容、スタイル、構成を記述するポジティブプロンプト。
中国語と英語をサポートします。最大長は 800 文字です。中国語の文字、英数字、記号はそれぞれ 1 文字としてカウントされます。

例:"A sitting orange cat with a joyful expression, lively and adorable, highly realistic."
negative_promptstring, [ 1 .. 500 ] characters

画像に含めたくない内容を記述するネガティブプロンプト。
中国語と英語をサポートします。最大長は 500 文字です。

例:"Low resolution, low quality, distorted limbs, malformed fingers, oversaturated colors, wax-like appearance, no facial details, overly smooth surfaces
sizestring

出力画像の解像度。width*height 形式で指定します。
サポートされている解像度とアスペクト比:
- 1664*928 (初期値): 16:9
- 1472*1104: 4:3
- 1328*1328: 1:1
- 1104*1472: 3:4
- 928*1664: 9:16

デフォルト:"1664*928"
Enum:"1664*928""1472*1104""1328*1328""1104*1472""928*1664"
例:"1664*928"
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
curl -i -X POST \
  https://yce-api-01.makeupar.com/s2s/v2.0/task/text-to-image/youcam \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "youcam-image-v2",
    "prompt": "A sitting orange cat with a joyful expression, lively and adorable, highly realistic.",
    "negative_prompt": "Low resolution, low quality, distorted limbs, malformed fingers, oversaturated colors, wax-like appearance, no facial details, overly smooth surfaces, AI-generated look. Chaotic composition. Blurry or distorted text.",
    "size": "1664*928",
    "prompt_extend": true
  }'

レスポンス

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

ボディapplication/json
statusinteger

レスポンスステータス

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