Integration / n8n

Use gonka.broker with n8n

Call the gonka.broker decentralized AI API from n8n using an HTTP Request node and protected OpenAI-compatible credentials.

Fastest setup

Use an n8n HTTP Request node to send a POST request to https://api.gonka.broker/v1/chat/completions. Store the API key in an n8n credential rather than directly inside the workflow JSON.

Request settings

  • Method: POST
  • URL: https://api.gonka.broker/v1/chat/completions
  • Authorization: Bearer credential
  • Content type: application/json
  • Model: gonka-auto

Example body

{
  "model": "gonka-auto",
  "messages": [
    {"role": "user", "content": "Summarize: {{$json.text}}"}
  ],
  "max_tokens": 300
}

Workflow safeguards

  1. Limit input length before sending the request.
  2. Set a node timeout and a maximum retry count.
  3. Route 429 and temporary 5xx responses to a controlled retry branch.
  4. Do not expose the API key in execution logs.
  5. Track request IDs and token usage for cost investigation.

Next step: Create one account or read the integration docs.