Authorization: Bearer <key> on every request.
Change the key at runtime
Validate the key
ReyGridAuthError.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Authenticate the ReyGrid TypeScript SDK with an API key.
Authorization: Bearer <key> on every request.
import { ReyGrid } from "reygrid";
const client = new ReyGrid({ apiKey: process.env.REYGRID_API_KEY });
client.setApiKey("new-key"); // returns the client, so calls can be chained
client.setApiKey(undefined); // clear
client.getApiKey(); // string | undefined
const v = await client.validate();
console.log(v.valid, v.usage.total, v.usage.quotaLimit);
const usage = await client.getUsage(); // shortcut for (await validate()).usage
ReyGridAuthError.