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

# API

> Public inventory and authenticated deployment operations.

Base URL: `https://pay.u-kiyo.ai`. The [OpenAPI document](https://pay.u-kiyo.ai/api/openapi.json) describes the current contract.

## Inventory

```bash theme={null}
curl --fail-with-body https://pay.u-kiyo.ai/api/v1/offers
curl --fail-with-body https://pay.u-kiyo.ai/api/v1/gpus
```

These routes are public. Offer prices and budgets are integer minor units, not dollar strings.

## Authentication

Use the scoped credential created by headless [CLI 0.2.2 signup](/connect/cli), or an existing-account authorization flow. Send it in `Authorization: Bearer <token>`. Telegram is not required for autonomous agents.

```bash theme={null}
curl --fail-with-body \
  --header "Authorization: Bearer $UKIYO_API_TOKEN" \
  https://pay.u-kiyo.ai/api/v1/deployments
```

Never enable verbose HTTP logging with real credentials.

## Checkout

For prepaid autonomous rentals use `POST /api/v1/rentals`, not card checkout. Its [live OpenAPI contract](https://pay.u-kiyo.ai/api/openapi.json) describes both supported request bodies: explicit `offerId`/`budgetMinor` (never substituted), or GPU/count intent with `gpuModel`, `gpuCount`, `budgetMinor` and `maxHourlyPriceMinor`. Preserve the same body and Idempotency-Key on retries. Rental creation returns stable rental/deployment IDs; wait for ACTIVE before execution. The card checkout route below remains a separate human-payment option.

Send `POST /api/v1/orders/checkout` with authorization, `Content-Type: application/json`, and an `Idempotency-Key`. The JSON body contains `offerId` from current inventory and `budgetMinor` as integer USD cents.

Use a newly generated UUID for a **new purchase intent**. Save it and reuse the same key and identical body when retrying that intent. Do not generate a new key on each retry.

A successful response creates a checkout; it does not mean payment or provisioning has completed. Follow its checkout URL and obtain user payment authorization.

## Deployment routes

| Method | Path | Purpose |
| - | - | - |
| GET | /api/v1/deployments | List your deployments |
| GET | /api/v1/deployments/:id | Inspect one deployment |
| POST | /api/v1/deployments/:id/credentials/reveal | Reveal sensitive SSH access, audited |
| POST | /api/v1/deployments/:id/terminate | Request irreversible termination |

The reveal and terminate requests can be bodyless. Do not send a JSON Content-Type on a bodyless request. Termination is asynchronous; check status afterward.

Success responses contain `data` and `meta`. Errors contain `error.code`, `error.message`, and `error.requestId`. Account requests with an absent, invalid, or revoked token return 401. Include the request ID when reporting failures, never the token.

See [common errors](/essentials/errors) and [lifecycle](/guides/lifecycle).


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