# AZAI Solutions API

A public, read-only JSON API for AZAI Solutions and AZAI Hub: company details, the product, pricing, the changelog, articles, and case studies. No key, no signup.

## Quickstart

```sh
curl https://azaisolutions.com/api/v1/pricing
```

Successful responses are JSON with the payload under `data`.

## Endpoints

- `GET /api/v1`: API index with links to every resource
- `GET /api/v1/company`: Company name, contact details, and service area
- `GET /api/v1/product`: AZAI Hub: what it does, modules, guardrails, integrations
- `GET /api/v1/pricing`: Free demo, pilot, subscription, and setup
- `GET /api/v1/changelog`: AZAI Hub releases, newest first
- `GET /api/v1/insights`: Published articles, newest first
- `GET /api/v1/insights/{slug}`: One published article with full text
- `GET /api/v1/case-studies`: Published implementation write-ups

## Authentication

- None. Every endpoint is public and read-only, so there are no keys to manage and no sandbox to set up. Production is safe to call.
- CORS is open (`Access-Control-Allow-Origin: *`), so browser-based agents can call the API directly.

## Rate limits

- 60 requests per 60 seconds per IP address, shared across every endpoint.
- Every GET and HEAD response carries `RateLimit-Policy: "default";q=60;w=60` and `RateLimit: "default";r=<remaining>;t=<seconds until reset>`, per the IETF RateLimit header fields draft.
- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (Unix seconds) carry the same numbers for older clients.
- Over the limit, you get `429 Too Many Requests` with `Retry-After` in seconds. Wait that long, then retry.
- Need more? Email info@azaisolutions.com.

## Versioning and deprecation

- The major version is in the path: `/api/v1`.
- Additive changes, like new fields or new endpoints, ship in place. Ignore fields you don't recognize.
- Breaking changes ship under a new path, like `/api/v2`. The old version keeps working for at least 6 months after the new one launches.
- A deprecated endpoint sends `Deprecation` (RFC 9745) with the date it was deprecated and `Sunset` (RFC 8594) with the date it stops working, at least 6 months later. It also links here with `rel="deprecation"`, and the OpenAPI document marks it `deprecated: true`.
- Every response links to this policy with `rel="sunset"`. No endpoint is deprecated today.

## Errors

- Errors use RFC 9457 problem details (`application/problem+json`) with `type`, `title`, `status`, `code`, `detail`, and `instance`. Branch on `code`; `title` and `detail` are for people and may change.
- `not_found` (404): unknown resource or article slug. `method_not_allowed` (405): any method other than GET, HEAD, or OPTIONS. `rate_limited` (429): wait for `Retry-After`. `internal_error` (500): our fault, safe to retry.

## CLI

`azai` wraps the API for scripts and agents. It's on npm as `@azaisolutions/cli`: one file, no dependencies, Node 18 or later.

```sh
npx @azaisolutions/cli pricing

# or without npm
curl -O https://azaisolutions.com/cli/azai.mjs
node azai.mjs pricing
npm install -g @azaisolutions/cli
azai company
azai product
azai changelog --limit 3
azai insights
azai insights <slug> --json
azai --help
```

## Machine-readable

- [OpenAPI 3.1](https://azaisolutions.com/openapi.json): Every endpoint, schema, and header
- [API catalog](https://azaisolutions.com/.well-known/api-catalog): RFC 9727 linkset pointing to the spec and these docs
- [llms.txt](https://azaisolutions.com/llms.txt): Site index for agents
- [Markdown](https://azaisolutions.com/developers.md): This page as markdown. Any page works with a .md suffix or Accept: text/markdown
