Skip to content
On this page

Integrations

n8n

Use RelayRouter in n8n workflows through the [OI] node or an HTTP request.

n8n's [OI] node accepts a custom base URL in its credential. That keeps workflows readable and gives you model selection in the node.

Create the credential

  1. 1

    Add an [OI] node

    Search for [OI] in the node panel and add it to the workflow.
  2. 2

    Create a credential

    Choose Create new credential.
  3. 3

    Set the base URL

    Enter https://api.relayrouter.org/v1 as the base URL and paste your key as the API key.
  4. 4

    Pick a model

    Save, then choose or type a model id from the catalog.

HTTP Request alternative

Method: POST
URL: https://api.relayrouter.org/v1/chat/completions
Header: Authorization: Bearer {{$credentials.relayApiKey}}
Header: Content-Type: application/json
Body: {
"model": "deepseek-v4.1-flash",
"messages": [{ "role": "user", "content": "{{$json.prompt}}" }]
}
Streaming is awkward inside n8n nodes; use non-streaming responses for workflows and reserve streaming for interactive clients.