Log in Sign up
Docs/Getting Started/Introduction

Introduction

Ksty.ch is one account and one key for hundreds of APIs across every category. 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

New accounts get 500 free credits at signup, 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 https://ksty.ch/api/v1/echo \ -H "X-Api-Key: ksty_live_9f2a…" \ -d "message=hello"

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": "Not enough credits for this call", "request_id": "req_8f21c…" } }
400invalid_request — a parameter is missing or malformed.
401invalid_key — missing or unrecognised API key.
402insufficient_credits — balance too low; nothing charged.
429rate_limited — too many requests.
502upstream_error — upstream failed; credits are refunded.

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