---
title: "Buy a new API key with USDC, USDT, or BTC (no auth required)"
method: POST
path: "/v1/keys/buy"
tags: ["Agent Onboarding"]
---

# Buy a new API key with USDC, USDT, or BTC (no auth required)

`POST /v1/keys/buy`

## Request

- Base URL: `https://api.insumermodel.com`
- URL: `https://api.insumermodel.com/v1/keys/buy`
- Auth: none required

Agent-friendly key purchase: send USDC, USDT, or BTC to the platform wallet (EVM USDC/USDT: `0xAd982CB19aCCa2923Df8F687C0614a7700255a23` — same on all chains; Solana USDC/USDT: `6a1mLjefhvSJX1sEX8PTnionbE9DqoYjU6F6bNkT4Ydr`; Bitcoin BTC: `bc1qg7qnerdhlmdn899zemtez5tcx2a2snc0dt9dt0`; Tron USDT-TRC20: `TC5yvwkAMakkXtUxYiu2Yn1xbBcwYuD6cn`), then call this endpoint with the transaction hash to receive a new API key with credits. No email or prior authentication needed — the sender wallet address from the transaction becomes the key's identity. One key per wallet address. Alternative: email-based free-tier signup via POST /v1/keys/create (10 free credits, no card). Use POST /v1/credits/buy to top up an existing key. Volume discounts: $5–$99 = 25 credits/$1 ($0.04/call), $100–$499 = 33 credits/$1 ($0.03/call, 25% off), $500+ = 50 credits/$1 ($0.02/call, 50% off). USDC and USDT accepted on EVM chains and Solana (auto-detected from transaction). USDT-TRC20 accepted on Tron. BTC accepted on Bitcoin (converted to USD at market rate, requires 1 confirmation). Crypto sent on unsupported chains cannot be recovered. All purchases are final and non-refundable.

## Request body

- object
  - `txHash` string, required: Transaction hash proving payment
  - `chainId` union, required: Chains supported for crypto payments. EVM chains and Solana accept USDC and USDT. Bitcoin accepts BTC (converted to USD at market rate, requires 1 confirmation). Tron accepts USDT-TRC20.
    - 1 | 8453 | 137 | 42161 | 10 | 56 | 43114
    - 'solana' | 'bitcoin' | 'tron'
  - `amount` number: Stablecoin amount sent (min 5). Not required for BTC — USD value is derived from the on-chain BTC amount at market rate.
  - `appName` string, required: Name for this API key (e.g. your agent or app name)
  - `channel` string: Optional attribution label recorded with the purchase (e.g. the integration or marketplace the buyer came through).
  - `keyDelivery` 'wallet' | 'apiKey' | 'both': Preferred credential shape. Default `wallet` returns no API key string when an Insumer Access SBT is minted to the sender wallet — the wallet + pass becomes the credential, and subsequent calls authenticate via Authorization: Wallet. `apiKey` (or its alias `both`) returns the API key string in the response alongside the pass; the wallet still receives the SBT on EVM payments and can use either credential on /v1/attest and /v1/credits/buy. When the SBT cannot land (non-EVM payment, or deferred EVM mint), the API key is returned regardless of this setting so the caller is never left without a usable credential. Case-insensitive.

## Response `200`

API key created with credits

- object
  - `ok` true
  - `data` object
    - `success` boolean
    - `key` string: Your new API key (store securely — shown only once). CONDITIONALLY PRESENT: omitted when the wallet receives an Insumer Access SBT on this purchase AND the request set `keyDelivery: "wallet"` (the default). In that case the wallet + SBT is the credential and the agent authenticates via Authorization: Wallet. The key is always returned when `keyDelivery` is `apiKey` or `both`, or when the SBT cannot land (non-EVM purchase, or `passMint.status: "deferred"`).
    - `authMethod` 'wallet' | 'apiKey' | 'both': Indicates which credential(s) were delivered. `wallet` — only the wallet + SBT is the credential (no `key` field in this response). `apiKey` — only the API key string was delivered (no SBT in the wallet; non-EVM payment or deferred mint). `both` — the wallet holds the SBT AND the response carries an API key string; either may be used on wallet-auth-eligible endpoints.
    - `authHint` string: Human-readable guidance for the caller on how to authenticate going forward. Present when `authMethod` is `wallet` or `both`; absent when `authMethod` is `apiKey` (standard X-API-Key usage needs no hint).
    - `name` string
    - `tier` string
    - `dailyLimit` integer
    - `creditsAdded` integer
    - `totalCredits` integer
    - `usdcPaid` string: Stablecoin amount verified. Present on all purchases except Bitcoin.
    - `btcPaid` string: BTC amount verified. Present on Bitcoin purchases; usdcPaid otherwise.
    - `btcPrice` number: BTC/USD market rate used for conversion. Present on Bitcoin purchases; usdcPaid otherwise.
    - `usdEquivalent` string: USD value credited. Present on Bitcoin purchases; usdcPaid otherwise.
    - `effectiveRate` string
    - `chainName` string
    - `registeredWallet` string: Wallet address registered to this key (extracted from transaction)
    - `passMint` object: Result of the Insumer Access SBT mint. EVM purchases mint the SBT to the sender wallet on Base mainnet so the wallet can authenticate to /v1/attest via `Authorization: Wallet ...` (SDK: @skyemeta/access). Mint is fail-open — a mint failure does not block the key purchase; the API key + credits are issued regardless. Non-EVM purchases (Solana/BTC/Tron) skip the mint since the sender has no native EVM address; those buyers can use X-API-Key auth, or a future endpoint accepting an explicit EVM mintTo address.
      - `status` 'minted' | 'already_held' | 'deferred' | 'skipped': `minted` = SBT freshly minted to the sender wallet on Base. `already_held` = wallet already holds a pass (idempotent). `deferred` = the mint did not complete; caller can retry via a future mint-retry endpoint. `skipped` = non-EVM payment chain (Solana/BTC/Tron).
      - `tokenId` string, nullable: Token ID of the SBT. May be null on `deferred` or if the post-tx verification read failed (mint receipt still confirmed).
      - `txHash` string, nullable: Base transaction hash of the mint. Null on `already_held`, `deferred`, or `skipped`.
      - `collection` string: Insumer Access collection contract address on Base (0x3E2a408cc6eceba04FF9d04A5B8B05aBa8DD50ce).
      - `chainId` integer: Base mainnet chain ID (8453).
      - `blockNumber` string, nullable: Base block number the mint landed in. Null on `already_held`, `deferred`, or `skipped`.
      - `reason` string: Present on `deferred` and `skipped`. Human-readable explanation of why the mint did not happen.
  - `meta` Meta
    - `version` string
    - `timestamp` string, date-time

## Other responses

- `400`: Validation error
- `409`: Key already exists for this wallet, or transaction already used
- `422`: On-chain verification failed
- `500`: Unexpected server error. Safe to retry; no credits are charged on a 500. Router endpoints return the standard error envelope; standalone endpoints (the ones whose 200 is a flat object) return a flat {"error": "..."} object.
- `503`: On-chain verification temporarily unavailable. Retry in a few seconds.

---

[API](https://skmtc.dev/insumermodel/apis/insumerapi.md) · [All operations](https://skmtc.dev/insumermodel/apis/insumerapi/llms.txt) · [OpenAPI document](https://skmtc.dev/insumermodel/apis/insumerapi/revisions/91f56fe9e3d8?raw)
