Skip to content
Neutree Documentation

Managing external endpoints

External endpoints allow you to proxy external API services (such as OpenAI, Azure OpenAI, or other third-party inference services or internal endpoints within Neutree) through the AI gateway for unified authentication, routing, and usage statistics.

By routing external APIs through the Neutree’s AI gateway, you can access external AI services through a single entry point, avoid exposing vendor API keys to clients, and track usage and costs across all API keys.

  1. Log in to the Neutree management interface, click External Endpoints in the left menu, then click Create on the right.

  2. Fill in the configuration.

    • Basic Information

      ParameterDescriptionEditable after creation
      NameThe name of the external endpoint.No
      WorkspaceThe workspace the external endpoint belongs to.No
    • Configuration

      Set the timeout for waiting for an upstream response. The default is 60 seconds; 5 minutes is recommended. The timeout is the time Kong gateway waits for a complete response from the upstream after the connection is established. If the upstream server stalls and the idle time exceeds the configured value, Kong gateway triggers a timeout and returns a 504 Gateway Timeout response. Editable after creation.

    • Upstream

      You can configure one or more upstream providers for an external endpoint. Upstream providers support two types: External and Endpoint Ref.

      • External: Proxies requests to an external API address.

        Parameter Description Editable after creation
        Upstream URL The complete URL of the external API (including the API path), for example https://api.openai.com/v1. Yes
        API Key The API key for the upstream API. Yes
        Model Mapping Maps the externally exposed model name to the actual upstream model name. For example, if the exposed model name is fast and the upstream model name is gpt-4o-mini, requests for the fast model will be forwarded to gpt-4o-mini. Yes
      • Endpoint Ref: Forwards requests to another endpoint in the same workspace.

        Parameter Description Editable after creation
        Internal Endpoint The name of an internal endpoint in the same workspace on Neutree. Yes
        Model mapping Maps the externally exposed model name to the actual upstream model name. For example, if the exposed model name is fast and the upstream model name is gpt-4o-mini, requests for the fast model will be forwarded to gpt-4o-mini. Yes
  3. Optional. Click the Test Connection button in the upstream configuration to verify that the upstream URL and API key are available. After a successful test, the response latency and the number of available models are displayed.

  4. After confirming the configuration, click Save to complete creation.

Log in to the Neutree management interface and click External Endpoints in the left menu. The top of the right panel shows an overview of external endpoints, and the list below shows all current external endpoints. Click an external endpoint name to view its details.

On the details page, Service URL is the API URL that external services use to call this external endpoint. Usage is the same as for a regular endpoint. After creating an API key for any OpenAI- or Anthropic-compatible client, you can use the API key to call this API URL for integration.

  1. Under Curl Example on the details page, select a model name, then click the copy icon Copy icon to copy the corresponding command.

  2. Create an API key for any OpenAI- or Anthropic-compatible client and save it securely.

  3. Replace $ENDPOINT_API_KEY in the command copied in step 1 with the API key created in step 2 (or set the ENDPOINT_API_KEY environment variable), then run the command on the client to call the external endpoint’s API URL.

After an external endpoint is created, you can modify its upstream configuration as needed.

  1. Log in to the Neutree management interface, click the menu icon () in the external endpoint list or details page, and select Edit.

  2. Modify the configuration as needed. For parameter descriptions, see Creating an external endpoint.

  3. After confirming the configuration, click Save to complete editing.

You can delete one or more external endpoints at a time.

  1. Log in to the Neutree management interface, click the menu icon () in the external endpoint list or details page, and select Delete; or select multiple external endpoints in the list and click Delete above the list.

  2. In the dialog that appears, confirm and click Delete. The selected external endpoints will be permanently deleted.