Quickstart
Install
pnpm add @autogen-labs/api-client-kitIn the
coremonorepo this resolves viaworkspace:*. Satellite apps (web-public,app-dashboard) use a local Hono contract +hono/clientuntil the kit is published.
Typed RPC (preferred)
import { createCoreApiClient, unwrapData } from "@autogen-labs/api-client-kit";
const api = createCoreApiClient(process.env.NEXT_PUBLIC_CORE_API_URL!, { headers: () => ({ Authorization: `Bearer ${token}` }),});
const res = await api.v1.me.$get();const me = await unwrapData(res);Path helper
import { createApiClient } from "@autogen-labs/api-client-kit";
const api = createApiClient("https://api.example.com", { token: process.env.API_KEY });const me = await api.get("/v1/me");Next: see Authentication.