Inference APIs
Integrations/Automation

Use Inference APIs with n8n

Create an OpenAI credential in n8n with a custom Base URL; the OpenAI Chat Model, Transcribe and Text-to-Speech nodes then run on Inference APIs.

Settings

SettingValue
Base URLhttps://api.inferenceapis.com/v1 (also /openai/v1)
API keyFrom API Keys; send as Authorization: Bearer …
Chat model idsopenai/gpt-oss-120b, deepseek-ai/DeepSeek-V4-Flash, zai-org/GLM-5.3-Flash, meta-llama/Llama-3.3-70B-Instruct-Turboall models
Audio model idsopenai/whisper-large-v3 (transcription), hexgrad/Kokoro-82M (speech)

Steps

  1. Credentials → New → OpenAI. API Key: your Inference APIs key. Base URL: https://api.inferenceapis.com/v1.
  2. In an OpenAI Chat Model node, choose that credential and type the model id, e.g. deepseek-ai/DeepSeek-V4-Flash (the dropdown may not list it — the field accepts free text).
  3. For audio, the OpenAI node's "Transcribe a Recording" and "Generate Audio" operations use the same credential; set model openai/whisper-large-v3 or hexgrad/Kokoro-82M.

Configuration

HTTP Request node (any endpoint)
{
  "method": "POST",
  "url": "https://api.inferenceapis.com/v1/chat/completions",
  "headers": { "Authorization": "Bearer {{ $env.INFERENCE_API_KEY }}" },
  "body": { "model": "openai/gpt-oss-120b", "messages": [{ "role": "user", "content": "{{ $json.text }}" }], "max_tokens": 500 }
}

Verify

Execute the node once; the output should contain choices[0].message.content.

Gotchas

  • Reasoning models need max_tokens set in the node options; the default can be too low.

If something fails

401 — key missing or wrong · 402 insufficient_balance — add credits on Billing · 404 model_not_found — check the id against the model list (aliases such as gpt-oss-120b work too) · 503 model_unavailable — the model is being enabled. Full details in the API docs.