OpenAPI & SDKs

Generate SDKs or import the API into Postman and Insomnia

CBCTHub publishes a complete OpenAPI 3.1 specification for API v1. It serves as the official technical contract and lets you auto-generate SDKs, import the API into Postman/Insomnia, and build type-safe clients in any language.

Spec URL

The spec is served as static JSON from the CDN, with open CORS and a 5-minute cache. It is the source of truth — it mirrors exactly what the production API returns.

http
GET https://cbcthub.com/openapi.json

Import into Postman / Insomnia / Bruno

  • PostmanPostman: File → Import → Link → paste the spec URL. Each endpoint becomes a request inside a "CBCTHub API" collection.
  • InsomniaInsomnia: Application → Preferences → Data → Import Data → From URL. Insomnia auto-detects OpenAPI 3.1 and creates the workspace.
  • BrunoBruno: import the spec as a collection from File → Import → OpenAPI v3.

Generate an SDK

Use openapi-generator-cli to create a full HTTP client in the language of your choice. The command downloads the spec, generates the code and drops it in ./cbcthub-sdk.

bash
# TypeScript (axios)
npx @openapitools/openapi-generator-cli generate \
  -i https://cbcthub.com/openapi.json \
  -g typescript-axios \
  -o ./cbcthub-sdk

# Python
npx @openapitools/openapi-generator-cli generate \
  -i https://cbcthub.com/openapi.json \
  -g python \
  -o ./cbcthub-sdk-python

# Go
npx @openapitools/openapi-generator-cli generate \
  -i https://cbcthub.com/openapi.json \
  -g go \
  -o ./cbcthub-sdk-go

# PHP
npx @openapitools/openapi-generator-cli generate \
  -i https://cbcthub.com/openapi.json \
  -g php \
  -o ./cbcthub-sdk-php

Popular generators: typescript-axios, typescript-fetch, python, php, go, java, csharp, ruby, rust, kotlin, swift5.

TypeScript: openapi-typescript (no runtime)

If you only need types (no generated client), openapi-typescript produces a single .d.ts file from the spec. It is the lightest option for Next.js or Deno projects.

bash
npx openapi-typescript https://cbcthub.com/openapi.json -o ./cbcthub-types.d.ts

Render as interactive docs

The same spec can be served with Scalar, Redoc or Swagger UI inside your own system (useful if you publish your own API built on top of CBCTHub).

html
<!-- Scalar -->
<script id="api-reference" data-url="https://cbcthub.com/openapi.json"></script>
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
The spec is versioned alongside the API (field info.version). Regenerate your SDK when we publish a new version to stay current.