Inferrex

/ developers · quickstart

From an API URL to flowing data.

The whole loop in TypeScript: infer a schema, approve it, wire a pipeline, sync. No field-mapping by hand.

Install

The @inferrex/sdk package publishes at launch; the REST API and in-app API keys are live today. The flow below is the exact shape you'll use.

npm install @inferrex/sdk
import { InferrexClient } from '@inferrex/sdk';

const client = new InferrexClient({
  apiKey: process.env.INFERREX_API_KEY!,   // from Settings → API keys
  // baseUrl defaults to https://api.inferrex.com — set it for Enterprise/Sovereign
});

1 · Point it at an API

Give Inferrex a URL and how it authenticates. It queues an inference job and hands you back a connection id:

const { connectionId, jobId } = await client.connections.inferConnection({
  url: 'https://api.stripe.com',
  authType: 'bearer',            // 'oauth2' | 'api-key' | 'basic' | 'bearer' | 'none'
  priority: 'normal',
});

2 · Hand over the credentials

Store the credentials the connection needs to read the provider. They're encrypted at rest and never returned:

await client.credentials.storeCredentials(connectionId, {
  authType: 'bearer',
  credentials: { token: process.env.STRIPE_SECRET_KEY! },
});

3 · Wait for the inference, then read the manifest

Inference runs asynchronously. Poll the status until it's ready, then pull the inferred schema — every field classified by business meaning with a confidence score:

let status = await client.connections.getConnectionStatus(connectionId);
while (status.status !== 'inferred') {
  await new Promise((r) => setTimeout(r, 2000));
  status = await client.connections.getConnectionStatus(connectionId);
}

const manifest = await client.connections.getConnectionManifest(connectionId);
// manifest.entities[].fields[] → { displayName, fieldType, classification, confidence }

4 · Approve what it inferred

Approve the manifest as-is, or correct a single field first (the correction feeds back into classification):

// optional: fix one field before approving
await client.connections.approveField(connectionId, {
  fieldPath: 'customer.vat_id',
  approved: true,
  correctedType: 'tax_identifier',
});

await client.connections.approveConnection(connectionId);

5 · Wire a pipeline and sync

Point a source connection at a target connection and trigger a sync. Inferrex maps the fields by shared concept — you don't:

const pipeline = await client.pipelines.createPipeline({
  name: 'Stripe → warehouse',
  sourceConnectionId: connectionId,
  targetConnectionId: warehouseConnectionId,
});

await client.pipelines.activatePipeline(pipeline.id);
await client.pipelines.triggerSync(pipeline.id, { syncType: 'initial' });

6 · Let it heal itself

When the provider renames a field, Inferrex sees a rename — not a breakage — and proposes a repair. Accept it (or wire your agent to accept high-confidence ones):

const suggestions = await client.pipelines.listSuggestions(pipeline.id);
for (const s of suggestions.suggestions ?? []) {
  await client.pipelines.acceptSuggestion(pipeline.id, s.id);
}

That's the whole loop. The same calls exist as raw REST (see the API reference) and as MCP tools (see MCP).