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

# IA

> Interroge ChatGPT.

Chaque service est une requête `POST` avec ton token. Consulte [Appeler Total API depuis Total.js](../../guides/call-from-totaljs/) et [Appeler Total API en HTTP](../../guides/call-over-http/).

## API

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

Type: `rest`

Pose une question à ChatGPT.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `value` | `String` | yes |  | La question. |
| `output` | `String` | no | `text` | `text` ou `image`. |
| `size` | `String` | no |  | La taille d’une image : `small`, `medium` ou `large`. Seulement avec `output: image`. |

Returns: `Object` Un objet avec la réponse dans `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: Réponse
```json
{ "text": "Total.js Platform is a web development platform for Node.js..." }
```
