Use TokenRex with Agent Zero
Add TokenRex to Agent Zero using the community Custom Providers plugin listed on its official site.
Use a model that supports tool calling for agent tasks. Review file, terminal and connected-account permissions before allowing actions. Provider setup is documented; a live connection from this app has not been tested. The Custom Providers plugin is a community extension, not a built-in TokenRex integration. Review its source and permissions before installing it. 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
- Agent Zero installed
- Custom Providers plugin installed
- A TokenRex API key
- An enabled tool-capable chat model
Setup methods
Provider setup
- 1
Install Agent Zero following https://www.agent-zero.ai/p/docs/installation/. Use an isolated environment for tasks with file or terminal access.
- 2
Open the official Custom Providers reference linked on this page. Download the plugin ZIP from its linked source (https://github.com/GreifMax/a0-custom-providers), then use Settings → Plugins → Install → From ZIP. Restart Agent Zero after installation.
- 3
Create a TokenRex API key, then copy an enabled chat model's exact ID from Models & Pricing. The examples use gpt-6-astra; replace it with your selected ID.
- 4
Open Settings → Models → Edit Model Presets, then click + beside the Provider dropdown. Name the provider TokenRex and use the openai LiteLLM provider type.
- 5
Set the API base URL to https://tokenrex.ai/api/public/v1, the models endpoint to /models (relative to that base), and paste your key privately. Use the plugin's Test connection action before saving.
- 6
Select TokenRex in the Main chat model slot and choose or enter gpt-6-astra. Save the preset. Configure utility models separately if you want them to use TokenRex; do not choose a chat model as an embedding model.
Provider: OpenAI-compatible
API base URL: https://tokenrex.ai/api/public/v1
API key: <your TokenRex API key>
Model ID: gpt-6-astra
API mode: Chat CompletionsTroubleshooting
- 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.