---
title: "Send request to ChatGPT"
method: POST
path: "/api/v1/services/stats/gpt"
tags: ["stats_service"]
---

# Send request to ChatGPT

`POST /api/v1/services/stats/gpt`

## Query parameters

- `project_id` integer, required
- `chain` 'mainnet' | 'testnet'

## Request body

- object
  - `message` string, required
  - `context` string

## Response `200`

Answer from ChatGPT

- object
  - `message` string, required
  - `valid` boolean, required

## Other responses

- `400` — Something went wrong on client side
- `403` — Access token is missing or invalid
- `404` — The specified resource was not found
- `500` — Something went wrong on server side

## Changes

- **2024-03-22** `dbd561304b3b` — 1 info
  - added the new optional `query` request parameter `chain`
- **2023-12-01** `068f1873edc4` — 2 info
  - added the new optional request property `context`
  - added the required property `valid` to the response with the `200` status
- **2023-11-29** `4a39c0288b15` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/changes/api/v1/services/stats/gpt/post.md)

---

[API](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console.md) · [All operations](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tonkeeper/rest-api-to-ton-console/revisions/bffcc11719d3/schema)
