API Overview
NL2SQL exposes two API surfaces: a Python Core API for in-process use and a REST API for remote clients. Use the links below for the full technical references.
Core API (Python)
- Location: Core package (
nl2sql) - Interface: Direct Python class interface (
NL2SQLclass and low-level functions) - Use Case: Embedded/SDK use in Python applications
- Reference: Core API index and per-module references:
- Core API index
- Auth API
- Datasource API
- LLM API
- Indexing API
- Query API
- Settings API
- Result API
REST API (FastAPI)
- Location: API package (
nl2sql-api) - Interface: HTTP REST endpoints
- Use Case: Remote clients, web applications, TypeScript CLI
- Reference: REST API index and per-route references:
- REST API index
- Health API
- Query API
- Datasource API
- LLM API
- Indexing API
Supporting contracts
GraphState(nl2sql.pipeline.state.GraphState)ExecutorRequest/ExecutorResponse(nl2sql.execution.contracts)ResultFrame(nl2sql_adapter_sdk.contracts)
Source references
- Context:
packages/nl2sql/src/nl2sql/context.py - Runtime:
packages/nl2sql/src/nl2sql/pipeline/runtime.py - Public API:
packages/nl2sql/src/nl2sql/public_api.py - API Package:
packages/api/src/nl2sql_api/