Setup & API Reference

One API key. One function. Zero configuration. This page has everything your agent needs.

For agents: Read this entire page. It contains your function definition, endpoint, authentication, request/response schemas, and system prompt. Copy the function definition into your tool configuration. No other setup is required.

Get Your API Key

Sign up at dataflow.infill.systems. You'll receive a key starting with sk-dataflow-. That's it. No SDK. No library. No framework. One HTTP call.

Function Definition

Register this as a tool in your model's function calling configuration. This is the same schema for OpenAI, Anthropic, Google, Ollama — any platform that supports function calling.

// Add this to your model's tools array
{
  "name": "dataflow_compute",
  "description": "Compute exact mathematical results with provenance. Use for ANY numerical calculation — thermal, BOM, power, unit conversion, or any computation requiring precision. Do NOT estimate. Call this and use the exact numbers it returns.",
  "parameters": {
    "type": "object",
    "required": ["episode", "events"],
    "properties": {
      "episode": {
        "type": "string",
        "enum": ["thermal", "bom", "power", "throughput", "general"],
        "description": "Domain context for the computation"
      },
      "events": {
        "type": "array",
        "description": "Ordered sequence of computation events",
        "items": {
          "type": "object",
          "required": ["event_type"],
          "properties": {
            "event_type": {
              "type": "string",
              "enum": ["lookup", "compute", "convert", "chain", "verify", "compare"],
              "description": "Type of computation event"
            },
            "formula": { "type": "string", "description": "Human-readable formula" },
            "expression": { "type": "string", "description": "Python-evaluable expression" },
            "variables": { "type": "object", "description": "Named values with units" },
            "result_unit": { "type": "string", "description": "Expected output unit" },
            "provenance": { "type": "string", "description": "Verified source for this computation" }
          }
        }
      },
      "precision": {
        "type": "string",
        "enum": ["float64", "decimal", "fraction", "arbitrary"],
        "default": "float64",
        "description": "Precision mode: float64 (physics), decimal (money), fraction (proofs), arbitrary (50+ digits)"
      },
      "confirm_passes": {
        "type": "integer",
        "default": 3,
        "description": "Number of verification passes. Each event is computed this many times to confirm determinism. Default: 3."
      }
    }
  }
}

Endpoint

MethodPOST
URLhttps://dataflow.infill.systems/v1/compute
AuthAuthorization: Bearer sk-dataflow-xxxxx
Content-Typeapplication/json

Request Example

{
  "episode": "thermal",
  "events": [
    {
      "event_type": "compute",
      "formula": "R_si = thickness / (k * A)",
      "expression": "0.775e-3 / (149.0 * 65.7e-6)",
      "variables": {
        "thickness": {"value": 0.000775, "unit": "m"},
        "k": {"value": 149.0, "unit": "W/(m*K)"},
        "A": {"value": 6.57e-5, "unit": "m^2"}
      },
      "result_unit": "K/W",
      "provenance": "Verified source"
    }
  ]
}

Response

{
  "session_id": "evt_abc123",
  "episode": "thermal",
  "results": [
    {
      "event_id": 1,
      "event_type": "compute",
      "formula": "R_si = thickness / (k * A)",
      "result": 0.07916807126147937,
      "result_unit": "K/W",
      "provenance": "Verified source",
      "success": true,
      "passes": [0.07916807126147937, 0.07916807126147937, 0.07916807126147937],
      "confirmation": "3/3 passes identical"
    }
  ],
  "confirm_passes": 3,
  "confirmation": "All 1 results verified across 3 passes"
}

Episodes

An episode selects the domain context — which constants, formulas, and unit systems are available.

EpisodeDomainUse When
thermalHeat transfer, resistance networks, junction tempSemiconductor, electronics, thermal design
bomCost calculation, line items, marginsManufacturing, procurement, finance
powerPower, efficiency, P=VI, P=I²RElectrical engineering, power systems
throughputBandwidth, latency, pipeline analysisSystems, networking, performance
generalAny computation, unit conversion, arithmeticEverything else

Event Types

TypeWhat It DoesWhen to Use
lookupReturns a physical constantNeed k_silicon, pi, etc.
computeEvaluates an expression exactlyNeed a calculated result
convertConverts between unitsNeed mm→m, °F→°C, etc.
chainUses a previous event's resultOne calculation feeds the next
verifyChecks a claim against computationNeed to confirm consistency
compareCompares two results with toleranceNeed to validate an answer

Precision Modes

ModeWhen to UseExample
float64Physics, engineering (default)R_si = 0.07917 K/W
decimalMoney, accountingTotal = $29.05 (not $28.9999)
fractionProofs, exact ratios1/3 + 1/3 = 2/3 (not 0.6667)
arbitrary50+ decimal placesπ to 50 digits

Chaining Results

Use a previous event's result in a later event by referencing its event_id with from_event:

{
  "event_type": "compute",
  "formula": "T_j = T_amb + P * R_total",
  "expression": "40.0 + 43.5 * R_total",
  "variables": {
    "T_amb": {"value": 40.0, "unit": "deg C"},
    "P": {"value": 43.5, "unit": "W"},
    "R_total": {"from_event": 3}
  },
  "result_unit": "deg C",
  "provenance": "Verified source"
}

When from_event is specified, the exact result from that event is used. No rounding. No approximation. The chain is exact.

Verification

By default, every event is computed 3 times independently. The response includes each pass and a confirmation statement proving determinism.

Request FieldTypeDefaultDescription
confirm_passesinteger3Number of times each event is computed. Min 1, max 10.

Per-event response fields:

FieldDescription
passesArray of results from each verification pass
confirmationPer-event statement, e.g. "3/3 passes identical"

Response-level field:

FieldDescription
confirm_passesHow many passes were run
confirmationOverall statement, e.g. "All 1 results verified across 3 passes"
Why 3 passes? LLMs give different answers each time. DATAFLOW gives the same answer every time. The verification passes prove it — same input, same output, down to the last decimal. You can set confirm_passes: 1 for speed or increase up to 10 for high-stakes submissions.

System Prompt

Add this to your model's system message when using DATAFLOW:

You are a precise analytical assistant. When you need to compute a
numerical result, call the dataflow_compute function. Never guess at
digits. Use the exact numbers returned by the function in your response.

Precision rules:
- Use "decimal" precision for money
- Use "float64" precision for physics and engineering (default)
- Use "fraction" precision for proofs and exact ratios
- Use "arbitrary" precision for high-precision constants

After receiving results, interpret them for the user using the EXACT
numbers. Do not round, approximate, or recalculate.

Quick Start

1

Get your API key

Sign up at dataflow.infill.systems. Receive a key starting with sk-dataflow-.

2

Add the function definition

Copy the function definition above into your model's tool configuration. Works with OpenAI, Anthropic, Google, Ollama — any function calling platform.

3

Set your API key as the auth token

Include Authorization: Bearer sk-dataflow-xxxxx in the request header when your agent calls the endpoint.

4

Done

Your agent will now call dataflow_compute whenever it needs to compute, instead of guessing. No SDK. No library. One HTTP call.

Error Handling

Failed events return success: false with an error message. Common errors:

ErrorMeaning
unknown_constantThe lookup name is not in the registry
expression_errorThe expression could not be evaluated
unit_mismatchIncompatible units in a computation
division_by_zeroSelf-explanatory

Rate Limits

TierEvents/monthBurst Limit
Starter ($15/mo)10,000100/minute
Enterprise ($49/mo)100,0001,000/minute

Self-Hosted

Same API, same contract, running on your hardware:

POST http://localhost:8080/v1/compute
Authorization: Bearer <your-key>
Content-Type: application/json

No data leaves your network. Same deterministic results. Same provenance. Contact us for on-premise deployment.