SDK Generation
September 25, 2026 ยท View on GitHub
Disclaimer: The Hemmelig API is subject to change without notice. Generated SDKs may break with future updates. Use at your own risk.
Hemmelig exposes an OpenAPI 3.0 specification that can be used to generate client SDKs in various programming languages.
OpenAPI Specification
The OpenAPI spec is available at:
- Swagger UI:
/api/docs- Interactive API explorer - OpenAPI JSON:
/api/openapi.json- Raw specification
Generating an SDK
We recommend using OpenAPI Generator which supports 50+ languages.
Installation
npm install -g @openapitools/openapi-generator-cli
Generate SDK
# TypeScript
openapi-generator-cli generate \
-i https://your-instance.com/api/openapi.json \
-g typescript-axios \
-o ./hemmelig-sdk
# Python
openapi-generator-cli generate \
-i https://your-instance.com/api/openapi.json \
-g python \
-o ./hemmelig-sdk
# Go
openapi-generator-cli generate \
-i https://your-instance.com/api/openapi.json \
-g go \
-o ./hemmelig-sdk
View all available generators:
openapi-generator-cli list
Authentication
The API supports two authentication methods:
Bearer Token (API Key)
const client = new HemmeligApi({
baseURL: 'https://your-instance.com/api',
headers: {
Authorization: 'Bearer hemmelig_your_api_key_here',
},
});
Session Cookie
For browser-based applications, session cookies are automatically handled after authentication via /auth endpoints.
Important: Client-Side Encryption
Generated SDKs handle API communication only. You must implement client-side encryption before sending secrets to the API.
Hemmelig uses AES-256-GCM encryption. See the encryption documentation for implementation details.
Put the decryption key in the URL fragment of the link, for example https://example.com/s/<id>#<key>. Browsers never send the fragment to the server.