OpenAPI and Client Generation
The Streamdiver API is built on the OpenAPI 3.0 standard. This means you can use the spec not just to read documentation, but to generate production-ready code for your integration – in any language, with full type safety.
OpenAPI (formerly Swagger) is a standardized, machine-readable format that describes a REST API's endpoints, request/response schemas, authentication methods, and data models in a single JSON file. One spec – understood by tools, code generators, and AI assistants alike.
- Language-agnostic – one spec, any programming language
- Single source of truth – models, endpoints, and types always match the live API
- Automation-friendly – generate clients, documentation, and tests from the same file
Generate a Client Library
Instead of manually writing HTTP requests and data models, generate a fully typed client from the Streamdiver spec. You get:
- API client classes with methods for every endpoint
- Data models and types matching the API's request/response schemas
- Authentication handling (OAuth 2.0 flows)
- Input validation based on the spec's schema constraints
Quick Example
Generate a TypeScript client in one command:
openapi-generator-cli generate \
-i https://api.streamdiver.com/v2/openapi.json \
-g typescript-axios \
-o ./streamdiver-client
This gives you a fully typed client with methods like assetsApi.getAsset(id), uploadsApi.createUpload(payload), etc. – no manual typing required.
Popular Tools
| Tool | Languages | Link |
|---|---|---|
| openapi-generator | 50+ languages (TypeScript, Python, Java, C#, Go, Rust, ...) | openapi-generator.tech |
| Kiota | TypeScript, Python, Java, C#, Go, PHP | learn.microsoft.com/openapi/kiota |
| Swagger Codegen | 40+ languages | swagger.io/tools/swagger-codegen |
Works Great with AI Coding Assistants
The OpenAPI spec gives AI coding assistants structured, complete knowledge of the entire API. Feed it to Cursor, Copilot, or any LLM to:
- Generate integration code that is accurate and type-safe
- Ask questions about available endpoints and data models
- Scaffold entire integrations based on the real API structure
AI tools produce significantly better results from a structured spec than from prose documentation alone.
Further Resources
- Interactive API Reference – explore and test all endpoints in the browser
- Quick Start – auth, upload, and embed in 5 minutes