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
- Limit input length before sending the request.
- Set a node timeout and a maximum retry count.
- Route 429 and temporary 5xx responses to a controlled retry branch.
- Do not expose the API key in execution logs.
- Track request IDs and token usage for cost investigation.
Next step: Create an account or read the integration docs.