# Model setup (backend LLM)

Source: https://nodedocs.mor.org/providers/full/model-setup

## 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.

The Morpheus proxy-router does **not** run inference itself. It forwards prompts to whatever OpenAI-compatible HTTP endpoint you point it at via [`models-config.json`](/reference/models-config). That endpoint is your "backend LLM" or "model server."

> This page is intentionally short. Picking, sizing, and operating an inference engine is its own discipline; we link to the canonical references rather than maintaining our own.

## Common backends

  
- **[llama.cpp / llama-server](https://github.com/ggerganov/llama.cpp)** — Single-binary CPU/GPU inference. Bundled in our local-only demo.

  
- **[vLLM](https://github.com/vllm-project/vllm)** — Production-grade GPU serving with continuous batching.

  
- **[Ollama](https://ollama.com)** — Easy local model server, `OpenAI`-compatible.

  
- **Hosted reseller** — Front Venice / OpenAI / Anthropic via `apiUrl` + `apiKey` in `models-config.json`. See [Resale provider](/providers/resale/overview).

## What the proxy-router needs from your backend

- **OpenAI-compatible** route appropriate for the model type:
  - LLM: `/v1/chat/completions`
  - Embeddings: `/v1/embeddings`
  - STT: `/v1/audio/transcriptions`
  - TTS: `/v1/audio/speech`
  - Video: none. A hosted video vendor is reached through its own adapter: see [Hosted video models](/providers/full/model-setup#hosted-video-models).
- A **stable, private URL** the proxy-router can reach (e.g. `http://10.0.0.5:8080/v1/chat/completions`).
- Enough **concurrency** to satisfy the `concurrentSlots` you advertise in `models-config.json`.

## Capacity recommendations

There is no one-size-fits-all sizing — start by measuring on your own hardware. The [`tech.mor.org` calculators](https://tech.mor.org) help estimate revenue and tokens-per-second across hardware tiers; mirror summary at [tech.mor.org (mirror)](/ecosystem/tech-mor-org).

## TEE backends

For full Phase 2 attestation, the backend itself must run inside a SecretVM-style TEE that exposes attestation endpoints (`/cpu`, `/gpu`, `/docker-compose`) on `:21434` (host-net Caddy topology, used by current SecretAI backends) or `:29343` (attest-rest bound directly). The P-Node resolves the port automatically by probing `/cpu` on `:21434` first, then `:29343`. See:
- [TEE overview](/concepts/tee-overview)
- [TEE reference](/providers/full/tee-reference)
- Backend-side developer reference: [TEE backend verification](/providers/full/tee-backend-verification) (and [SEV verification](/providers/full/sev-verification) for AMD SEV-SNP backends)

## Hosted video models

A provider can sell video clips generated by a hosted vendor: text-to-video, and image-to-video from a first frame. The proxy-router has an adapter for two vendors, chosen by `apiType` in `models-config.json`: `byteplus-video` for BytePlus ModelArk (Seedance) and `renderful` for Renderful. Each one's `apiUrl`, `modelName` format, first-frame rules and per-model limits are in [models-config.json → Video models](/reference/models-config#video-models).

A video model does not answer `/v1/chat/completions`. A consumer quotes a job, opens a session on your bid for the quoted length, and submits jobs on that session through the proxy-router API ([Video generation](/consumers/video)). MorpheusUI and the hosted Inference API do not run video jobs. Your node sends each job to the vendor with your API key and relays the job's status; the key never leaves your node. The vendor serves the finished clip from its own link: your node does not store or proxy the file.

  
### Get a vendor account and API key

Create an API key in the BytePlus ModelArk console or in your Renderful account. Jobs run on that account, so keep it funded.

  
### Activate the model (BytePlus)

In the ModelArk console, activate the model for your account. Until you do, every job fails with a vendor `404` (`ModelNotOpen`).

  
### Add the models-config entry

`modelId` is the on-chain id of the model you will bid on: [look it up first](/providers/full/register-onchain#step-0--look-up-models-before-you-mint). If you have to register a new model, fill it in after the next step.

    ```json
    {
      "models": [
        {
          "modelId": "0x<your_chain_modelId>",
          "modelName": "dreamina-seedance-2-0-260128",
          "apiType": "byteplus-video",
          "apiUrl": "https://ark.ap-southeast.bytepluses.com/api/v3",
          "apiKey": "<your BytePlus API key>"
        },
        {
          "modelId": "0x<your_chain_modelId_2>",
          "modelName": "seedance-2.5-t2v",
          "apiType": "renderful",
          "apiUrl": "https://api.renderful.ai/api/v1",
          "apiKey": "<your Renderful API key>"
        }
      ]
    }
    ```

    - `apiUrl` is the vendor's API base, not a full endpoint path. Set it to the base shown in the example: `apiUrl` is a required field of `models-config.json`.
    - `modelName` sets the limits your node offers: duration range, resolutions, aspect ratios, audio and first frame ([models-config.json](/reference/models-config)).
    - There is no `video` block and no per-clip price; a leftover `video` key is ignored.

    Apply it with `POST /config/models/reload`, or restart the proxy-router.

  
### Register with a video tag and bid

Bid on an existing model whose `ModelType` is `VIDEO` in `GET /blockchain/models`, or register a new one with a video tag such as `video` or `t2v`. [Register on chain](/providers/full/register-onchain) lists the tags that count. The bid's `pricePerSecond` sets the price.

  
### Check /healthcheck

Once the bid is active, the next sweep reports the model in `GET /healthcheck`; `POST /healthcheck/models/refresh` queues one now. A video model gets a free vendor probe that never renders a clip: read the result with [Model health self-report](/providers/full/model-health). The probe cannot see an inactive model or an empty balance, so finish with one real job from a consumer node ([Verify your provider setup](/providers/full/verify-setup)).
