> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kealinks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# This document

> Generated from the running worker's own schemas on every request, so it describes the deployment you are talking to rather than the one that was current when the docs were last built.



## OpenAPI

````yaml /openapi.json get /api/openapi.json
openapi: 3.1.0
info:
  title: kealink API
  version: '2026-08-21'
  description: >-
    Permanent link shortening and dynamic QR codes.


    **A code we issue never stops resolving.** Not when the destination changes,
    not

    when a subscription lapses, not when the link is archived. Customers print
    these

    on physical materials, so a dead redirect is a reprint bill. Every design

    decision below follows from that.


    ### Authentication


    Send an API key as `Authorization: Bearer klk_...`. Mint one with

    `POST /api/billing/claim`. Keys are stored hashed and shown exactly once.


    ### Paying as an agent


    You do not need an account. `POST /api/links` with no credentials answers

    `402` with a machine-payment challenge — MPP (`WWW-Authenticate: Payment`)
    and

    x402 (`PAYMENT-REQUIRED`) on the same response. Pay either one, retry, and
    you

    get a permanent link plus an API key to repoint it with later.


    ### Errors


    Always `{ "error": "a sentence" }` with a real status code. `402` means this

    action needs payment — never that existing links stopped working.
  contact:
    name: kealink support
    url: https://kealinks.com
servers:
  - url: https://api.kealinks.com
    description: Production
security: []
tags:
  - name: Links
    description: Create and repoint permanent codes.
  - name: QR codes
    description: Print-ready artwork for a link.
  - name: Analytics
    description: Scans and clicks, by day, country, device or referrer.
  - name: Domains
    description: Serve your codes on your own hostname.
  - name: Account
    description: Tier, quota and what this account may do.
  - name: Billing
    description: Subscription lifecycle.
  - name: Team
    description: Workspaces and members.
  - name: Machine payments
    description: Buy a permanent link with no account, over MPP or x402. Built for agents.
  - name: Meta
    description: Discovery and health.
paths:
  /api/openapi.json:
    get:
      tags:
        - Meta
      summary: This document
      description: >-
        Generated from the running worker's own schemas on every request, so it
        describes the deployment you are talking to rather than the one that was
        current when the docs were last built.
      operationId: getOpenApiDocument
      responses:
        '200':
          description: An OpenAPI 3.1 document.
          content:
            application/json:
              schema:
                type: string
                format: binary
      security: []

````