Introduction
The OneSight Open API provides RESTful endpoints for external applications (mobile apps, POS systems, IoT devices) to leverage OneSight’s AI capabilities.Key Features
| Feature | Description | Endpoint |
|---|---|---|
| AI Chat | OpenAI-compatible chat API with streaming | POST /api/openapi/v1/chat/completions |
| Data Ingestion | Schema-free event data collection | POST /api/openapi/v1/data/events |
| Model List | List available Open API models | GET /api/openapi/v1/models |
| Usage Stats | Per-key usage statistics | GET /api/openapi/v1/usage |
Architecture
Quick Start
1. Get an API Key
Log in as a tenant admin, navigate to Open API from the profile menu, and create a new API key.2. Make a Chat Request
3. Parse the Response
SSE streaming format:Authentication
All Open API requests require anAuthorization: Bearer {API_KEY} header.
See Authentication for details.
Model Isolation
Open API models are managed separately from tenant chat models. Models created with theOpen API type in the admin panel are only accessible via the Open API.