Integrating Router
Integrate Martian Into Your Codebase In Just A Few Lines of Code
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
tohttps://withmartian.com/api/openai/v1
Update your
OPENAI_API_KEY
to your Martian API KeyIf 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.
OpenAI PythonOpenAI NodeOpenAI cURLLangChain PythonLangChain JSLast updated