Execute Query
Talk to your data! Execute a query against the database using DeepQuery v1.
Database ID and environment are looked up automatically from API key + database_name.
Headers:
- Authorization: Bearer {api_key} - Captain API key for authentication
- X-Organization-ID: Organization UUID
- Idempotency-Key: UUID for request deduplication (optional)
Parameters:
- query: The natural language query
- database_name: Name of the database to query
- include_files: Whether to include relevant files in the response (default: False)
- stream: Enable real-time streaming via S2 (default: False)
Authentication: Requires valid API key in Authorization header
Returns: 404 if database not found or has been deleted
Headers
Authorization
Captain API key for authentication
X-Organization-ID
Organization UUID
Request
This endpoint expects an object.
query
database_name
include_files
Include relevant file information in the response
stream
Enable streaming response via Server-Sent Events (SSE)
inference
Enable LLM inference to generate AI-powered answers. When disabled, returns raw search results for custom RAG pipelines.
topK
Number of top results to return from the search
Response
Successful Response