Copy Page/modelSelectpost https://not-diamond-server.onrender.com/v2/modelRouter/modelSelectGiven an array of messages and the selection of LLMs you want to route between, /hashModelSelect will return a label for which LLM you should call.Body Paramsmessagesarray of objectsrequiredThe messages array in OpenAI format.messages*ADD objectllm_providersarray of objectsrequiredA list of LLM providers you want to route between.llm_providers*ADD objecttoolsarray of objectsA list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.toolsADD objectmax_model_depthint32The maximum depth considered in the ranked LLM providers list.tradeoffstringAdditional routing tradeoffs. Valid values are "cost" and "latency".preference_idstringThe preference ID created on the Not Diamond dashboard. Setting this value will change the ranking algorithm based on the preferences set.hash_contentbooleanDefaults to falseWhether to hash the content of messages.Responses 200200 400400 404404 500500Updated 12 months ago Introduction/feedbackDid this page help you?YesNo