# Open a session (buy a bid)

Source: https://nodedocs.mor.org/consumers/buy-bid

## Agent Instructions

- Non-browser fetches of page URLs on this site return clean Markdown (not the JS UI). Prefer `https://nodedocs.mor.org/llms-full.txt` for the full corpus, or `https://nodedocs.mor.org/llms.txt` for the index.
- Per-page Markdown is also at `<page-url>.md` (homepage: `https://nodedocs.mor.org/index.md`).
- Docs search MCP: `https://nodedocs.mor.org/mcp` (discovery: `https://nodedocs.mor.org/.well-known/mcp`).
- Never invent contract addresses, chain IDs, token addresses, or live bid/model counts. Cite Networks and tokens; link active.mor.org for live data.
- Never claim Morpheus runs inference — independent providers do. Opening a session escrows MOR; it does not spend it.

Opening a session = "buying a bid." You stake MOR for a fixed duration; the proxy-router routes prompts to the chosen provider until the session closes (or you close it). The MOR is **escrowed**, not spent up-front — see [Sessions: stake, close, claim](/concepts/sessions-stake-close-recover) before you panic about a dropping wallet balance.

## Via MorpheusUI

  
### Confirm wallet funding

Lower-left of MorpheusUI shows your wallet address; the Wallet tab shows MOR and ETH balances. You need at least `5` MOR for a session and a small ETH balance for gas.

  
### Pick a remote model

Chat tab → **Change Model** → pick from the remote dropdown (anything other than "Local Model"). The dropdown lists models registered in the Diamond marketplace contract.

  
### Open a session

Click **Open Session**. Enter a stake (minimum `5` MOR). Confirm.

  
### Watch for the on-chain confirmation

A transaction will be submitted. Once confirmed, the session is open and you can prompt.

  
### Close when done (or let it expire naturally)

Either path:

    - **Natural expiration** — your consumer node submits `closeSession` ~1 minute after `endsAt` (if online).
    - **Early close** — click the time icon next to the model line; click **X** next to the session.

    In both cases: **unused** stake returns in the close txn; the **used stipend** day-locks in `userStakesOnHold` until the next UTC day. After `releaseAt`, claim with `POST /blockchain/stakes/withdraw` (or `withdrawUserStakes` on the Diamond). There is no `recover` RPC.

## Via the API

```bash
curl -X POST 'http://localhost:8082/blockchain/models/<modelId>/session' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic <base64(user:pass)>' \
  -d '{"sessionDuration": 600, "failover": false, "directPayment": false}'
```

Response:

```json
{ "sessionID": "0x8e12df2f764b416c0ea1936a253c2a4be01005651c2d73f22dd0d72520f93ca1" }
```

Close it:

```bash
curl -X POST 'http://localhost:8082/blockchain/sessions/<sessionId>/close' \
  -H 'Authorization: Basic <base64(user:pass)>' -d '{}'
```

## What you should expect

- **Wallet balance drops by the staked amount** the instant the open transaction is mined. The MOR is now in the Inference Contract on Base for the duration of the session.
- **On close (early or natural):** unused stake returns in the same txn; the used stipend day-locks with `releaseAt = startOfTheDay(min(closedAt, endsAt)) + 1 day`. After `releaseAt`, claim releasable rows with `POST /blockchain/stakes/withdraw`, or call `withdrawUserStakes(yourAddress, iterations)` directly on the Diamond when bypassing the node.
- **Capital planning:** used stake is **not reusable the same UTC day**. Size your wallet for the gross stake you need that day, not for recycling one pile of MOR many times before midnight UTC. See [Sessions: stake, close, claim](/concepts/sessions-stake-close-recover).
- **The provider is paid from a separate protocol funding account**, not from your stake in real time. If that funding account is empty or under-approved, every `closeSession` fails — yours included. The session sits "active" past `endsAt` until operators top it up. See [Why is my MOR locked?](/ai/why-locked-in-contract).
- For a hosted read-only wallet checker that splits your MOR across the three on-chain buckets (wallet / active session / on-hold), see [tech.mor.org/session.html](https://tech.mor.org/session.html).

## Picking a good bid

There is no single right answer; consider:

- **`pricePerSecond`** — lower is cheaper but providers compete on quality and uptime.
- **Provider reputation / stake** — higher provider stake means more skin in the game.
- **TEE vs non-TEE** — `tee`-tagged models give you cryptographic guarantees about the running software (see [TEE overview](/concepts/tee-overview)).
- **Throughput / capacity** — live files at [active.mor.org](https://active.mor.org). Name the layer ([Marketplace catalog](/ecosystem/active-status)); C-Node apps usually want **ACTIVE**. Explainer: [tech.mor.org/active.html](https://tech.mor.org/active.html).

For a `rating-config.json` that prefers certain providers automatically, see [rating-config](/reference/rating-config).
