Skip to content

Feature Request: Allow setting custom base URL in OpenAI node (e.g. Novita AI support)#14431

Description

@MrHadik

Description:

Hi n8n team 馃憢,

I'm integrating Novita AI, which is OpenAI-compatible but uses a different base URL: https://api.novita.ai/v3/openai

Currently, the OpenAI node in n8n does not allow modifying the base URL. This limits the ability to connect to third-party OpenAI-compatible APIs like Novita AI, OpenRouter, Anyscale, or Azure OpenAI.


Current Behavior:

  • The OpenAI node uses the default base URL https://api.openai.com.
  • There's no field or setting to override this URL.
  • This prevents the use of alternative providers with the same API structure.

Expected Behavior:

  • Add a Base URL field in the OpenAI credentials UI.
  • If provided, use the custom base URL instead of the default.
  • Fallback to https://api.openai.com if the field is empty (to preserve current behavior).

Use Case Example:

Trying to connect to: https://api.novita.ai/v3/openai

This API supports the same request/response structure as OpenAI, so no other changes are needed.


Proposed Change:

  • Update OpenAI.credentials.ts to include an optional baseUrl field.
  • Modify OpenAI.node.ts to use this field when making API requests.

Thanks for the amazing work on n8n! This feature would be a huge help for all of us exploring OpenAI-compatible models 馃檹

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions