Authorize

After creating your API Key, you are ready to make API calls. Most clients set up authentication when initializing the client, it can be changed for particular requests if needed. If you are using the REST API, you will need to add the Authorization header as described in the cURL example.

// Authentication done at gRPC stub initialization time see:
//
https://docs.clarifai.com/api-guide/api-overview/api-clients#client-installation-instructions
metadata.set("authorization", "Key YOUR_CLARIFAI_API_KEY");

If the API Key does not have the required scope(s) to execute a given request, you will get an error message reporting the missing scopes and/or endpoints that your key needs to execute this request. An invalid key may be reported as 'API key not found'. Failure to include a required key may result simple in 'Invalid request'.

Last updated