Log in Sign up
Docs/Getting Started/Introduction

Introduction

Ksty.ch is one account and one key for every API in the catalog. This guide covers the base URL, authentication, billing and errors — everything you need before your first call. Browsing the docs never requires a login.

One account, many APIs

Each API in the catalog is an independent service with its own endpoints, parameters and price — but they all sit behind a single gateway and a single identity. You integrate once: the auth header, the error shape and the billing model never change as you add more APIs. Pick any API from the sidebar to read its full reference.

One keyThe same X-Api-Key header works for every API you have access to.
One billUsage is metered in credits from a single balance — no per-vendor contracts.
One shapeJSON responses and a single error envelope across the whole catalog.

Base URL

Every API is served from a single stateless gateway. Address an API by its slug, and a specific endpoint on that API with dot notation (slug.endpoint). There are no per-vendor hosts to manage.

https://ksty.ch/api/v1/{slug} https://ksty.ch/api/v1/{slug.endpoint}

The gateway accepts both GET and POST for every endpoint. Use query-string parameters for GET, or a form / JSON body for POST — they are read identically.

Quick start

Creating your first API key releases 500 free credits, so you can build before you pay. Call any endpoint with your key in the X-Api-Key header — a first successful call takes under a minute.

1.Sign in with your email — a one-time code, no password. New accounts receive free credits.
2.Create a key at Dashboard → API Keys (a test key is free on sandbox-enabled APIs).
3.Send it in the X-Api-Key header on any request.
curl -X POST https://ksty.ch/api/v1/text-analysis \ -H "X-Api-Key: ksty_live_9f2a…" \ -H "Content-Type: application/json" \ -d '{"text":"The quick brown fox jumps over the lazy dog."}'

That calls Text Analysis; every API works the same way at https://ksty.ch/api/v1/{slug}.

Authentication

All requests are authenticated with an API key sent in the X-Api-Key header. Keys come in live and test modes and are shown in plaintext only once — at creation.

X-Api-Key: ksty_live_9f2a3b7c…

Never send your key as Authorization: Bearer — that header is reserved by the platform. Always use X-Api-Key.

ksty_live_Charges credits and hits real upstreams. Use in production.
ksty_test_Free sandbox mode; works on sandbox-enabled APIs and returns representative fixture data.

Credits & billing

Usage is metered in credits — no subscriptions, no per-API contracts. 1 USD = 1,000 credits, and every successful live call tells you exactly what it cost in the response headers.

X-Credits-Charged: 3 X-Credits-Remaining: 497

Credits are drawn in a fixed order so free and expiring balances are always spent before money you paid:

1.Per-API free grants (endpoint-specific free tier).
2.Promotional credits (expiring — e.g. your signup grant).
3.Paid balance (purchased, never expires).

If your balance is too low to cover a call, the gateway returns 402 insufficient_credits and nothing is charged — the call never reaches the upstream.

Errors

Every error from the gateway is JSON with a stable machine-readable code, a human message and the request id. Branch on error.code — never on the message text, which may change.

{ "error": { "code": "insufficient_credits", "message": "This call costs 25 credits but only 12 are available. …", "request_id": "req_8f21c…" } }
400invalid_requestA parameter is missing or malformed. Each API's reference lists its own validation errors.
401missing_keyNo API key was sent. Send your key in the X-Api-Key header (or an api_key parameter).
401invalid_keyThe key is not recognised — mistyped, truncated or never issued. Copy the key again from the API keys page. Repeated bad keys from one address are throttled, so fix it rather than retrying.
402insufficient_creditsThe balance can't cover the call. Top up on the Billing page. Nothing is charged and the call never reaches the API.
403key_suspendedThe key is suspended (for example after an abuse review). The reason is shown on the API keys page; contact support to have it restored.
403key_revokedThe key was revoked, or it belongs to a team you have left. Create or use another key.
403key_expiredThe key is past the expiry date set on it. Create a new key, or one without an expiry.
403out_of_scopeThe key is valid but not scoped to this API. Add this API to the key's scopes, or use a key scoped to all APIs.
403sandbox_disabledA test (ksty_test_) key was used on an API with no sandbox. Use a live key for this API.
403ip_blockedThe key has an IP allowlist and the calling address isn't on it. Call from an allowed address, or edit the key's allowlist.
403geo_blockedCalls from this country aren't permitted for this API. Contact support if you believe this is wrong.
403spend_cap_reachedThe account has the credits, but this API's monthly spend cap is used up. Raise or clear the cap on the API's page in your dashboard — topping up won't help.
404unknown_apiNo public API has that slug. Check the slug against the catalog.
404unknown_endpointThe API has no endpoint with that name. Check the endpoint list on the API's reference page.
405method_not_allowedThe endpoint accepts only GET or only POST. Use the method shown for the endpoint.
429rate_limitedA rate limit was exceeded — per key, per account across all your keys, or the tighter per-account limit on AI APIs. Wait for Retry-After seconds. A second key shares the account limit, so it won't help.
502api_unavailableThe API is temporarily unavailable. Nothing was charged. Retry later; check the status page.
502upstream_errorThe API failed while processing the call. Safe to retry — any credits taken are refunded automatically.

If an API fails after you were charged, the credits are refunded automatically — so it is always safe to retry a 502.

Rate limits & response headers

Live calls are limited per minute at three levels — per key, per account across all your keys, and a tighter per-account limit on AI APIs. Every response reports the limit you're closest to, so you can slow down before you hit it; a 429 adds Retry-After.

X-RateLimit-Limit: 60 X-RateLimit-Remaining: 57 X-RateLimit-Reset: 1760600460
X-Request-IdIdentifier for this call — on every response, in every error body and in your usage log. Quote it in support requests.
X-Credits-ChargedCredits taken for this call. Zero on test-mode calls and on errors raised before the work started.
X-Credits-RemainingBalance left afterwards, across per-API grants, promotional and paid credits.
X-RateLimit-LimitRequests allowed per minute by the limit you are closest to (key, account or AI tier).
X-RateLimit-RemainingRequests left in the current window of that limit.
X-RateLimit-ResetUnix time when that window resets.
Retry-AfterOn a 429 only: seconds to wait before retrying.

All APIs

8 APIs in 6 categories. One key calls all of them; the badge is the credit cost per call.