API Health Check
Call an API endpoint and check the response status and schema.
Pay by wallet (x402)
api-health-check Example
Example answer
{
"url": "https://example.com",
"error": "fetch failed",
"method": "GET",
"is_healthy": false,
"response_time_ms": 12
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
url | string | Yes | API endpoint URL |
body | any | No | — |
method | string | No | — |
headers | object | No | — |
expected_schema | object | No | — |
expected_status | integer | No | — |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
is_healthy | boolean | Always (present in every successful answer) |
status_code | integer | Always (present in every successful answer) |
schema_valid | boolean | Always (present in every successful answer) |
response_body | any | Always (present in every successful answer) |
response_time_ms | integer | Always (present in every successful answer) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "api-health-check",
"inputs": {
"url": "https://api.strale.io/health"
},
"max_price_cents": 5
}' {
"tool": "strale_execute",
"arguments": {
"slug": "api-health-check",
"inputs": {
"url": "https://api.strale.io/health"
},
"max_price_cents": 5
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "api-health-check",
inputs: {
"url": "https://api.strale.io/health"
},
max_price_cents: 5,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="api-health-check",
inputs={
"url": "https://api.strale.io/health",
},
max_price_cents=5,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/api-health-check?url=https%3A%2F%2Fapi.strale.io%2Fhealth' Limitations
Business logic and data integrity are not checked
Checks endpoint reachability and response status — cannot verify business logic correctness or data integrity
What to do instead: Validate the expected response schema and test business rules separately.
API responses are limited to 4 MiB
API response bodies above 4 MiB are refused during download rather than parsed.
Related tools
- Accessibility Audit €0.30
- Social Preview Image Check €0.05
- URL Health Check €0.03