---
title: AI
project: Total API
version: 2026
section: reference
language: it
license: 
url: https://totaljs.es/docs/it/total-api/2026/reference/ai/
updated: 2026-11-20T06:51:47.968Z
---

# AI

> Fai una domanda a ChatGPT.

Ogni servizio è una richiesta `POST` con il tuo token. Leggi [Chiamare Total API da Total.js](../../guides/call-from-totaljs/) e [Chiamare Total API via HTTP](../../guides/call-over-http/).

## API

### POST https://api.totaljs.com/chatgpt/

Type: `rest`

Fa una domanda a ChatGPT.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `value` | `String` | yes |  | La domanda. |
| `output` | `String` | no | `text` | `text` o `image`. |
| `size` | `String` | no |  | La dimensione di un'immagine: `small`, `medium` o `large`. Solo con `output: image`. |

Returns: `Object` Un oggetto con la risposta in `text`.

Example: Total.js
```js
var answer = await API('TAPI', 'chatgpt', 'What is Total.js Platform?').promise();
console.log(answer.text);
```

Example: REST
```bash
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?" }'
```

Example: Risposta
```json
{ "text": "Total.js Platform is a web development platform for Node.js..." }
```
