Ir a la documentación
Abrir panel
En esta página

Chat de texto

Usa modelos de texto directamente y sigue el uso real de entrada, salida y caché.

Modelos de texto#

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": {}}'
Configuración
curl --version

Las tarifas de texto son máximos mostrados. La entrada, salida y caché reales se cobran por separado.

Cotizar mensaje de texto#

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    }  }}'
Configuración
curl --version

Enviar mensaje de texto#

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"    }  }}'
Configuración
curl --version

Historial de conversación de texto#

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"    }  }}'
Configuración
curl --version

Los créditos consumidos y los débitos de la cartera son distintos. Text Chat puede usar un saldo ya financiado.