Integrating Router
Integrate Martian Into Your Codebase In Just A Few Lines of Code
Last updated
Integrate Martian Into Your Codebase In Just A Few Lines of Code
Last updated
Integrating Martian's Model Router is incredibly easy. We let you use our router via a drop-in replacement for OpenAI:
Update your BASE_URL
to https://withmartian.com/api/openai/v1
Update your OPENAI_API_KEY
to your Martian API Key
If you haven't created a Martian API Key yet, you can do so here
Below, you'll find instructions for a drop-in replacement for a number of different languages and libraries.
When you first integrate, you can keep using your existing model and benchmark its performance against the router. Once you're confident in its performance, you can switch to the router.
If you are not currently using one of the below methods or need any other help contact us via contact@withmartian.com.