> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shopsniffer.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI-powered chat about store data

Streaming SSE endpoint. Optionally authenticated via Clerk JWT for higher rate limits.

` POST /chat `

AI-powered chat about store data

Streaming SSE endpoint. Optionally authenticated via Clerk JWT for higher rate limits.

## Servers

- ` https://shopsniffer.com/api `

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` BearerAuth `: ` http `

  - HTTP scheme: ` bearer `

  - Clerk JWT token

### Alternative 2

- ` ApiKeyAuth `: ` apiKey `

  - Credential: ` X-API-Key ` in ` header `

  - API key created via POST /api/api-keys

## Request body (required)

Content type: ` application/json `

- ` value `: type ` unknown `

## Responses

### ` 200 ` — SSE stream with chat responses

### ` 400 ` — Missing jobId or messages

### ` 429 ` — Rate limit or token budget exceeded

## Request examples

### cURL

```curl
curl -X POST 'https://shopsniffer.com/api/chat' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d 'null'
```

### JavaScript

```javascript
const response = await fetch('https://shopsniffer.com/api/chat', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify(null)
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://shopsniffer.com/api/chat', headers=headers, json=null)
print(response.json())
```