Quickstart

Get started with the Traceline API in under 5 minutes.

1. Sign up and get your API key

Create a free Traceline account, then generate an API key from your dashboard.

Sign up

2. Make your first request

Send a palm image to the API and receive detection results. Here are examples in different languages:

cURL

curl -X POST https://api.trace-line.site/v1/palm/analyze \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "<base64-encoded-image>"
  }'

Python

import requests
import base64

# Read and encode the image
with open("palm.jpg", "rb") as f:
    image_b64 = base64.b64encode(f.read()).decode()

response = requests.post(
    "https://api.trace-line.site/v1/palm/analyze",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"image": image_b64},
)

data = response.json()
print(data["lines"])
# {'heart': {'pixels': 1842, 'confidence': 0.94}, ...}

JavaScript

import { readFileSync } from "fs";

const image = readFileSync("palm.jpg").toString("base64");

const res = await fetch(
  "https://api.trace-line.site/v1/palm/analyze",
  {
    method: "POST",
    headers: {
      "X-API-Key": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ image }),
  }
);

const data = await res.json();
console.log(data.lines);
// { heart: { pixels: 1842, confidence: 0.94 }, ... }

3. Parse the response

The API returns an overlay image, individual line masks, and statistics for each detected line.

{
  "overlay": "<base64-overlay-image>",
  "masks": {
    "heart": "<base64-mask>",
    "head": "<base64-mask>",
    "life": "<base64-mask>"
  },
  "lines": {
    "heart": {
      "pixels": 1842,
      "confidence": 0.94
    },
    "head": {
      "pixels": 1567,
      "confidence": 0.91
    },
    "life": {
      "pixels": 2103,
      "confidence": 0.96
    }
  }
}

Response Fields

  • overlay Base64-encoded image with detected lines drawn on the original palm image.
  • masks Individual binary masks for each detected line (heart, head, life).
  • lines Statistics per line: pixel count and model confidence score.