Official Clarifai gRPC client for Node.js to interact with the Clarifai AI recognition API. Version 12.4.1 as of the metadata, with frequent releases aligned to API backend versioning (X.Y.Z where X.Y matches API version, Z for library-specific fixes). Supports image, video, and text recognition via computer vision and NLP. Provides two usage approaches: dynamic (quick, no type safety) and static (TypeScript declarations for autocomplete). Key differentiator: direct gRPC access to Clarifai API with low-level control, unlike the higher-level REST client 'clarifai'. Requires API key for authentication. Maintained by Clarifai.
npm install clarifai-nodejs-grpcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Predict concepts in an image using Clarifai's general model. Uses dynamic stub approach with gRPC metadata for authentication.
Always destructure grpc: const { grpc } = require('clarifai-nodejs-grpc');Use V2Client and proto imports for upcoming API changes.
Check model existence via ListModels or use public model ID.
Always check response.status.code === 10000 before processing outputs.
Run: npm install google-protobuf
Ensure you set metadata with 'authorization' header: metadata.set('authorization', 'Key YOUR_API_KEY');Use const { grpc } = require('clarifai-nodejs-grpc'); instead of direct require('@grpc/grpc-js').