Domino offers authorization options to support various model API applications.
-
Go to the model API’s Settings page and click Invocation.
-
Select one of the following:
-
Unrestricted: If your model API is unrestricted, anyone with network access to Domino can call your model API. No access token is required when sending a request.
-
Restricted: If your model API is restricted, callers must send a valid access token with their requests to use the endpoint. See the code examples in the model overview tab to see how to send access tokens with your requests.
NoteThere is a difference in how to invoke synchronous and asynchronous restricted model APIs:
-
Synchronous model APIs require the caller to use HTTP basic authentication with the username and password both set to the value of the model access token.
For example, if the token is
c2b2532ed234f54
, then the model API must be invoked with the HTTP usernamec2b2532ed234f54
and passwordc2b2532ed234f54
. -
Asynchronous model APIs require the caller to use HTTP bearer (or token) authentication with the value of the model access token.
For example, if the token is
c2b2532ed234f54
, then the model API must be invoked with the HTTP headerAuthorization: Bearer c2b2532ed234f54
.
-
-
-
Click Add Model Access Token to generate access tokens for your model API. You can generate as many access tokens as you want. Use the name field to help you track which tokens have been issued, to whom, and for what purpose.
To revoke or regenerate a token, click the gear button.