EnroutiaEU

Guide per tool

n8n

In the “OpenAI” node, create a new credential. Put our URL in “Base URL” and your key in “API Key”. The rest of the node behaves the same.

https://api.enroutia.com/v1

Make

In the OpenAI module, choose “Custom API call” and set our URL as the base. The key goes in the connection.

https://api.enroutia.com/v1

WordPress

Most AI plugins have a field for the OpenAI base URL, sometimes under advanced settings. Put ours there with your key.

https://api.enroutia.com/v1

Python

from openai import OpenAI

client = OpenAI(api_key="TU_CLAVE", base_url="https://api.enroutia.com/v1")

answer = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Di hola en una frase."}],
)
print(answer.choices[0].message.content)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({ apiKey: "TU_CLAVE", baseURL: "https://api.enroutia.com/v1" });

const answer = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Di hola en una frase." }],
});
console.log(answer.choices[0].message.content);

curl

curl https://api.enroutia.com/v1/chat/completions \
  -H "Authorization: Bearer TU_CLAVE" \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"Hola"}]}'