OneProvider
Clients and SDKs

n8n

Call OneProvider from n8n with a plain HTTP Request node and an Anthropic credential. No community node needed. Setup steps and streaming notes.

Call OneProvider from n8n using a vanilla HTTP Request node. No custom community node needed — the raw Anthropic Messages API works as-is.

All models, capabilities, and prices Documentation index for AI agents: https://oneprovider.dev/docs/llms.txt Before you start: a key from your cabinet Open your cabinet: the Telegram bot @oneprovider_robot (Account) or app.oneprovider.dev . Press “Issue a key”, give it a name (for example, this client) and a spend limit, and copy the key. You top up the balance in the same place. More about the cabinet and keys .

1. Create a credential

In n8n, Credentials → New → Header Auth. Set:

  • Name: x-api-key
  • Value: your OneProvider key (sk-...)

2. HTTP Request node

Drop an HTTP Request node into your workflow and configure:

text
Method: POST
URL: https://api.oneprovider.dev/v1/messages
Authentication: Header Auth → (the credential above)
Headers:
anthropic-version: 2023-06-01
content-type: application/json
Body (JSON):
{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "{{$json.prompt}}" }
]
}

The {{$json.prompt}} expression pulls text from the previous node; swap it for any n8n expression that yields a string.

Streaming

Add "stream": true to the body and toggle the node’s Response → Response Format to String. n8n will receive the SSE byte stream; parse data: lines in a Function node downstream.

Use tool results For Anthropic tool-calling flows, follow Tool use : pass tools in the body, inspect the response’s content array fortool_use blocks, dispatch those in n8n, then post tool_result back in a second node.

Which model to choose

Put the model id in the JSON body. claude-sonnet-5-5 is the default for most workflows: balanced price and quality for summaries, classification and drafts. Use claude-haiku-5-5 for high-volume, simple steps such as tagging or routing, and claude-opus-5-5 for steps that need deep reasoning. Always set max_tokens: the Messages API requires it. Ids are on the models page , rates on the pricing page ; a spend limit on the key protects a workflow that loops.

Common errors and fixes

401 authentication_error

The Header Auth credential must have the name x-api-key exactly and the whole key as the value. Check that the node actually uses this credential.

404 on the HTTP Request node

The URL must be https://api.oneprovider.dev/v1/messages. A missing /v1 or a doubled one both return 404.

400 invalid_request_error

Check the JSON body: model, max_tokens and a non-empty messages array are required, and the {{$json.prompt}} expression must produce a string, not an object.

429 “Insufficient balance” and the node keeps retrying

Switch off Settings → Retry On Fail for this node, or limit the tries: the response carries x-should-retry: false and retries only waste time. Top up the cabinet instead.

The node times out on a long answer

Raise Options → Timeout on the node, or use "stream": true. A non-streaming request must start answering within 6 minutes.

I cannot find the answer text

With the Messages API the text is in {{$json.content[0].text}}. With /v1/chat/completions it is in {{$json.choices[0].message.content}}.

FAQ

Do I need a community node?

No. The standard HTTP Request node is enough.

Can I use n8n’s built-in OpenAI nodes?

Usually yes: create an OpenAI credential and set its Base URL to https://api.oneprovider.dev/v1, then pick a model id from the catalog by hand.

How do I stop one workflow from spending too much?

Issue a separate key for n8n with a spend limit and use it only there.

Can I call GPT models too?

Yes, through https://api.oneprovider.dev/v1/chat/completions with the same key and an OpenAI-style body, see Chat Completions .

Quick answers

Which base URL do I use?

Claude Code and Anthropic SDKs use https://api.oneprovider.dev. OpenAI SDKs and OpenAI-compatible clients use https://api.oneprovider.dev/v1. One key works behind both; the model list is on the models page ; rates are on the pricing page .

How do I authenticate?

Send the raw sk-… key in x-api-key or Authorization: Bearer: one of them, never both. Keep the key in an environment variable, not in a file that gets committed. More on authentication .

Where do I get a key?

Open your cabinet in the Telegram bot @oneprovider_robot or at app.oneprovider.dev, top up the balance and press “Issue a key”. Each key can carry its own spend limit. Cabinet & API keys .

What do 401, 404 and 429 mean?

401: the key is missing, mistyped or sent in the wrong header; paste the whole key without quotes or spaces. 404: usually a wrong base URL, for example a missing or doubled /v1. 429 with “Insufficient balance”: the cabinet balance or the key’s spend limit is used up, so top up instead of retrying; any other 429 is a rate limit, so wait for Retry-After. Details: error codes and troubleshooting .

Why do streams cut off or reset?

VPN and VLESS proxies often buffer SSE or break HTTP/2 negotiation. OneProvider has no regional restrictions and does not buffer streams, so turn the proxy off and retry.

Where do I ask if this is not enough?

Message @Oneproviderhelpbot on Telegram or open “Support” in the web cabinet, with the HTTP status code and the exact error message. How support works .

Last updated: 2026-10-05 Found a bug? @Oneproviderhelpbot