# Ask AI a question

`POST https://api.cryptohopper.com/v1/user/askai`

Part of [Users](https://www.cryptohopper.com/api-documentation/api-reference/users.md) in the Cryptohopper API reference.

Sends a question to Ask AI, the Cryptohopper assistant, for one section. A plain question is answered as a stream of Server-Sent Events (Content-Type text/event-stream), not as JSON.

OAuth scope: `read`, `user`

No response example: the event stream is produced by the separate AI gateway service and its format is not defined in this codebase. A form-encoded request with suggestion_id returns the stored answer of that suggested question as JSON instead. To answer a confirmation card from an earlier streamed answer, POST confirm_id with action confirm or cancel (and optionally session_id) instead of a question.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Example request

```bash
curl -X POST "https://api.cryptohopper.com/v1/user/askai" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"page":"dashboard","question":"Why is my bot not buying?"}'
```

## Response

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
