AI
Ask ChatGPT.
On this page
Every service is a POST request with your token. See Call Total API from Total.js and Call Total API over HTTP.
API
rest
POST https://api.totaljs.com/chatgpt/
Asks ChatGPT a question.
POST https://api.totaljs.com/chatgpt/| Parameter | Type | Description |
|---|---|---|
value |
String |
The question. |
output? |
String |
text or image. Default: text |
size? |
String |
The size of an image: small, medium or large. Only with output: image. |
Returns Object An object with the answer 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..." }