AI タスクは非同期です。機能ごとに Webhook がサポートされている場合は、Webhook による完了処理を優先します。Webhook エンドポイントを設定し、Webhook 署名を検証したうえで、success または error の通知が来たら、受け取った task_id を使ってタスクの結果を照会します。設定と検証の詳細は Webhook 統合ガイド を参照してください。
Webhook がサポートされていない場合、または統合に使えない場合は、ポーリングを実装します。AI タスクを送信した後、一定の間隔(例:10 秒ごと)でステータスエンドポイントをポーリングし、success または error になるまで待ちます。
セキュリティ
BearerAuthenticationV2
望ましい画像の内容、スタイル、構成を記述するポジティブプロンプト。
中国語と英語をサポートします。最大長は 800 文字です。中国語の文字、英数字、記号はそれぞれ 1 文字としてカウントされます。
例:"A sitting orange cat with a joyful expression, lively and adorable, highly realistic."
画像に含めたくない内容を記述するネガティブプロンプト。
中国語と英語をサポートします。最大長は 500 文字です。
例:"Low resolution, low quality, distorted limbs, malformed fingers, oversaturated colors, wax-like appearance, no facial details, overly smooth surfaces
出力画像の解像度。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"
- https://yce-api-01.makeupar.comhttps://yce-api-01.makeupar.com/s2s/v2.0/task/text-to-image/youcam
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
}'レスポンス
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }