ULK Cloud

Zed OpenAI Compatible Setup | settings.json, API Key, and Models

Add a provider under language_models.openai_compatible with api_url https://api.ulkcloud.com/v1, list glm-5.3, glm-5.3-flash, and deepseek-v4.1-flash in available_models, and store the sk-ulk- key in the keychain or ULK_CLOUD_API_KEY. Leave prompt_cache_key unset: Zed 1.32.0 then sends a field that ULK Cloud rejects with 400. reasoning_effort is accepted but has no effect.

To use an OpenAI-compatible API in Zed, add a provider under language_models.openai_compatible in settings.json (or with Add Provider on the LLM Providers page), set its api_url, list each model by hand in available_models, and give Zed the API key through the system keychain or an environment variable. For ULK Cloud, the api_url is https://api.ulkcloud.com/v1, the key starts with sk-ulk-, and the models are glm-5.3, glm-5.3-flash, and deepseek-v4.1-flash. Leave prompt_cache_key off: Zed then sends that field, and ULK Cloud rejects it with a 400 error. reasoning_effort is accepted but has no effect, because ULK Cloud fixes the reasoning strength of each model.

Everything below was checked on November 30, 2026, against Zed 1.32.0 (source commit a36d485, November 29, 2026) and its documentation. We read the code that builds Zed's requests and sent requests in the same shape to the ULK Cloud API. The reasoning_effort behavior was checked again on December 3, 2026, after ULK Cloud started accepting the field.

Add ULK Cloud from Zed's LLM Providers page

Zed's settings window has a form for OpenAI-compatible providers, and it writes the same settings.json entry described in the next section.

  1. Run agent: open settings from the command palette. This opens Settings → AI → LLM Providers.
  2. Click Add Provider and choose OpenAI under Compatible APIs. The form says "This provider will use an OpenAI-compatible API."
  3. Fill in the provider fields:
FieldValue
Provider Nameulk-cloud
API URLhttps://api.ulkcloud.com/v1
API KeyYour ULK Cloud key (sk-ulk-...)
  1. In the Models block, fill in one model, and click Add Model for each additional one:
FieldValue for glm-5.3
Model Nameglm-5.3
Max Completion TokensLeave the default (Zed 1.32.0 does not send it, see below)
Max Output Tokens32768
Max Tokens1000000
Supports toolsChecked
Supports imagesUnchecked
Supports parallel_tool_callsEither (ULK Cloud accepts it)
Supports prompt_cache_keyUnchecked
Supports /chat/completionsChecked
Uses max_tokens for output limitEither (ULK Cloud accepts both names)
Supports thinkingEither (ULK Cloud ignores reasoning_effort)
  1. Click Save Provider.

The Provider Name becomes the provider's ID in settings.json and the base of its API key environment variable, so a short lowercase name such as ulk-cloud is easiest to work with. Zed stores the key you type into API Key in the system keychain, not in settings.json.

Configure the provider in Zed's settings.json

The same provider can be written by hand. Open the user settings file with zed: open settings file (on macOS and Linux it is ~/.config/zed/settings.json, on Windows %APPDATA%\Zed\settings.json) and add:

{
  "language_models": {
    "openai_compatible": {
      "ulk-cloud": {
        "api_url": "https://api.ulkcloud.com/v1",
        "available_models": [
          {
            "name": "glm-5.3",
            "display_name": "GLM-5.3",
            "max_tokens": 1000000,
            "max_output_tokens": 32768
          },
          {
            "name": "glm-5.3-flash",
            "display_name": "GLM-5.3 Flash",
            "max_tokens": 1000000,
            "max_output_tokens": 32768
          },
          {
            "name": "deepseek-v4.1-flash",
            "display_name": "DeepSeek V4.1 Flash",
            "max_tokens": 1048576,
            "max_output_tokens": 32768
          }
        ]
      }
    }
  }
}

The capabilities object can be left out. Its defaults in Zed 1.32.0 are tools: true, images: false, parallel_tool_calls: false, prompt_cache_key: false, chat_completions: true, interleaved_reasoning: false, and max_tokens_parameter: false, and every one of them works with ULK Cloud.

Three things about this block are specific to Zed:

  • Zed adds /chat/completions to api_url. Type the URL with /v1 and without a trailing slash. The requests go to https://api.ulkcloud.com/v1/chat/completions.
  • Zed does not fetch the model list. An OpenAI-compatible provider in Zed offers exactly the models in available_models, and the first one is the provider's default. Add a model ID from the models page to make it appear in the model selector.
  • The API key never goes in settings.json. Zed reads it from the keychain (set from the LLM Providers page) or from an environment variable named after the provider ID: upper snake case plus _API_KEY. For the provider ID ulk-cloud, that is ULK_CLOUD_API_KEY. A non-empty environment variable takes precedence over the keychain, and Zed reads it when it starts.

To make a ULK Cloud model the default for new agent threads, add "agent": { "default_model": { "provider": "ulk-cloud", "model": "glm-5.3" } }. Otherwise, pick the model in the agent panel's model selector, where it is listed under the provider name.

What Zed sends to an OpenAI-compatible API, and what ULK Cloud accepts

Zed 1.32.0 always streams chat requests to an OpenAI-compatible provider and builds the body from the model's settings. ULK Cloud rejects parameters it does not recognize instead of ignoring them, so each field Zed can send has to be one ULK Cloud accepts.

Zed sendsWhenULK Cloud
stream: trueEvery requestAccepted
stream_options.include_usage: trueEvery requestAccepted; the last chunk carries the billed tokens
temperatureEvery request (1.0 unless set)Accepted (0 to 2)
max_completion_tokensmax_output_tokens is setAccepted, up to the model's limit
max_tokensSame, with max_tokens_parameter: trueAccepted, up to the model's limit
tools, tool_choicetools: true and the agent offers toolsAccepted
parallel_tool_callsparallel_tool_calls: true and tools are presentAccepted
prompt_cache_keyprompt_cache_key: trueRejected with 400
reasoning_effortThe model has a reasoning_effort valueAccepted, no effect (reasoning is fixed per model)
service_tierNever for compatible providersNot sent

The service_tier row comes from a comment in Zed's provider code: the fast-mode setting is cleared for OpenAI-compatible providers because "arbitrary compatible endpoints reject service_tier."

On November 30, 2026, we sent ULK Cloud the body Zed builds for an agent step with one tool (read_file), streaming and include_usage on, temperature: 1.0, and max_completion_tokens: 32000. All six ULK Cloud models answered with a read_file tool call and finish_reason: "tool_calls", and each stream ended with a usage chunk. With glm-5.3-flash we also sent the follow-up request (the assistant's tool call with content: null, then the tool result as a tool message), and the model answered from the file contents. That was one simple tool; we did not run a full Zed agent session.

Leave prompt_cache_key off for ULK Cloud models; reasoning_effort is ignored

With capabilities.prompt_cache_key: true, Zed sends the thread ID as prompt_cache_key on its chat requests. ULK Cloud does not accept that field, and the request fails before it reaches a model with:

Unsupported parameter: 'prompt_cache_key'.

Keep the default false.

reasoning_effort (the "Supports thinking" checkbox) is accepted but has no effect. When a model in available_models has reasoning_effort, Zed sends reasoning_effort on its chat requests. As of December 3, 2026, ULK Cloud accepts the field with any value and ignores it, because ULK Cloud fixes the reasoning strength of each model. That includes "reasoning_effort": "none", which Zed's documentation offers as a way to force reasoning off: the request succeeds, but it does not turn reasoning off on ULK Cloud. The GLM and DeepSeek models on ULK Cloud reason either way, and the streamed reasoning comes back in reasoning_content, which Zed's stream parser reads as thinking text.

Two more settings are safe but do nothing on ULK Cloud. interleaved_reasoning: true makes Zed send earlier reasoning back as reasoning_content on assistant messages. ULK Cloud accepts the request but drops that field before it reaches the model. And capabilities.chat_completions: false switches Zed to the Responses API, which we did not test with Zed; keep it true.

Model limits for Zed's available_models

In Zed's available_models, max_tokens is the context window, and max_output_tokens is the output limit Zed sends with each request. The max_completion_tokens field exists in the settings schema, but the OpenAI-compatible provider in Zed 1.32.0 does not read it, so the Max Completion Tokens field in the form has no effect.

ULK Cloud models as of 2026-11-30 (prices in US dollars per 1 million tokens):

Model IDInput / outputmax_tokensHighest max_output_tokens
deepseek-v4.1-flash$0.07 / $0.221048576393216
glm-5.3-flash$0.12 / $0.201000000131072
glm-5.3$0.40 / $1.301000000131072
glm-5.3-uncensored$0.35 / $1.10Not published131072
deepseek-v4.1-flash-abliterated$1.10 / $2.20Not published262144
glm-5.3-abliterated$3.00 / $6.00Not published131072

A max_output_tokens above the model's highest value fails with, for example, max_completion_tokens is too large: 200000. This model supports at most 131072.

The highest value is not the best value. Before each request runs, ULK Cloud holds the most that request could cost from your balance, and the output part of that hold is max_output_tokens times the output price. An agent sends one request per step, so a lower limit such as 32768 keeps each hold small, which matters most on a new account's $0.50 of free credit. If max_output_tokens is left out and Zed sets no limit for the request, Zed sends no output limit and ULK Cloud caps the answer at 32,768 tokens.

The uncensored and abliterated models add an instruction to every request, and its tokens are billed as input: about 5,300 tokens for the two GLM-5.3 variants and about 2,600 for deepseek-v4.1-flash-abliterated. In our tool-call test, glm-5.3-uncensored reported 5,429 prompt tokens for a request that cost glm-5.3 200. An agent pays that on every step. ULK Cloud does not publish a context length for these three models, so this article does not suggest a max_tokens value for them.

ULK Cloud errors you may see in Zed

ULK Cloud returns errors in the OpenAI format with an English message that names the cause. These are the ones a Zed setup can run into:

StatusULK Cloud message (start)Fix in Zed
400Unsupported parameter: 'prompt_cache_key'.Set prompt_cache_key to false
400max_completion_tokens is too largeLower max_output_tokens
400Invalid value for 'messages.0.content'Set images to false; ULK Cloud accepts text only
400Your request appears to contain a secretSee the FAQ
401Incorrect API key providedEnter the key again, or check ULK_CLOUD_API_KEY
402Your balance is too low for this requestAdd credit, or lower max_output_tokens
404The model '...' does not existFix name in available_models
429Rate limit reached: 1000 requests per minute per API keyWait a moment

ULK Cloud does not charge for a request it rejects with any of these errors.

FAQ

Does Zed edit prediction work with an OpenAI-compatible API like ULK Cloud?

No. Zed's open_ai_compatible_api edit prediction provider sends a prompt to an OpenAI /v1/completions endpoint, and ULK Cloud only has Chat Completions and Responses. A request to https://api.ulkcloud.com/v1/completions returns 404 Unknown request URL: POST /v1/completions. Use ULK Cloud for the agent panel, and keep a different provider for edit predictions.

Why don't ULK Cloud's models show up in Zed after adding the API key?

An OpenAI-compatible provider in Zed only offers the models listed in its available_models. Zed does not call GET /v1/models, so each model ID has to be added in settings.json or with Add Model in the provider form.

What is the API key environment variable for a Zed OpenAI-compatible provider?

Zed builds it from the provider ID in upper snake case plus _API_KEY. The provider ulk-cloud reads ULK_CLOUD_API_KEY. Set it before starting Zed. While it is set, it takes precedence over the key in the keychain.

Why does the Zed agent stop with "Your request appears to contain a secret"?

ULK Cloud stops a request that contains something that looks like an API key or a private key before it reaches the model, and does not charge for it. This happens when the agent reads a file such as .env into the conversation. To send it anyway, add "custom_headers": { "X-ULK-Allow-Secrets": "true" } to the ulk-cloud provider in settings.json.

Which ULK Cloud model should I pick for Zed's agent?

All six models returned tool calls in our test on 2026-11-30, so all can drive the agent. glm-5.3-flash and deepseek-v4.1-flash cost the least per step. glm-5.3 costs more per token than either Flash model. The uncensored and abliterated models add input tokens to every step, which adds up quickly in an agent.