Skip to main content
Open WebUI can use NEAR AI Cloud through its OpenAI-compatible provider connection. Configure the NEAR AI Cloud gateway as the base URL, use a NEAR AI Cloud API key as the bearer token, and select models that Open WebUI discovers from NEAR AI Cloud’s /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.
Store the API key only in Open WebUI’s provider API key field or your deployment secret manager. Do not put real API keys in checked-in configuration files.

Base URL

Use the NEAR AI Cloud gateway base URL:
Do not append /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:
Open WebUI verifies OpenAI-compatible connections by calling the provider’s /models endpoint with a standard bearer token. With the NEAR AI Cloud base URL above, that verification reaches:
If verification succeeds, select 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:
  1. Open Admin Settings or Connections.
  2. Go to Connections and add an OpenAI-compatible or OpenAI connection.
  3. Set URL to https://cloud-api.near.ai/v1.
  4. Set API Key to your NEAR AI Cloud API key. Open WebUI sends it as Authorization: Bearer <key>.
  5. Save or verify the connection.
  6. Select z-ai/glm-5.2 from the model list.
If your Open WebUI version shows Model IDs (Filter), leave it empty first so Open WebUI can read /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 OpenAI tools 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:
  1. Open Workspace -> Models -> z-ai/glm-5.2 -> Advanced Params (or the chat Advanced Params panel).
  2. Change Function Calling from Default to Native (stored as params.function_calling = "native").
A plain chat with no tools attached behaves the same in either mode, so this only matters when tools are in play.

Refresh models

When NEAR AI Cloud releases a new model:
  1. Run curl https://cloud-api.near.ai/v1/models and copy the new model’s id.
  2. Re-open the NEAR AI Cloud connection in Open WebUI.
  3. Save or re-save the connection so Open WebUI verifies the provider and fetches models again.
  4. Refresh the browser tab and check the model picker.
  5. If the model still is not listed, restart Open WebUI, then check the model picker again.
  6. 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/models returns it.

Quick test

Before debugging Open WebUI, verify that NEAR AI Cloud lists the model:
Then test a chat completion with the same key and model:
If either curl command fails, fix the NEAR AI Cloud key, model ID, or network path before changing Open WebUI settings.

Troubleshooting

Sources Checked

Sources checked on 2026-06-23: