Discussion textuelle
Utilisez directement les modèles de texte et suivez l’utilisation réelle des entrées, sorties et caches.
Modèles de texte#
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": {}}'Configuration
curl --versionLes tarifs textuels sont des plafonds affichés. L’usage réel en entrée, sortie et cache est facturé séparément.
Chiffrer un message texte#
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 } }}'Configuration
curl --versionEnvoyer un message texte#
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" } }}'Configuration
curl --versionHistorique de conversation textuelle#
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" } }}'Configuration
curl --versionLes crédits consommés et les débits du portefeuille sont distincts. Text Chat peut utiliser un solde déjà financé.