OpenAPI specification
Download the spec, generate type-safe clients, and stay in sync with API changes
Akua publishes an OpenAPI 3.1 specification that describes every endpoint, parameter, and response shape in this documentation. Use it to generate type-safe clients in any language, validate requests in your tests, and keep your integrations in lockstep with the API.
Where to get the spec
The public OpenAPI document is served at:
https://api.akua.dev/openapi.json
Use that URL for downloads and codegen. It reflects the deployed public API. The same document is published with these docs at https://docs.akua.dev/openapi-public.json; vendor that file when a build must pin to a stable input instead of fetching the live document.
Generate a client
Most languages have mature OpenAPI codegen tooling. Pick whichever fits your stack:
TypeScript and JavaScript
openapi-typescript generates a single .d.ts file with no runtime dependencies. Pair it with openapi-fetch for a type-safe fetch wrapper.
# Install a reviewed exact version, then generate types without network fallback
bun add --dev --exact openapi-typescript@7.13.0
bun node_modules/openapi-typescript/bin/cli.js https://api.akua.dev/openapi.json -o src/akua-api.d.tsimport createClient from 'openapi-fetch';
import type { paths } from './akua-api';
const client = createClient<paths>({
baseUrl: 'https://api.akua.dev/v1',
headers: {
Authorization: `Bearer ${process.env.AKUA_API_TOKEN}`,
// Optional: omit when using a workspace API token (workspace is implied).
// Set only for broad credentials to select the target workspace.
'Akua-Context': process.env.AKUA_WORKSPACE_ID
}
});
const { data, error } = await client.GET('/installs/{id}', {
params: { path: { id: 'INSTALL_ID' } }
});Go
oapi-codegen generates a strongly typed Go client.
# Generate a client package
go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen \
-package akua \
-generate types,client \
-o akua/client.gen.go \
https://api.akua.dev/openapi.jsonPython
openapi-python-client emits a Pydantic-typed package.
uvx openapi-python-client generate --url https://api.akua.dev/openapi.jsonOther languages
The OpenAPI Generator project ships generators for 50+ languages, including Java, C#, Rust, PHP, and Ruby. The Akua spec is plain OpenAPI 3.1, so any compliant generator works.
Stay in sync
Fetch the live document and cache it briefly so new endpoints become available as soon as they ship:
curl -fsS https://api.akua.dev/openapi.json -o ./vendor/akua-openapi.json