名前付き参照
参照ラベルは所有する素材の ID に紐づきます。選択したモデルの参照機能を確認し、見積もりと送信でラベル、順序、設定を一致させてください。
参照の紐付け#
例のモデル ID、参照フィールド、機能リビジョンは最新の検出結果に置き換えてください。参照への対応はモデルとワークフローによって異なります。
参照付きで見積もる#
curl -X POST 'https://platform.tongai.io/v1/tools/tong_generation_quote/operations' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 45be69f1-c266-4a09-a82c-bf3c6303eb03" \ -d '{ "input": { "body": { "operation": "IMAGE_EDIT", "model": "MODEL_ID_FROM_DISCOVERY", "inputAssetIds": [ "aaaaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbb" ], "referenceRequest": { "prompt": "Keep the subject in @Image1 and use the setting in @Image2.", "assetIds": [ "aaaaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbb" ], "direction": { "version": 1, "capabilityRevision": "REVISION_FROM_MODEL_CONFIGURATION", "references": [ { "id": "subject", "assetId": "aaaaaaaaaaaaaaaaaaaaaaaa", "field": "images", "label": "Image1" }, { "id": "setting", "assetId": "bbbbbbbbbbbbbbbbbbbbbbbb", "field": "images", "label": "Image2" } ] } } } }}'設定
curl --version参照付きで送信#
curl -X POST 'https://platform.tongai.io/v1/tools/tong_generation_submit/operations' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 45be69f1-c266-4a09-a82c-bf3c6303eb03" \ -d '{ "input": { "params": { "id": "cccccccccccccccccccccccc" }, "body": { "operation": "IMAGE_EDIT", "quoteId": "QUOTE_SUBMIT_VALUE", "prompt": "Keep the subject in @Image1 and use the setting in @Image2.", "inputAssetIds": [ "aaaaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbb" ], "parameters": { "imageModel": "MODEL_ID_FROM_DISCOVERY", "referenceDirection": { "version": 1, "capabilityRevision": "REVISION_FROM_MODEL_CONFIGURATION", "references": [ { "id": "subject", "assetId": "aaaaaaaaaaaaaaaaaaaaaaaa", "field": "images", "label": "Image1" }, { "id": "setting", "assetId": "bbbbbbbbbbbbbbbbbbbbbbbb", "field": "images", "label": "Image2" } ] } } } }}'設定
curl --versionAssistantの参照#
curl -X POST 'https://platform.tongai.io/v1/tools/tong_assistant_start/operations' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 45be69f1-c266-4a09-a82c-bf3c6303eb03" \ -d '{ "input": { "message": "Animate @Image1 and preserve the subject in @Image2.", "attachments": [ "aaaaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbb" ], "reference_bindings": [ { "label": "Image1", "assetId": "aaaaaaaaaaaaaaaaaaaaaaaa" }, { "label": "Image2", "assetId": "bbbbbbbbbbbbbbbbbbbbbbbb" } ], "mode": "guided" }}'設定
curl --version