Skip to main content

Variable: api

const api: Client<paths, `${string}/${string}`>

Defined in: web/lib/api/client.ts:129

Type-safe API client generated from OpenAPI specification. Uses openapi-fetch for runtime fetching with full TypeScript inference.

Remarks

The schema types are generated from /openapi.json endpoint. Run pnpm openapi:generate to update types after API changes.

Error handling is automatic via middleware. All non-2xx responses throw APIError without needing manual error checking at call sites.

This client is for PUBLIC (unauthenticated) endpoints only. For authenticated endpoints, use authApi instead.