
Clarifai Rust gRPC Client
This is the official Clarifai gRPC Rust client for interacting with our powerful recognition API. The Clarifai API offers image and video recognition as a service. Whether you have one image or billions, you are only steps away from using artificial intelligence to recognize your visual content.
- Try the Clarifai demo at: https://clarifai.com/demo
- Sign up for a free account at: https://portal.clarifai.com/signup
- Read the documentation at: https://docs.clarifai.com/
Installation
WIP
Getting started
Construct the V2Stub object using which you'll access all the Clarifai API functionality:
use ;
use ;
use crate;
use cratePostModelOutputsRequest;
use crateV2Client;
use crateStatusCode;
use clarifai_channel;
let client = new;
// Setup authentication.
let auth = "Key YOUR_CLARIFAI_API_KEY_OR_PAT".to_string;
let mut builder = with_capacity;
builder.add_str.unwrap;
let metadata = builder.build;
let call_opt = default.headers;
Predict concepts in an image:
let request = PostModelOutputsRequest ;
let response = client
.post_model_outputs_opt
.expect;
let status = response.get_status;
if status.get_code != SUCCESS
println!;
for concept in response.get_outputs.get_data.get_concepts