crate.index()
index(opts?: RequestOptions): Promise<ApiRootIndex>The self-describing API root — a machine-readable map of every resource plus a ‘cold start’ recipe, task recipes, and a runtime error catalogue (v2). The one keyless endpoint, so a new integration or an agent can discover what’s possible before committing to anything.
| Endpoint | GET /api/v2 |
| Auth | anon |
| Returns | ApiRootIndex |
| Retryable | yes |
| Idempotent | yes |
Example
Section titled “Example”const root = await crate.index(); // works without an apiKeyconsole.log(root.cold_start.problem);root.resources.forEach((r) => console.log(r.name, r.auth));Throws
Section titled “Throws”CrateAPIError— on a non-2xx response.