# AIOZ Stream API Documentation > Complete API reference for AIOZ Stream — a decentralized video infrastructure platform supporting video-on-demand, live streaming, audio, analytics, and more. > SDK: npm install @aiozstream/nodejs-client ## Instructions for AI Assistants 1. Use environment variables for credentials — never hardcode API keys or tokens. 2. SDK authentication: new StreamClient({ publicKey: process.env.AIOZ_PUBLIC_KEY, secretKey: process.env.AIOZ_SECRET_KEY }) 3. For APIs not yet in the SDK (payments, live streaming, users), use fetch with stream-public-key / stream-secret-key headers (or Bearer JWT for payments and users). 4. Base URL: https://api.aiozstream.network/api 5. Use offset/limit pagination (default limit: 25, max: 100). 6. Always create a media object first, then upload the file separately. 7. Poll video.getDetail(id) for status 'done' before returning playback URLs. 8. Live streaming requires a stream key to exist before creating a session. 9. Webhook events: file_received, encoding_started, partial_finished, encoding_finished, encoding_failed. 10. API key types: full_access (all operations) | only_upload (upload only). ## Full Reference - [Complete API Reference (single file)](/docs/llms-full.txt): All endpoints, SDK examples, and error handling in one file (~40 KB) ## API Sections - [API Keys](https://aiozstream.network/docs/llms/api-keys.md): Generate and manage API key credentials — create, list, update, delete - [Media – Video](https://aiozstream.network/docs/llms/media-video.md): Create video objects, upload files, poll encoding status, manage metadata and thumbnails - [Media – Audio](https://aiozstream.network/docs/llms/media-audio.md): Create audio objects, upload files, encoding quality presets - [Media Chapters](https://aiozstream.network/docs/llms/media-chapters.md): Upload .vtt chapter files per language, list and delete chapters - [Media Transcripts](https://aiozstream.network/docs/llms/media-transcripts.md): Upload .vtt transcript files per language, set default transcript - [Players](https://aiozstream.network/docs/llms/players.md): Create and customize video player themes, assign to videos - [Playlists](https://aiozstream.network/docs/llms/playlists.md): Create and manage video playlists, add/remove/reorder items - [Webhooks](https://aiozstream.network/docs/llms/webhooks.md): Subscribe to encoding lifecycle events, test webhook delivery - [Analytics](https://aiozstream.network/docs/llms/analytics.md): Query aggregated metrics, breakdowns by dimension, and timeseries data - [Payments](https://aiozstream.network/docs/llms/payments.md): Retrieve usage statistics, top-up history, and billing records - [Live Streaming](https://aiozstream.network/docs/llms/live-streaming.md): Create live stream sessions, get statistics, multicast to multiple platforms - [Users](https://aiozstream.network/docs/llms/users.md): Get current user profile and account information