Articles in this section

APIs vs. tools: how to choose

APIs and tools both execute logic in integrator.io, but they serve different purposes. Use this guide to decide which to build.

It is recommended to build reusable logic as a tool and if external access is required, create an API that invokes the Tool.

Quick decision guide

Use Case

Use Tool

Use API Builder

Reusable internal logic

Logic used in Flows or AI Agents

Expose endpoint to external systems

Need custom HTTP configuration (URL, headers, methods)

Need custom error responses

Require retries and queueing

✓ (in Flows)

Long-running process

✓ (in Flows)

Strict 2-minute timeout acceptable

Use a tool when

  • Logic is reusable across Flows, APIs, or AI Agents

  • The process runs internally within Celigo

  • You need Flow-level retries, queueing, or pause-on-error

  • The process may run longer than 2 minutes

  • You want to avoid unnecessary API call costs

Tools

  • Have one input and one output (JSON contract-based)

  • Do not support HTTP configuration

  • Do not customise error responses

  • Are context-aware (behaviour depends on where they run)

  • Require connection overrides at runtime

Connection overrides (tools only)

Tools require connection overrides at runtime.

  • The Tool defines required connection types.

  • The calling Flow, API, agent, or nested tool must provide its own connections.

  • If overrides are not supplied, execution fails.

Important

Connection overrides are mandatory, even when a tool is nested inside another tool.

This design ensures:

  • Secure credential handling

  • No shared connection leakage

  • Reusability across environments and accounts

Use an API builder when

  • The process must be exposed externally

  • You need a REST endpoint with URL, method, and headers

  • You must customise success or error responses

  • A strict 2-minute synchronous execution is acceptable

APIs

  • Have one request and multiple response nodes

  • Always execute synchronously

  • Do not support internal retries

  • Enforce a 2-minute timeout

Caution

API calls are billable. Avoid using APIs for internal reusable logic when a tool is sufficient.