API Endpoints

Explore all available endpoints and their parameters.

Base URL

https://api.trace-line.site/v1
POST

/v1/palm/analyze

Analyze a palm image and detect heart, head, and life lines. This is the primary endpoint for the Traceline API.

Request Headers

HeaderRequiredDescription
X-API-KeyYesYour Traceline API key
Content-TypeYesMust be application/json

Request Body

{
  "image": "<base64-encoded-image>"
}
  • image (required) Base64-encoded JPEG or PNG image. Maximum size: 5MB.

Example Request

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

Response

Successful responses return a JSON object with the analysis results.

{
  "id": "req_abc123",
  "object": "palm.analysis",
  "created": 1700000000,
  "model": "traceline-v1",
  "results": {
    "overlay": "<base64-overlay-image>",
    "masks": {
      "heart": "<base64-mask>",
      "head": "<base64-mask>",
      "life": "<base64-mask>"
    },
    "stats": {
      "heart": {
        "pixels": 1842,
        "confidence": 0.94
      },
      "head": {
        "pixels": 1567,
        "confidence": 0.91
      },
      "life": {
        "pixels": 2103,
        "confidence": 0.96
      }
    }
  },
  "usage": {
    "requests_used": 42,
    "requests_limit": 100
  }
}

Response Fields

  • id Unique request identifier
  • object Always "palm.analysis"
  • created Unix timestamp of the request
  • model Model version used for analysis
  • results.overlay Base64-encoded JPEG with detected lines drawn on the original image
  • results.masks Individual PNG masks for each detected line
  • results.stats Detection statistics per line (coverage percentage and boolean detected flag)
  • usage Current plan and quota information

Response Headers

  • X-Monthly-Quota-Limit Your total monthly quota
  • X-Monthly-Quota-Remaining Remaining requests this month
GET

/v1/palm/health

Check if the API service is running. No authentication required.

Example Request

curl https://api.trace-line.site/v1/palm/health

Response

{
  "status": "ok"
}