Zed logo
Editors

Use TokenRex with Zed

Use TokenRex as a custom OpenAI-compatible provider in Zed.

Provider setup checked against the official reference. Live execution inside this third-party tool has not been tested; model limits, streaming and tool behavior must be verified separately.

Before you start

  • A TokenRex API key
  • A version of the app that accepts a custom OpenAI-compatible base URL

Setup methods

01

Provider setup

  1. 1

    Open Zed settings and merge the language_models block below. This configures Zed-owned AI features, not external agent or terminal-thread credentials.

  2. 2

    Add TokenRex under openai_compatible, set api_url to https://tokenrex.ai/api/public/v1 and register an exact enabled ID in available_models.

  3. 3

    Save settings and supply your private key through Zed's provider configuration when prompted. Keep credentials out of shared settings files.

  4. 4

    Copy an exact enabled model ID from Models & Pricing. Set context, maximum output, image input and tool capabilities only from that model's verified details.

  5. 5

    Select the model in Zed's Agent panel and test a short read-only question. External agents require their own provider setup.

Configuration
"language_models": {
  "openai_compatible": {
    "TokenRex": {
      "api_url": "https://tokenrex.ai/api/public/v1",
      "available_models": [
        { "name": "gpt-6-astra", "display_name": "GPT-6 Astra" }
      ]
    }
  }
}

Setup reference

Troubleshooting

Authentication fails
Check that the saved TokenRex key is active and belongs in the tool's API-key field, not its subscription sign-in. Remove accidental spaces, check your wallet balance, and never share the key in screenshots or exported settings.
The model is missing or the request URL returns 404
Copy an exact enabled model ID from Models & Pricing. Follow this method's URL field: some tools expect the versioned base, others the root or full completion address. Check the documented API protocol before changing the path.
Chat works but streaming or tools fail
Test a short plain-text conversation first. Confirm the selected model and installed tool version support the required protocol and capabilities. Enable agent actions only after separately checking streaming and tool calls.

Verify the connection

Send a short message with the selected model, read its response, then confirm the exact model appears in your TokenRex usage. Test streaming and tool use separately before larger agent tasks.