テキストチャット
テキストモデルを直接使用し、入力・出力・キャッシュの実際の使用量を追跡します。
テキストモデル#
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": {}}'設定
curl --versionテキスト単価は表示上限です。実際の入力・出力・キャッシュ使用量は別々に課金されます。
テキストメッセージを見積もる#
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 } }}'設定
curl --versionテキストメッセージを送信#
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" } }}'設定
curl --versionテキスト会話の履歴#
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" } }}'設定
curl --version消費クレジットとウォレットの引き落としは別々に記録されます。Text Chatは事前に補充した残高を使用できます。