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

# Kordio documentation

> Two APIs on one host. Pick the one you are integrating.

Kordio is the financial control plane: the rules and the record for money your software moves.
Control decides what is allowed before it happens, and Ledger records what did. They are two APIs
on one host, sharing an account and a set of test-mode credentials, and you can use either one on
its own.

> [card] [Kordio Control](https://docs.kordio.io/agents/quickstart.md)
>
> Your software asks before it spends. You get `allowed`, `requires_approval`, or `denied` in
> the same request, naming the rule that decided, plus a signed grant your executor can verify
> without trusting the caller that carries it. Kordio Control, in early access.
>
> **Start here if** something other than a person can start a payment or a paid API call on
> your behalf.

> [card] [Ledger](https://docs.kordio.io/ledger/quickstart.md)
>
> Double-entry accounting over HTTP. Post balanced transactions, read balances and
> statements at any instant, and reconcile against the outside world. Debits equal credits
> per currency or the write is rejected.
>
> **Start here if** you need an auditable record of what money meant, separate from
> whatever moved it.

## The call each one is about

One call from each, so you can recognize which one you need.

```bash Kordio Control theme={"dark"}
curl -X POST https://api.kordio.io/control/v1/agent/actions \
  -H "Authorization: Bearer $KORDIO_AGENT_KEY" \
  -H "Idempotency-Key: order-4471" \
  -d '{"budget_id":"3f1c...","action_type":"payment.create","cost_cents":12000}'
# 201 allowed, 202 requires_approval, 403 denied
```

```bash Ledger theme={"dark"}
curl -X POST https://api.kordio.io/ledger/v1/transactions \
  -H "Authorization: Bearer $KORDIO_TOKEN" \
  -H "Idempotency-Key: invoice_001" \
  -d '{"postings":[
        {"account":"cash:usd","amount":"1000","currency":"USD","direction":"debit"},
        {"account":"revenue","amount":"1000","currency":"USD","direction":"credit"}]}'
```

## Which credential do I have?

The most common way to arrive here is holding a string somebody else generated.

| If you are holding | You want |
| - | - |
| A key starting `krt_` | [Kordio Control: runtime keys](https://docs.kordio.io/agents/authentication.md) |
| A `client_id` and `client_secret` | [Ledger: OAuth client credentials](https://docs.kordio.io/ledger/authentication.md) |
| A dashboard login and nothing else | [Getting your credentials](https://docs.kordio.io/agents/authentication.md#getting-your-credentials) |

## Using both?

Start with spend control. Where the ledger is enabled, the reservations it takes are mirrored
into the books as balanced postings: each workspace owns its books and each agent owns an account
inside them. You do not write those postings yourself, and you do not need to read the ledger
docs to ship the control layer.

Control decides what may happen; Ledger records what did. They are two API surfaces with their
own authentication, which is why they have their own reference sections.

> [!NOTE]
>
> Check **Billing** in the [console](https://app.kordio.io) for what your workspace has today,
> including whether the ledger projection is on.

## New to the problem, not the API?

> [card] [Where Kordio fits](https://docs.kordio.io/positioning.md)
>
> What sits between an agent and a payment rail, and who each half of this is for.

> [card] [Where a control layer fits](https://docs.kordio.io/agents/why.md)
>
> Why a prompt, a hard-coded cap, and a card limit each stop short.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.