Skip to main content

Getting started

  1. Install
  2. Set your API key
  3. Send a chat completion
  4. See it in the Portal

Install

Install the Maitai SDK:

Set your API key

See Authentication for other options (provider keys, Portal-managed keys).

Send a chat completion

Implementing Maitai into your application requires minimal code changes.
session_id is optional (the SDK will generate one if you omit it), but you’ll get the best Portal experience if you provide a stable session id per user/session.
The full implementation reference can be found here: Chat.

See it in the Portal

Run your application, make sure it makes at least one chat completion request, then head over to portal.trymaitai.com and inspect the new Application/Intent resources and requests.

Next Steps

  • Tune configuration in the Portal: Configuration
  • Add domain context to improve responses: upload application context entries in the Portal (Application → Edit → Add Context Entry)
  • Build a regression suite: Test Sets
  • Optional: set up alerts in the Portal (SettingsNotifications)