# Use SrotGateway in n8n

> Use SrotGateway models in n8n AI workflows by setting a custom base URL on OpenAI credentials.

Source: https://srotgateway.com/docs/n8n/

n8n's OpenAI nodes accept a custom base URL, so SrotGateway works without extra plugins.

## Steps

1. Create a SrotGateway key on the [API keys](https://srotgateway.com/keys/) page. Name it "n8n" so you can spot it in Activity.
2. In n8n, go to **Credentials → Add credential → OpenAI**.
3. **API Key**: your `sg-...` key.
4. **Base URL**: `https://api.srotgateway.com/v1`
5. In a workflow, add an **OpenAI Chat Model** node (or the AI Agent node with it), choose this credential, and set the model to `deepseek-v4.1-flash-fast` (pick **By ID** if it is not in the list).

## Tips

- Workflows that loop over many items can make many calls quickly. The key's limit (60 requests a minute by default) protects your balance; change it on the API keys page.
- If an item fails with `429` or `503`, turn on **Retry On Fail** in the node settings with a 2–5 second wait.
