Intelligence Endpoints
Intelligence endpoints provide PRISM scoring, pattern detection, and recommendations.
GET /v1/intelligence/prism
Section titled “GET /v1/intelligence/prism”Pre-computed PRISM scores from Postgres.
GET /v1/intelligence/prism?from=2024-01-01T00:00:00Z&limit=100Authorization: Bearer gck_your_key| Parameter | Type | Default | Description |
|---|---|---|---|
session_id | string | — | Filter by session ID |
from | ISO8601 | — | Start time |
to | ISO8601 | — | End time |
limit | integer | 100 | Max records (max 1000) |
offset | integer | 0 | Pagination offset |
Response:
{ "scores": [ { "session_id": "...", "timestamp": "2024-01-01T12:00:00Z", "prism_score": 7.2, "pq": 8.0, "ie": 6.5, "vd": 7.0, "tu": 7.5, "af": 6.0, "coaching_notes": "Focus on iteration efficiency...", "anti_patterns": ["vague_prompt"], "scoring_method": "llm" } ], "total": 42}GET /v1/intelligence/worst-prompts
Section titled “GET /v1/intelligence/worst-prompts”Lowest-scoring prompts with text and coaching notes.
GET /v1/intelligence/worst-prompts?limit=10Authorization: Bearer gck_your_keyPOST /v1/intelligence/score-prompt
Section titled “POST /v1/intelligence/score-prompt”Real-time heuristic PQ scoring (stateless — does not persist).
POST /v1/intelligence/score-promptAuthorization: Bearer gck_your_keyContent-Type: application/json
{ "prompt_text": "Fix the bug in auth.ts"}Response: PRISM score object with all dimension scores.
Minimum prompt length: 5 characters.
GET /v1/intelligence/waste
Section titled “GET /v1/intelligence/waste”Waste pattern detection results.
GET /v1/intelligence/waste?limit=100Authorization: Bearer gck_your_key| Parameter | Type | Default | Description |
|---|---|---|---|
pattern | string | — | Filter by pattern name |
limit | integer | 100 | Max records (max 500) |
offset | integer | 0 | Pagination offset |
GET /v1/intelligence/throttle
Section titled “GET /v1/intelligence/throttle”Throttle impact analysis.
GET /v1/intelligence/throttle?limit=100Authorization: Bearer gck_your_key| Parameter | Type | Default | Description |
|---|---|---|---|
detector | string | — | Filter by detector name |
limit | integer | 100 | Max records (max 500) |
offset | integer | 0 | Pagination offset |
GET /v1/intelligence/rightsizing
Section titled “GET /v1/intelligence/rightsizing”Model and tier recommendations based on usage patterns.
GET /v1/intelligence/rightsizingAuthorization: Bearer gck_your_keyGET /v1/intelligence/recommendations
Section titled “GET /v1/intelligence/recommendations”Persisted recommendations from the recommendation engine.
GET /v1/intelligence/recommendations?status=new&limit=50Authorization: Bearer gck_your_key| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | — | Filter: new, acknowledged, resolved, dismissed |
category | string | — | Filter by category |
limit | integer | 50 | Max records (max 200) |
offset | integer | 0 | Pagination offset |
POST /v1/intelligence/recommendations/:id/status
Section titled “POST /v1/intelligence/recommendations/:id/status”Update recommendation status.
POST /v1/intelligence/recommendations/abc123/statusAuthorization: Bearer gck_your_keyContent-Type: application/json
{ "status": "resolved"}Valid statuses: new, acknowledged, resolved, dismissed.
GET /v1/intelligence/coaching
Section titled “GET /v1/intelligence/coaching”Cross-session behavioral coaching insights.
GET /v1/intelligence/coachingAuthorization: Bearer gck_your_key