/v1/models endpoint.
Prerequisites
- An Open WebUI instance where you can open Admin Settings or Connections.
- A NEAR AI Cloud API key from the NEAR AI Cloud Dashboard.
- The current NEAR AI Cloud model ID from Model Discovery if you are not using
z-ai/glm-5.2.
Base URL
Use the NEAR AI Cloud gateway base URL:/chat/completions to the Open WebUI URL field. Open WebUI appends /models for model discovery and /chat/completions for chat requests.
Do not use Open WebUI’s own internal /api route as the upstream NEAR AI Cloud URL. The upstream provider must be the NEAR AI Cloud gateway URL above.
Model ID
Use the NEAR AI Cloud gateway model ID:/models endpoint with a standard bearer token. With the NEAR AI Cloud base URL above, that verification reaches:
z-ai/glm-5.2 from Open WebUI’s model picker. If the picker is stale, use the refresh steps below before entering a manual model filter.
Configure
In Open WebUI:- Open Admin Settings or Connections.
- Go to Connections and add an OpenAI-compatible or OpenAI connection.
- Set URL to
https://cloud-api.near.ai/v1. - Set API Key to your NEAR AI Cloud API key. Open WebUI sends it as
Authorization: Bearer <key>. - Save or verify the connection.
- Select
z-ai/glm-5.2from the model list.
/v1/models. Add z-ai/glm-5.2 to the filter only if you want to limit the picker or model discovery is not refreshing.
Native tool calling
If you use Open WebUI to orchestrate tools (workspace Tools, MCP servers, or built-in tools), set the model’s Function Calling mode to Native. Open WebUI defaults each model to Default, which emulates tool use through a prompt template and does not forward the OpenAItools array to NEAR AI Cloud. GLM 5.2 supports native tools (/v1/models lists tools in supported_features), so switch to Native to use them:
- Open Workspace -> Models ->
z-ai/glm-5.2-> Advanced Params (or the chat Advanced Params panel). - Change Function Calling from
DefaulttoNative(stored asparams.function_calling = "native").
Refresh models
When NEAR AI Cloud releases a new model:- Run
curl https://cloud-api.near.ai/v1/modelsand copy the new model’sid. - Re-open the NEAR AI Cloud connection in Open WebUI.
- Save or re-save the connection so Open WebUI verifies the provider and fetches models again.
- Refresh the browser tab and check the model picker.
- If the model still is not listed, restart Open WebUI, then check the model picker again.
- If the model remains missing, test NEAR AI Cloud directly with the curl commands below and add the model ID to Model IDs (Filter) only after confirming
/v1/modelsreturns it.