Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: TrueFoundry AI Gateway Chat Model node documentation
description: Learn how to use the TrueFoundry AI Gateway Chat Model node in n8n. Follow technical documentation to integrate TrueFoundry AI Gateway Chat Model node into your workflows.
contentType: [integration, reference]
priority: high
---

# TrueFoundry AI Gateway Chat Model node

Use the TrueFoundry AI Gateway Chat Model node to use AI Gateway chat models with conversational agents.

On this page, you'll find the node parameters for the TrueFoundry AI Gateway Chat Model node and links to more resources.

/// note | Credentials
You can find authentication information for this node [here](/integrations/builtin/credentials/truefoundry.md).
///

--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

## Node parameters

### Model

Select the model to use to generate the completion.

n8n dynamically loads models from the AI Gateway and you'll only see the models available to your account.

## Node options

Use these options to further refine the node's behavior.

### Frequency Penalty

Use this option to control the chance of the model repeating itself. Higher values reduce the chance of the model repeating itself.

### Maximum Number of Tokens

Enter the maximum number of tokens used, which sets the completion length.

### Response Format

Choose **Text** or **JSON**. **JSON** ensures the model returns valid JSON.

### Presence Penalty

Use this option to control the chance of the model talking about new topics. Higher values increase the chance of the model talking about new topics.

### Sampling Temperature

Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.

### Timeout

Enter the maximum request time in milliseconds.

### Max Retries

Enter the maximum number of times to retry a request.

### Top P

Use this option to set the probability the completion should use. Use a lower value to ignore less probable options.

### Reasoning Effort

Use this option to enable model reasoning processes through thinking/reasoning tokens, if supported.

## Templates and examples

<!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
[[ templatesWidget(page.title, 'truefoundry-ai-gateway-chat-model') ]]

## Related resources

As the TrueFoundry AI Gateway is API-compatible with OpenAI, you can refer to [LangChain's OpenAI documentation](https://js.langchain.com/docs/integrations/chat/openai/) for more information about the service.

--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
53 changes: 53 additions & 0 deletions docs/integrations/builtin/credentials/truefoundry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: TrueFoundry AI Gateway credentials
description: Documentation for the TrueFoundry AI Gateway credentials. Use these credentials to authenticate the TrueFoundry AI Gateway in n8n, a workflow automation platform.
contentType: [integration, reference]
priority: critical
---


# TrueFoundry AI Gateway credentials

You can use these credentials to authenticate the following nodes:

- [Chat TrueFoundry AI Gateway](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchattruefoundry.md)

## Prerequisites

Create a [TrueFoundry](https://truefoundry.com/) account.

## Supported authentication methods

- API key

## Related resources

Click [here](https://www.truefoundry.com/ai-gateway) to learn more about the TrueFoundry AI Gateway. Refer to the [TrueFoundry AI Gateway documentation](https://docs.truefoundry.com/ai-gateway/intro-to-llm-gateway) for more information about the service.

## Using API key

To configure this credential, you'll need:

- An **API Key**

### Virtual Access Token:

1. [Login to TrueFoundry](https://truefoundry.com/login) or, [create an account](https://truefoundry.com/register) and click on the **Setup AI Gateway** card.
2. Go to the left sidebar and select the **Access** tab.
3. Visit **Virtual Accounts** in the **Access** tab.
4. Click on the **Add Permission** button.
5. Search for a pre-existing Model Provider Account.
6. Choose the Role for this Provider Account.
7. Add more Provider Accounts, if needed, and then click on the **Generate Virtual Account** button to create the Virtual Account.
8. Copy your key and add it as the **API Key** in n8n.

### Personal Access Token:

1. [Login to TrueFoundry](https://truefoundry.com/login) or, [create an account](https://truefoundry.com/register) and click on the **Setup AI Gateway** card.
2. Go to the left sidebar and select the **Access** tab.
3. Visit **Personal Access Tokens** in the **Access** tab.
4. Click on the **New Personal Access Token** button.
5. Specify the **Name** and optionally, an **Expiration Date**.
6. Copy your key and add it as the **API Key** in n8n.

For more information on Access Control in the Gateway, click [here](https://docs.truefoundry.com/ai-gateway/gateway-access-control).
2 changes: 2 additions & 0 deletions nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ nav:
- OpenAI Chat Model: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md
- Common issues: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/common-issues.md
- OpenRouter Chat Model: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenrouter.md
- TrueFoundry AI Gateway Chat Model: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchattruefoundry.md
- Vercel AI Gateway Chat Model: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatvercel.md
- xAI Grok Chat Model: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatxaigrok.md
- Cohere Model: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmcohere.md
Expand Down Expand Up @@ -1077,6 +1078,7 @@ nav:
- integrations/builtin/credentials/travisci.md
- integrations/builtin/credentials/trellixepo.md
- integrations/builtin/credentials/trello.md
- integrations/builtin/credentials/truefoundry.md
- integrations/builtin/credentials/twake.md
- integrations/builtin/credentials/twilio.md
- integrations/builtin/credentials/twist.md
Expand Down