Skip to content
Home

n8n

n8n can call OdiRouter directly with the HTTP Request node. This method works even when your n8n version’s built-in OpenAI node does not expose a custom Base URL.

RequirementValue
n8nCloud or self-hosted workflow
NodeHTTP Request
MethodPOST
URLhttps://www.odirouter.ai/v1/chat/completions
API KeyOdiRouter API key
  1. Open n8n credentials.
  2. Create a header-based credential if your n8n version supports reusable headers.
  3. Add this header:
Authorization: Bearer YOUR_API_KEY

If you do not use a credential, add the header directly in the HTTP Request node.

FieldValue
MethodPOST
URLhttps://www.odirouter.ai/v1/chat/completions
Send HeadersEnabled
Header AuthorizationBearer YOUR_API_KEY
Header Content-Typeapplication/json
Send BodyJSON
{
"model": "gpt-5.5",
"messages": [
{
"role": "user",
"content": "Summarize the previous workflow item in one sentence."
}
]
}

The HTTP Request node returns the full JSON response. Read the assistant text from:

choices[0].message.content

In downstream n8n nodes, use this expression:

{{$json["choices"][0]["message"]["content"]}}

If downstream nodes only need text, add a Set/Edit Fields node after the HTTP Request node and create:

FieldValue
model_output{{$json["choices"][0]["message"]["content"]}}

Then Email, Slack, Webhook Response, database, or IF nodes can read model_output directly.

For asynchronous multimodal models:

  1. Call POST https://www.odirouter.ai/model/v1/queue/{endpoint}.
  2. Save status_url and response_url from the response.
  3. Poll status_url until the status is COMPLETED.
  4. Fetch response_url.

Recommended node flow:

Stepn8n nodeKey fields
Create taskHTTP Requestrequest_id, status_url, response_url
Save URLsSet/Edit Fieldsstatus_url, response_url
WaitWaitChoose an interval based on model runtime
Check statusHTTP RequestUse {{$json["status_url"]}} as the URL
BranchIFCheck whether status equals COMPLETED
Fetch resultHTTP RequestUse {{$json["response_url"]}} as the URL

If the status is not COMPLETED, route the IF node back to Wait and poll again. The final result usually contains file URLs or text fields; use Set/Edit Fields to normalize the fields your workflow needs, such as result_url, result_text, or a business-specific name.

SymptomFix
401 responseCheck the Authorization header
400 JSON errorEnsure the HTTP Request node sends JSON, not form data
Model not foundUse a model from GET https://www.odirouter.ai/v1/models
Workflow times outUse the multimodal queue pattern for long-running image, video, audio, or 3D tasks