AI
Fai una domanda a ChatGPT.
In questa pagina
Ogni servizio è una richiesta POST con il tuo token. Leggi Chiamare Total API da Total.js e Chiamare Total API via HTTP.
API
rest
POST https://api.totaljs.com/chatgpt/
Fa una domanda a ChatGPT.
POST https://api.totaljs.com/chatgpt/| Parametro | Tipo | Descrizione |
|---|---|---|
value |
String |
La domanda. |
output? |
String |
text o image. Predefinito: text |
size? |
String |
La dimensione di un'immagine: small, medium o large. Solo con output: image. |
Restituisce Object Un oggetto con la risposta in 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..." }