Docs · REST API

Use the REST API

One endpoint runs every tool. Send the tool and its inputs, and read the result.

Make your first call

Free tools run without a key, 300 calls a month per IP address. This call runs IBAN Validation.

  1. Send the request

    curl -X POST https://api.strale.io/v1/do \
      -H 'Content-Type: application/json' \
      -d '{
        "capability_slug": "iban-validate",
        "inputs": {
          "iban": "SE4550000000058398257466"
        },
        "max_price_cents": 1
      }'
  2. Read the response

    A success is HTTP 200. The tool’s answer is in result.output, the price charged in result.price_cents (0 for a free tool), and the source in result.provenance. Keyless calls also return free_tier: true and a usage block. The full shape is on the Docs overview.

  3. Add a key for more

    With a key, max_price_cents is required and free tools never charge. The same call with a key:

    With an API key
    curl -X POST https://api.strale.io/v1/do \
      -H "Authorization: Bearer $STRALE_API_KEY" \
      -H 'Content-Type: application/json' \
      -d '{
        "capability_slug": "iban-validate",
        "inputs": {
          "iban": "SE4550000000058398257466"
        },
        "max_price_cents": 1
      }'

Authenticate

Sign up for a key. It starts with sk_live_ and is shown once, so store it. Send it on every call.

Authorization header
Authorization: Bearer sk_live_your_key_here
  • A key may send 10 requests a second. Past that, calls return rate_limited with a Retry-After header.
  • GET https://api.strale.io/v1/wallet/balance returns balance_cents and currency.
  • POST https://api.strale.io/v1/auth/api-key, called with your current key, issues a new key and ends the old one.

Add to your balance

Top up with a card. The call returns a checkout_url; open it to pay. The minimum is €10.00.

Top up
curl -X POST https://api.strale.io/v1/wallet/topup \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"amount_cents": 1000}'

Run a bundled check

A bundled check runs several tools as one call at one price. It has its own endpoint, POST https://api.strale.io/v1/solutions/{slug}/execute, and needs a key. The body takes inputs and an optional max_price_cents.

API Quality Check, €0.50 per check
# Needs an API key. The whole check is charged once, at the listed price.
curl -X POST https://api.strale.io/v1/solutions/api-quality-check/execute \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "inputs": {
      "spec": "{\"openapi\":\"3.0.0\",\"info\":{\"title\":\"My API\",\"version\":\"1.0\"},\"paths\":{\"/users\":{\"get\":{\"summary\":\"List users\"}}}}"
    },
    "max_price_cents": 50
  }'
result.statusMeaningCharge
completedEvery step returned a result.Charged in full.
partialSome steps returned results and some failed. result.errors lists the failures.Charged in full.
failedEvery step failed.Refunded.

Results are in result.steps, keyed by tool. If a step finds that the check cannot continue, result.gated says which step stopped it and why, and the call is not charged.

Next steps