Select Model API authorization mode

Domino offers authorization options to support various model API applications.

Authorize your model API in unrestricted or restricted mode:

  1. Go to the model API’s Settings page and click Invocation.

    Authorize a model API in a specific mode

  2. 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.

      Note

      There 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 username c2b2532ed234f54 and password c2b2532ed234f54.

      • 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 header Authorization: Bearer c2b2532ed234f54.

  3. 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.

    Revoke or regenerate an access token