API Overview & Authentication
OneASR provides a standardized, high-performance REST and WebSocket API suite for speech recognition, media parsing, and file management.
Base URLs
- Local Deployment:
http://localhost:8000 - OpenAI Compatible Endpoint:
http://localhost:8000/v1 - Realtime WebSocket Endpoint:
ws://localhost:8000/v1/realtime(or/v1/realtimeext)
Authentication
All requests to OneASR endpoints require a valid API key configured in config.yaml (api_key: sk-oneasr-...).
You can pass the API key using any of the following three methods:
1. HTTP Bearer Token (Standard OpenAI Format)
http
Authorization: Bearer sk-oneasr-v1-p_L3kXm9QZ8sT2vA4wE7rY1u2. Custom Header (X-API-Key)
http
X-API-Key: sk-oneasr-v1-p_L3kXm9QZ8sT2vA4wE7rY1u3. Query Parameter (Recommended for WebSockets)
text
ws://localhost:8000/v1/realtime?api_key=sk-oneasr-v1-p_L3kXm9QZ8sT2vA4wE7rY1uFunctional API Groups
| Group | Endpoints | Protocol | Description |
|---|---|---|---|
| OpenAI Audio | /v1/audio/transcriptions, /v1/models | HTTP REST | Drop-in OpenAI speech recognition and model discovery |
| Realtime Stream | /v1/realtime, /v1/realtimeext | WebSocket | Low-latency duplex live audio streaming with VAD |
| File Transcription | /v1/file-transcription/transcriptions | HTTP & SSE | Async background processing for large media files (up to 2GB) |
| File Storage | /v1/files/*, /v1/files/fetch-url | HTTP REST | File uploads, storage management, and remote URL downloads |
| Media & Engine | /v1/media/parse, /v1/providers | HTTP REST | Media track extraction and engine provider status |
