Textchat
Textmodelle direkt verwenden und tatsächliche Eingabe-, Ausgabe- und Cache-Nutzung verfolgen.
Textmodelle#
curl -X POST 'https://platform.tongai.io/v1/tools/tong_text_models/operations' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "input": {}}'Konfiguration
curl --versionTextpreise sind angezeigte Höchstsätze. Tatsächliche Eingabe-, Ausgabe- und Cache-Nutzung werden getrennt berechnet.
Textnachricht kalkulieren#
curl -X POST 'https://platform.tongai.io/v1/tools/tong_text_quote/operations' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 45be69f1-c266-4a09-a82c-bf3c6303eb03" \ -d '{ "input": { "body": { "model": "tong_5c5b990cb58f50dd87ef1ef6", "prompt": "Write a short scene at blue hour.", "maxOutputTokens": 1024 } }}'Konfiguration
curl --versionTextnachricht senden#
curl -X POST 'https://platform.tongai.io/v1/tools/tong_text_submit/operations' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 45be69f1-c266-4a09-a82c-bf3c6303eb03" \ -d '{ "input": { "body": { "quoteId": "000000000000000000000002" } }}'Konfiguration
curl --versionTextunterhaltungsverlauf#
curl -X POST 'https://platform.tongai.io/v1/tools/tong_text_history/operations' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "input": { "params": { "id": "aaaaaaaaaaaaaaaaaaaaaaaa" } }}'Konfiguration
curl --versionVerbrauchte Credits und Wallet-Abbuchungen werden getrennt erfasst. Text Chat kann ein bereits aufgeladenes Guthaben nutzen.