Zur Dokumentation springen
Dashboard öffnen
Auf dieser Seite

Benannte Referenzen

Referenznamen sind mit IDs eigener Medien verknüpft. Prüfe die Referenzfunktionen des gewählten Modells und behalte Namen, Reihenfolge und Konfiguration bei Angebot und Auftrag bei.

Referenzbindungen#

Ersetze Modell-IDs, Referenzfelder und Funktionsrevisionen der Beispiele durch aktuelle Katalogwerte. Die Unterstützung hängt vom Modell und Workflow ab.

Mit Referenzen kalkulieren#

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"            }          ]        }      }    }  }}'
Konfiguration
curl --version

Mit Referenzen absenden#

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"            }          ]        }      }    }  }}'
Konfiguration
curl --version

Assistant-Referenzen#

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"  }}'
Konfiguration
curl --version