AugeLabWeld Check

API documentation

Send an image, get the verdict and measurements as JSON.

Authentication

Send your key in the Authorization header with every request. Keys start with agl_weld_.

Authorization: Bearer agl_weld_xxxxxxxxxx_...

Inspect an image

POST https://weld.augelab.com/api/v1/inspect

Send the image as multipart/form-data in the field image, or as the raw request body (Content-Type: image/jpeg or image/png).

curl -X POST "https://weld.augelab.com/api/v1/inspect" \
  -H "Authorization: Bearer $AUGELAB_WELD_KEY" \
  -F "image=@weld.jpg" \
  -F "mm_per_pixel=0.12" \
  -F "reference=P-1042"
import os, requests

with open("weld.jpg", "rb") as f:
    r = requests.post(
        "https://weld.augelab.com/api/v1/inspect",
        headers={"Authorization": "Bearer " + os.environ["AUGELAB_WELD_KEY"]},
        files={"image": f},
        data={"mm_per_pixel": "0.12"},
        timeout=60,
    )
r.raise_for_status()
print(r.json()["verdict"])

Parameters

image
JPEG or PNG, up to 8 MB.
mm_per_pixel
Optional. How many millimetres one pixel of the uploaded image covers. When given, the answer also carries mm fields.
reference
Optional. A short note such as a part number; printed on the report.
allow_training
Optional, default false. With true the image may be kept to improve the model.

Response

The verdict field is OK, NOK or UNCERTAIN. UNCERTAIN is returned when confidence is low, the image is blurry or dark, or no bead is found.

Coordinates are pixels of the processed image (image.width, image.height). Large images are scaled down before processing; image.scale_factor gives the ratio. Links stop working after 24 hours.

{
  "verdict": "NOK",
  "verdict_reasons": ["porosity_detected"],
  "image": {"width": 1600, "height": 1200, "original_width": 4000, "original_height": 3000,
            "scale_factor": 0.4, "mm_per_pixel": 0.3},
  "defect_counts": {"crack": 0, "porosity": 1, "spatter": 0},
  "defects": [
    {"id": 1, "class_id": 2, "class": "porosity", "confidence": 0.87,
     "box": {"x": 812, "y": 590, "width": 14, "height": 13},
     "polygon": [[812, 596], [818, 590], [825, 596], [819, 602]],
     "length_px": 14.2, "width_px": 13.1, "area_px": 141,
     "length_mm": 4.26, "width_mm": 3.93, "area_mm2": 12.69}
  ],
  "defects_truncated": false,
  "bead": {"found": true, "segments": 1, "polygon": [[96, 560], [1504, 548], [1504, 642], [96, 655]],
           "area_px": 131000, "length_px": 1408.0, "mean_width_px": 93.0, "confidence": 0.93,
           "length_mm": 422.4, "mean_width_mm": 27.9, "area_mm2": 11790.0},
  "warnings": [],
  "model": {"name": "...", "version": "...", "is_mock": false, "experimental": false},
  "request_id": "9f2c1a7d3b5e8a10",
  "created": "2026-11-17T12:00:00Z",
  "reference": "P-1042",
  "processing_ms": 412,
  "annotated_image": {"url": "https://.../f/<token>/annotated.jpg", "expires_at": "2026-11-18T12:00:00Z"},
  "reports": {"pdf_url": "...", "xlsx_url": "...", "json_url": "...", "expires_at": "2026-11-18T12:00:00Z"},
  "quota": {"remaining": {"per_minute": 4, "per_day": 299, "per_month": 2999}}
}

Limits

5 images per minute, 300 per day and 3000 per month for each key. There is also a shared ceiling for all free keys. Above a limit the answer is 429 with a Retry-After header.

Errors

Error answers carry error.code, error.message and error.request_id.

401
Key missing, invalid or revoked.
413
File or image dimensions above the limit.
415
Content that is not JPEG or PNG.
429
Limit reached. Try again after Retry-After seconds.
503
The system is full or temporarily closed. Try again shortly.

Other endpoints

GET /api/v1/me
Returns the limits of your key and what is left.
DELETE /api/v1/key
Revokes the key.

This is a decision-support tool; it does not replace weld inspection, non-destructive testing or the judgement of qualified personnel. Results rely only on the surface visible in the photo and can be wrong.