# OpenAPI and SDKs

The full machine-readable description of this API is served at [`/api/v1/openapi.json`](/api/v1/openapi.json). It is OpenAPI 3.1, it is generated from the same definitions the request path enforces, and it is what these pages are rendered from, so it cannot describe an endpoint that does not exist.

## Generating a client

```bash Code generation
# TypeScript types from the served document
npx openapi-typescript https://news.itsbaba.com/api/v1/openapi.json -o src/baba-news.d.ts

# A full client in another language
npx @openapitools/openapi-generator-cli generate \
  -i https://news.itsbaba.com/api/v1/openapi.json \
  -g python \
  -o ./baba-news-client
```

## Versioning

The path carries the major version. `/api/v1` will not change shape under you: fields are added, never removed or retyped, and a breaking change would arrive as `/api/v2` with the old version kept alive while you move.

`info.version` in the document tracks additive changes, so you can pin generation to a known revision.

## For coding agents

Every page in this reference is served as raw Markdown at `/api/developers/docs/<page>.md`, and the whole set is downloadable as an [agent skill](/developers/docs/agent-skill) that a coding agent can read before writing a line of integration code.
