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

# AI

> Opýtaj sa ChatGPT.

Každá služba je požiadavka `POST` s tvojím tokenom. Pozri si [Volanie Total API z Total.js](../../guides/call-from-totaljs/) a [Volanie Total API cez HTTP](../../guides/call-over-http/).

## API

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

Type: `rest`

Položí otázku ChatGPT.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `value` | `String` | yes |  | Otázka. |
| `output` | `String` | no | `text` | `text` alebo `image`. |
| `size` | `String` | no |  | Veľkosť obrázka: `small`, `medium` alebo `large`. Len s `output: image`. |

Returns: `Object` Objekt s odpoveďou v `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: Odpoveď
```json
{ "text": "Total.js Platform is a web development platform for Node.js..." }
```
