Client
Basic setup
import { createRenClient, pat } from "@renai-labs/sdk"
const client = createRenClient({ baseUrl: "https://api.renai.build", auth: pat(process.env.REN_PAT_TOKEN!),})Configuration
| Option | Description |
|---|---|
baseUrl | API base URL. |
auth | Auth strategy (e.g. pat(token)). Required. |
headers | Extra headers sent with every request. |
fetch | Custom fetch implementation. |
credentials | RequestCredentials value. |
Custom headers
createRenClient({ baseUrl, auth: pat(token), headers: { "X-Request-Id": crypto.randomUUID() },})Custom fetch
createRenClient({ baseUrl, auth: pat(token), fetch: myCustomFetch,})