# Get AI insights

> GET https://api.nabrah.ai/api/ext/insights/ai

Group: Analytics. Page: https://www.nabrah.ai/en/docs/api-reference/analytics/get-ai-insights

Returns the workspace's AI insights: whether they are turned on and allowed on your plan, how often they run, the status of the latest run, and that run's findings in `run`. Runs happen on the schedule set in the dashboard; this endpoint only reads them and costs no credits.

## Authorization

- `X-API-Key` (string, header, required): your workspace API key.

## Response

### 200 Successful Response

Content type: `application/json`

```json
{
  "enabled": false,
  "can_manage": false,
  "every_hours": 0,
  "status": "string",
  "run_credits": 0,
  "monthly_credits_estimate": 0,
  "plan_allowed": false,
  "run": {
    "id": "00000000-0000-4000-8000-000000000000",
    "trigger": "string",
    "as_of": "2026-01-15T12:00:00.000Z",
    "finished_at": "2026-01-15T12:00:00.000Z",
    "layout": {},
    "metrics": {},
    "output": {}
  },
  "running_since": "2026-01-15T12:00:00.000Z",
  "next_run_at": "2026-01-15T12:00:00.000Z",
  "refresh_available_at": "2026-01-15T12:00:00.000Z",
  "free_retry": false,
  "last_skip_reason": "string"
}
```

## Request examples

### cURL

```bash
curl --request GET \
  --url 'https://api.nabrah.ai/api/ext/insights/ai' \
  --header 'X-API-Key: <your-api-key>'
```

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/insights/ai"
headers = {"X-API-Key": "<your-api-key>"}

response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.nabrah.ai/api/ext/insights/ai", {
  method: "GET",
  headers: { "X-API-Key": "<your-api-key>" },
});

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

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.nabrah.ai/api/ext/insights/ai", nil)
	req.Header.Set("X-API-Key", "<your-api-key>")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```
