AnswerLine Sign in Start free

Integrations

Each integration takes an API key, your API base URL (https://api.answerline.dev) and the engines to offer. Leave engines at their default or set them to the engines available to you, ["CHATGPT"] today.

n8n

Install the community node n8n-nodes-answerline, then create its credentials; n8n tests them with GET /v1/credits. Operations:

  • Run Monitor: an engine's prompt or query, country and additional request fields as JSON, answered synchronously. For Google, a url in the additional fields replaces the query and country.
  • Create Task: the same request as an async task, with priority, idempotency key and webhook URL.
  • Get Task: status and result of a task.
  • Get Credits: remaining credits and billing cycle.

With Continue On Fail, a failed item outputs the error message, its description and the HTTP status.

Zapier

Connect the app with the same three settings; engines are a comma-separated list of task types.

  • Run Monitor: an engine's request, answered synchronously.
  • Create Task: queues the request with the Zap's callback URL as its webhook; the Zap pauses and continues with the finished task, completed or failed.

Zapier limits how long an action may run, so prefer Create Task for AI engines, whose answers can take longer than that.

LangChain

The LangChain packages build tools on the SDKs: one synchronous monitor tool per engine (for example monitor_chatgpt), plus create_async_task, get_task_status and get_credits. A task's payload is validated as the request of its taskType. In JavaScript, API errors are thrown with the response body in the message; in Python, errors are returned to the model as the tool result.

JavaScript install

npm install @answerline/sdk @answerline/langchain

JavaScript

import { Client } from "@answerline/sdk";
import { createTools } from "@answerline/langchain";

const client = new Client({ apiKey: process.env.API_KEY!, baseUrl: "https://api.answerline.dev" });
const tools = createTools(client, { engines: ["CHATGPT"] });

Python install

pip install answerline answerline_langchain

Python

import os
from answerline import Client
from answerline_langchain import create_tools

tools = create_tools(Client(os.environ["API_KEY"], base_url="https://api.answerline.dev"), engines=["CHATGPT"])

Bind tools to a chat model or agent like any other LangChain tools.