Developer Docs

TransformNet API

Extract structured data from any instrument image — meter readings, VINs, odometers, gauges — via a simple REST call. Integrate directly or connect through Zapier in minutes.

Overview

The TransformNet OCR API accepts an image (as a URL or base64-encoded string) and returns a structured JSON response containing the extracted value, unit, confidence score, and any additional instrument-specific data.

No DoForms account is required to use the REST API. Authentication is via an API key obtained from your TransformNet dashboard.

Authentication

All API requests must include your API key in the Authorization header using the Bearer scheme.

Authorization: Bearer tnk_your_api_key_here

API keys are generated from your dashboard under API Keys. Each key is shown only once at creation — store it securely. Keys can be revoked at any time.

⚠ Never expose your API key in client-side code or commit it to source control. If a key is compromised, revoke it immediately from the dashboard and generate a new one.

Base URL

Production https://transformnet.com/api/v1

All endpoints below are relative to this base URL. All requests and responses use JSON. Include Content-Type: application/json on POST requests.

Rate Limits

Rate limits are applied per tenant. Every response includes the following headers so you can track your usage:

X-RateLimit-Limit:     60      # requests allowed in the window
X-RateLimit-Remaining: 58      # requests remaining in the window
X-RateLimit-Window:    1m      # window duration

When a rate limit is exceeded the API returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait before retrying.

Endpoints

POST /ocr/analyse Analyse an image and extract structured data

Submit an image for OCR processing. Supply the image as either a publicly accessible URL or a base64-encoded string — not both.

Request body

FieldTypeDescription
imageUrloptional string Publicly accessible URL of the image. Required if imageBase64 is not provided.
imageBase64optional string Base64-encoded image bytes. Accepts plain base64 or a data-URI prefix (data:image/jpeg;base64,...). Required if imageUrl is not provided.
imageTypeoptional string Hint to the extraction engine. When omitted the service auto-detects the instrument type. See Image Types for valid values.

Example — URL input

// POST https://transformnet.com/api/v1/ocr/analyse
{
  "imageUrl":   "https://example.com/images/meter.jpg",
  "imageType":  "OPTICAL_POWER_METER"
}

Example — base64 input

{
  "imageBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgAB...",
  "imageType":   "VIN"
}

Success response 200 OK

{
  "success":        true,
  "imageType":      "OPTICAL_POWER_METER",
  "extractedValue": "-9.79",
  "unit":           "dBm",
  "confidence":     0.96,
  "confidenceLabel":"High",
  "additionalData": {
    "secondaryValue": "-12.30",
    "secondaryUnit":  "dBm",
    "wavelength":     "1550nm"
  },
  "rawText":        "",
  "errors":         [],
  "processingMs":   842
}

Failed extraction response 200 OK

A 200 is returned even when extraction fails — always check the success field.

{
  "success":        false,
  "imageType":      "OPTICAL_POWER_METER",
  "extractedValue": "",
  "confidence":     0.0,
  "confidenceLabel":"Low",
  "errors":         ["Could not locate meter display in image"],
  "processingMs":   610
}

Status codes

CodeMeaning
200Request processed. Check success field for extraction outcome.
400Bad request — missing image, both image fields supplied, or unrecognised imageType.
401Missing or invalid API key.
429Rate limit exceeded. See Retry-After header.
GET /ocr/types List supported image types

Returns the list of image types the API can process. No authentication required.

Response

{
  "types": [
    { "type": "OPTICAL_POWER_METER",  "description": "Optical power / signal level meter (dBm, dB, dBµV)" },
    { "type": "VIBRATION_METER",      "description": "Vibration analyser / accelerometer (m/s², g, Hz)" },
    { "type": "VIN",                  "description": "Vehicle Identification Number label or plate" },
    { "type": "ODOMETER",             "description": "Vehicle odometer / mileage display" },
    { "type": "ANALOG_METER",         "description": "Analogue dial or needle-based gauge" }
  ]
}

Image Types

Pass one of these values in the imageType field to skip auto-detection and improve accuracy. When omitted, the service will infer the type from the image.

OPTICAL_POWER_METER
Optical power / signal level meters. Returns primary and secondary dBm values plus wavelength in additionalData.
VIBRATION_METER
Vibration analysers and accelerometers. Returns amplitude value with units (m/s², g) and frequency in additionalData.
VIN
Vehicle Identification Number. Returns the 17-character VIN with vin_valid and vin_length in additionalData.
ODOMETER
Vehicle odometer or mileage display. Returns the numeric reading with unit (km or miles) in additionalData.
ANALOG_METER
General-purpose analogue dial or needle gauge. Returns the needle position as a numeric value with whatever unit is visible on the scale.

Response Fields

FieldTypeDescription
successbooleanWhether the extraction produced a usable result. Always check this field before consuming extractedValue.
imageTypestringThe image type used for extraction — either the value you supplied or the auto-detected type.
extractedValuestringThe primary extracted value as a string (e.g. "-9.79", "1HGBH41JXMN109186", "123456").
unitstringUnit of the extracted value where applicable (e.g. "dBm", "km", "miles"). Empty string if not applicable.
confidencenumberConfidence score from 0.0 to 1.0.
confidenceLabelstringHigh, Medium, or Low.
additionalDataobjectKey/value pairs of instrument-specific extras. Fields vary by imageType — see Image Types above.
errorsstring[]Validation or extraction error messages. Empty array on success.
processingMsnumberTotal server-side processing time in milliseconds.

Errors

Error responses use a consistent envelope:

{
  "message": "Provide either imageUrl or imageBase64.",
  "detail":  "Both are missing."
}
CodeCauseResolution
400Neither imageUrl nor imageBase64 suppliedInclude one image source in the request body.
400Both imageUrl and imageBase64 suppliedUse only one image source per request.
400Unrecognised imageType valueUse a value from the Image Types list, or omit the field.
401Missing Authorization headerInclude Authorization: Bearer <key> on every request.
401Invalid or revoked API keyCheck the key is correct and not revoked in the dashboard.
429Rate limit exceededWait the number of seconds specified in the Retry-After header.

Zapier Integration

The TransformNet API works with Zapier's built-in Webhooks by Zapier action — no custom app required. Use it to connect image extraction to Google Sheets, Salesforce, Airtable, Slack, or any of Zapier's 6,000+ apps.

What you need: A TransformNet account with an API key, and a Zapier account (free tier is sufficient for basic Zaps).

Setting up the Webhooks action

1

Create or open a Zap and add an action step

In your Zap, add an action step and search for Webhooks by Zapier. Select the POST action.

2

Configure the webhook URL

Set the URL to: https://transformnet.com/api/v1/ocr/analyse

3

Set Payload Type to JSON

Under Payload Type select JSON. This ensures the request body is sent as application/json.

4

Add the request body fields

Add the following key/value pairs under Data. Map imageUrl to the image URL field from your trigger step.

5

Add the Authorization header

Under Headers, add a header with key Authorization and value Bearer tnk_your_api_key_here. Replace with your actual API key from the dashboard.

6

Test the step

Click Test & Review. A successful test returns a JSON response — you can then map extractedValue, unit, confidenceLabel, and other fields to subsequent steps in your Zap.

Example Zap — Image URL to Google Sheets

This example triggers when a new record arrives in your system containing an image URL, calls TransformNet to extract the reading, and appends the result to a Google Sheet.

Trigger — any app that provides an image URL

Use whatever trigger is appropriate for your workflow — a new row in Google Sheets, a form submission, a new file in Dropbox, or a Webhooks catch hook. The only requirement is that your trigger step exposes an image URL that TransformNet can fetch.

Action 1 — Webhooks by Zapier (POST)

// URL
https://transformnet.com/api/v1/ocr/analyse

// Headers
Authorization: Bearer tnk_your_api_key_here
Content-Type:  application/json

// Body (JSON)
{
  "imageUrl":  "{{trigger.image_url}}",
  "imageType": "OPTICAL_POWER_METER"
}

Action 2 — Google Sheets (Append Row)

Map the following fields from the TransformNet response to your spreadsheet columns:

Spreadsheet columnZapier field to map
Image URLtrigger.image_url
Extracted Valueaction1.extractedValue
Unitaction1.unit
Confidenceaction1.confidenceLabel
Timestamptrigger.created_at
Successaction1.success
Tip: Add a Zapier Filter step between Action 1 and Action 2 that only continues if action1.success is true. This prevents blank rows from failed extractions being written to your sheet.