Overview
Measure caller-supplied source code with Python AST analysis or a deterministic lexical fallback, including per-function complexity, a SHA-256 fingerprint, density ratios, syntax status, and actionable maintainability signals without retaining or forwarding the code.
Protocol
x402 (POST)
Price
$0.03
Payment Asset
USD Coin
Payment Network
Base
Category
developer
Provider
API Acre
Source
bazaar
Indexed
2026-08-08 23:11:34
Health
Status
healthy
Latency (p50)
697ms
Uptime (30d)
73.3%
Reliability Score
76.7/100
Last Checked
2026-12-03 13:36:32
Last Healthy
2026-12-03 13:36:32
Consecutive Failures
0
x402 Payment Validation
Payment Requirements
Valid
Asset Verified
Known USDC
Facilitator
—
Input Schema
{
"body": {
"code": "def greet(name):\n return f'Hello {name}'",
"language": "python"
},
"bodyType": "json",
"method": "POST",
"type": "http"
}
Output Schema
{
"example": {
"data": {
"analysis": {
"limitations": [
"AST complexity is a static heuristic, not a runtime or co...",
"Comment counts include comment-only lines, not inline com..."
],
"method": "Python AST with deterministic lexical metrics",
"version": "apiacre-code-metrics/3"
},
"averageLineLength": 21,
"blankLineDensity": 0,
"branchPoints": 0,
"classes": 0,
"commentDensity": 0,
"complexityPerFunction": 1,
"estimatedCyclomaticComplexity": 1,
"functionMetrics": [
{
"endLine": 2,
"kind": "function",
"line": 1,
"name": "greet"
}
],
"functions": 1,
"functionsTruncated": false,
"language": "python",
"lines": {
"blank": 0,
"code": 2,
"comments": 0,
"total": 2
},
"longLineCount": 0,
"maintainabilitySignal": 95,
"maximumFunctionComplexity": 1,
"maximumLineLength": 26,
"reviewSignals": [],
"source": {
"characters": 43,
"sha256": "d588756864c1c6b9016a1829ea9283915950ef23e5b1c04018413ed71...",
"utf8Bytes": 43
},
"syntax": {
"engine": "python-ast",
"error": null,
"valid": true
},
"workMarkerCount": 0
},
"meta": {
"cached": false,
"duration_ms": 42,
"next_actions": [
{
"method": "POST",
"reason": "Compare the measured source with a caller-supplied baseli...",
"service": "developer.code-change-review",
"title": "Code change review"
}
],
"sources": [],
"warnings": []
},
"request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
"service": "developer.code-metrics",
"version": "1"
},
"type": "json"
}
Recent Health Checks
| Time | Status | HTTP | Latency | Error |
|---|---|---|---|---|
| 2026-12-03 13:36:32 | healthy | 402 | 697ms | |
| 2026-12-03 10:45:50 | healthy | 402 | 644ms | |
| 2026-12-03 06:54:10 | healthy | 402 | 6481ms | |
| 2026-12-03 03:35:49 | error | — | — | fetch failed |
| 2026-12-03 00:36:26 | healthy | 402 | 2377ms | |
| 2026-12-02 21:58:21 | healthy | 402 | 975ms | |
| 2026-12-02 20:00:34 | healthy | 402 | 1109ms | |
| 2026-12-02 17:42:13 | healthy | 402 | 573ms | |
| 2026-12-02 14:58:56 | error | — | — | fetch failed |
| 2026-12-02 12:50:01 | healthy | 402 | 458ms | |
| 2026-12-02 10:06:05 | healthy | 402 | 133ms | |
| 2026-12-02 07:58:00 | healthy | 402 | 286ms | |
| 2026-12-02 04:19:35 | healthy | 402 | 725ms | |
| 2026-12-02 00:04:42 | error | — | — | fetch failed |
| 2026-12-01 14:30:23 | timeout | — | — | timeout |