Langflow logo
Bot builders

Use TokenRex with Langflow

Use TokenRex in Langflow's agent and language-model steps through its OpenAI Compatible provider.

Langflow discovers models from the provider's models endpoint. Enable only models appropriate for the flow: language models for chat/agents, embedding models for retrieval. Tool permissions belong to your Langflow flow. 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

  • Current Langflow with OpenAI Compatible provider
  • A TokenRex API key
  • An enabled chat model

Setup methods

01

Provider setup

  1. 1

    Install Langflow using https://docs.langflow.org/get-started-installation. The OpenAI Compatible provider is included with current Langflow installations.

  2. 2

    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.

  3. 3

    Click your profile icon → Settings → Model Providers → OpenAI Compatible.

  4. 4

    Set Base URL to https://tokenrex.ai/api/public/v1 and API Key to your TokenRex key. Save to validate the connection and discover enabled models. This is the provider base, not the full chat-completions URL.

  5. 5

    Enable gpt-6-astra, or the exact enabled chat model you chose, under Language Models. In a Language Model or Agent field, select OpenAI Compatible and that model.

    Langflow Simple Agent canvas with input, agent and output nodes
    Official Langflow flow-composition example, not custom-provider configuration. Official source
    1. 1Choose your configured provider and model in the Agent or Language Model field.
    2. 2Review connected tools separately.
  6. 6

    Save your flow and send a short message in its playground. If model discovery fails, check the saved key and base address before attaching additional tools.

    Langflow Simple Agent playground with conversation and tool settings
    Official Langflow test conversation, not evidence of a TokenRex connection. Official source
    1. 1Open Playground after saving the flow.
    2. 2Send a short message and check the exact model in TokenRex usage.
Configuration
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 Completions

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.