AI Assistant API
DRAFT — Internal Developer Use Only
This API reference is for internal development teams.
Overview
What it is: The AI assistant API provides access to Discovery's AI features: autocomplete for query building, agent sessions for interactive AI conversations, and model management.
Why it matters: Developers building AI-powered features or integrating AI capabilities into other Hydden products need to understand how to create sessions, send queries, and retrieve AI-generated responses.
Endpoints
| Method | Path | Description | Auth required |
|---|---|---|---|
POST | /internal/v1/ai/autocomplete | AI-powered query autocomplete | JWT + API token |
GET | /internal/v1/ai/models/:provider | List AI models by provider | JWT + API token |
POST | /internal/v1/ai/agent/session | Create a new AI agent session | JWT + API token |
GET | /internal/v1/ai/agent/sessions | List all agent sessions | JWT + API token |
GET | /internal/v1/ai/agent/sessions/:id | Get a specific agent session | JWT + API token |
POST /internal/v1/ai/autocomplete
Get AI-powered autocomplete suggestions for search queries and collector configurations.
Request:
POST /internal/v1/ai/autocomplete
Authorization: Bearer <token>
Content-Type: application/json
{
"input": "find all admin accounts with threat score",
"context": "global-search"
}Response (200):
{
"suggestions": [
"find all admin accounts with threat score above 80",
"find all admin accounts with threat score in critical range",
"find all admin accounts with threat score trending upward"
]
}POST /internal/v1/ai/agent/session
Create a new AI agent session for interactive conversations.
Request:
POST /internal/v1/ai/agent/session
Authorization: Bearer <token>
Content-Type: application/json
{
"context": "universal-collector",
"initialPrompt": "Help me create a sandboxed Python script for collecting data from a custom REST API"
}Response (201):
{
"sessionId": "session-uuid-001",
"status": "active",
"createdAt": "2026-02-12T10:00:00Z"
}GET /internal/v1/ai/models/:provider
List available AI models for a given provider.
Path parameters:
| Parameter | Type | Description |
|---|---|---|
provider | string | AI provider name |
Request:
GET /internal/v1/ai/models/default
Authorization: Bearer <token>Response (200):
{
"provider": "default",
"models": [
{
"id": "model-001",
"name": "Discovery Assistant",
"capabilities": ["autocomplete", "agent", "search"]
}
]
}