IA
Interroge ChatGPT.
Sur cette page
Chaque service est une requête POST avec ton token. Consulte Appeler Total API depuis Total.js et Appeler Total API en HTTP.
API
rest
POST https://api.totaljs.com/chatgpt/
Pose une question à ChatGPT.
POST https://api.totaljs.com/chatgpt/| Paramètre | Type | Description |
|---|---|---|
value |
String |
La question. |
output? |
String |
text ou image. Par défaut: text |
size? |
String |
La taille d’une image : small, medium ou large. Seulement avec output: image. |
Retourne Object Un objet avec la réponse dans text.
var answer = await API('TAPI', 'chatgpt', 'What is Total.js Platform?').promise();
console.log(answer.text);
curl -X POST https://api.totaljs.com/chatgpt/ \
-H "Content-Type: application/json" \
-H "X-Token: YOUR_TOKEN" \
-d '{ "value": "What is Total.js Platform?" }'
{ "text": "Total.js Platform is a web development platform for Node.js..." }