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.
Base URL
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
Submit an image for OCR processing. Supply the image as either a publicly accessible URL or a base64-encoded string — not both.
Request body
| Field | Type | Description |
|---|---|---|
| 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
| Code | Meaning |
|---|---|
| 200 | Request processed. Check success field for extraction outcome. |
| 400 | Bad request — missing image, both image fields supplied, or unrecognised imageType. |
| 401 | Missing or invalid API key. |
| 429 | Rate limit exceeded. See Retry-After header. |
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.
additionalData.additionalData.vin_valid and vin_length in additionalData.additionalData.Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the extraction produced a usable result. Always check this field before consuming extractedValue. |
| imageType | string | The image type used for extraction — either the value you supplied or the auto-detected type. |
| extractedValue | string | The primary extracted value as a string (e.g. "-9.79", "1HGBH41JXMN109186", "123456"). |
| unit | string | Unit of the extracted value where applicable (e.g. "dBm", "km", "miles"). Empty string if not applicable. |
| confidence | number | Confidence score from 0.0 to 1.0. |
| confidenceLabel | string | High, Medium, or Low. |
| additionalData | object | Key/value pairs of instrument-specific extras. Fields vary by imageType — see Image Types above. |
| errors | string[] | Validation or extraction error messages. Empty array on success. |
| processingMs | number | Total server-side processing time in milliseconds. |
Errors
Error responses use a consistent envelope:
{
"message": "Provide either imageUrl or imageBase64.",
"detail": "Both are missing."
}
| Code | Cause | Resolution |
|---|---|---|
| 400 | Neither imageUrl nor imageBase64 supplied | Include one image source in the request body. |
| 400 | Both imageUrl and imageBase64 supplied | Use only one image source per request. |
| 400 | Unrecognised imageType value | Use a value from the Image Types list, or omit the field. |
| 401 | Missing Authorization header | Include Authorization: Bearer <key> on every request. |
| 401 | Invalid or revoked API key | Check the key is correct and not revoked in the dashboard. |
| 429 | Rate limit exceeded | Wait 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.
Setting up the Webhooks action
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.
Configure the webhook URL
Set the URL to: https://transformnet.com/api/v1/ocr/analyse
Set Payload Type to JSON
Under Payload Type select JSON. This ensures the request body is sent as application/json.
Add the request body fields
Add the following key/value pairs under Data. Map imageUrl to the image URL field from your trigger step.
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.
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 column | Zapier field to map |
|---|---|
| Image URL | trigger.image_url |
| Extracted Value | action1.extractedValue |
| Unit | action1.unit |
| Confidence | action1.confidenceLabel |
| Timestamp | trigger.created_at |
| Success | action1.success |
action1.success is true. This prevents blank rows from failed extractions being written to your sheet.