Skip to main content
While using the OpenAI SDK is possible, we recommend using the Maitai SDK for the best experience and full access to all features.

Configure OpenAI SDK

You can use Maitai with your existing OpenAI SDK implementation by changing the base URL to point to Maitai’s API endpoint, and adding the required headers.

Limitations

Base URL approach tradeoffsThe Base URL approach is great for drop-in compatibility, but it’s an OpenAI-style client talking to Maitai’s API. You won’t get some Maitai SDK conveniences (like callback handling for evaluations, client-side inference/store-only modes, and context management helpers).If you want the full Maitai feature set and the cleanest ergonomics, use the native Maitai SDK.

Authentication with Base URL Approach

You can provide provider keys through headers: