Official TypeScript/JavaScript SDK for the CardSight AI REST API, providing comprehensive baseball card identification and collection management. Version 3.6.0 ships with full TypeScript types and dual ESM/CJS support. Released under MIT license with a free tier, it covers 100% of the CardSight AI API endpoints including card identification, detection, catalog search, collections, pricing, and AI-powered search. Key differentiators include multi-card detection, flexible metadata fields across trading card games, and minimal dependencies (only openapi-fetch). Requires Node.js 20+ and TypeScript 5+ (optional).
npm install cardsightaiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize CardSight AI client and identify cards from an image URL using the AI-powered identification API.
Use `new CardSightAI({ apiKey: '...' })` instead of `new CardSightAI('...')`.Replace `client.identify(url)` with `client.identify.card({ imageUrl: url })`.Use `await` or `.then()` on all calls.
Upgrade Node.js to 20+ or use a polyfill for fetch.
Handle 429 status codes with retry logic.
Switch to `catalog.cards.list()` with query parameters.
Upgrade to Node.js 20+ or use a fetch polyfill like 'node-fetch' and configure global fetch.
Use `import { CardSightAI } from 'cardsightai'` (curly braces).Set the `CARDSIGHT_API_KEY` environment variable or pass `apiKey` in the constructor.
Use `client.identify.card(...)` or `client.identify.cardBySegment(...)`.