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

# Dedicated endpoints

> Reserve model capacity, send requests, monitor usage, and cancel service

Reserve model capacity by choosing a model and plan. Morph provisions and operates it; once ready, connect an OpenAI client using the endpoint's URL and served model name.

> [!NOTE]
>
> Idle capacity remains allocated and billable. Endpoints do not automatically shrink with traffic or scale to zero.

## Create an endpoint

> [tab] CLI
>
> Install the Morph CLI:
>
> ```bash theme={null}
> curl -fsSL https://morphllm.com/install.sh | bash
> export PATH="$HOME/.local/bin:$PATH"
> ```
>
> Create a [dashboard API key](https://www.morphllm.com/dashboard/api-keys) for the endpoint's account or organization, then set it in your terminal:
>
> ```bash theme={null}
> export MORPH_API_KEY="YOUR_MORPH_API_KEY"
> morph dedicated models
> morph dedicated create deepseek-v4-flash
> ```
>
> `models` lists valid IDs; substitute one for `deepseek-v4-flash` if needed.
>
> Without a plan flag, `create` opens the browser plan picker. Select the owning account or organization there; the CLI key does not select browser billing. Choose capacity, review the agreement, and confirm.
>
> Alternatively, choose `--price`, `--balanced`, or `--fast` in the terminal:
>
> ```bash theme={null}
> morph dedicated create deepseek-v4-flash --balanced
> ```
>
> The CLI shows the plan, requests confirmation, then uses saved payment details or opens hosted checkout. Use one purchase flow per endpoint.

> [tab] Dashboard
>
> From [Dedicated](https://www.morphllm.com/dashboard/dedicated), [create an endpoint](https://www.morphllm.com/dashboard/dedicated/create).
>
> Choose a model and capacity. Review price, billing account, and agreement before purchasing. Organization purchases require an admin.

## Wait for readiness

Watch provisioning on the endpoint's dashboard detail page, or list and inspect orders:

```bash theme={null}
morph dedicated list
morph dedicated status ENDPOINT_ID
```

Use the ID from your purchase or endpoint list. Send requests only once `state` is `ready`. Provisioning must finish within a two-hour activation window that starts at payment; an order not `ready` by then is refunded automatically.

Get connection details and lifecycle events as JSON:

```bash theme={null}
morph dedicated status ENDPOINT_ID --json
```

After activation, `endpoint.endpointUrl` and `endpoint.servedModelName` identify your endpoint. Use this served name for requests, not the catalog ID.

### Endpoint states

`state` is the field to act on. Every endpoint is in exactly one:

| `state` | Meaning | Serves requests |
| :- | :- | :- |
| `checkout_pending` | Waiting for payment. | No |
| `paid`, `capacity_held`, `provisioning`, `pr_open`, `merged`, `deploying` | Provisioning, in that order. | No |
| `ready` | Live. | Yes |
| `suspended` | Paused after a failed payment's grace period; returns to `ready` once payment recovers. | No |
| `refunding`, `refunded` | Ended before activation: canceled, provisioning failed, no capacity, or the activation window elapsed. Refund in progress, then complete. | No |
| `failed` | Ended with an error that needs support. Rare. | No |
| `canceled` | Ended after activation, or checkout abandoned. | No |

`ready` is the only serving state. The status response also has `provisioningStatus` (`pending`, `pr_open`, `merged`, `deploying`, `ready`, `failed`, or null), which tracks only the deployment job. Use it for diagnosis, not gating: it stays `ready` after an endpoint is suspended or canceled.

To see why an order ended before activation, check the last lifecycle event in `status --json` or `history`: `deployment.failed`, `capacity.unavailable`, `activation.timed_out`, or `cancellation.before_activation`.

`refunded` and `canceled` are final. Ended endpoints stay in your list indefinitely, and their `endpointUrl` and `servedModelName` remain populated, so always filter on `state`.

### Discover endpoints from code

The CLI reads a public HTTP API you can call with the same key:

```bash theme={null}
curl https://api.morphllm.com/api/v1/dedicated/endpoints \
  -H "Authorization: Bearer $MORPH_API_KEY"
```

Each listed endpoint includes `state`, `endpointUrl`, and `servedModelName`, so discovery needs no per-endpoint call. An organization key lists the organization's endpoints; a personal key lists the user's own. See the [API reference](https://docs.morphllm.com/api-reference/endpoint/dedicated-list.md) for the list, [status](https://docs.morphllm.com/api-reference/endpoint/dedicated-get.md), and [cancel](https://docs.morphllm.com/api-reference/endpoint/dedicated-cancel.md) routes, with example responses.

## Send a request

Copy connection details from the dashboard or status response; set them alongside your key:

```bash theme={null}
export MORPH_API_KEY="YOUR_MORPH_API_KEY"
export MORPH_ENDPOINT_URL="YOUR_ENDPOINT_URL"
export MORPH_ENDPOINT_MODEL="YOUR_SERVED_MODEL_NAME"
```

Supply the URL without `/v1`; these examples append it.

> [tab] Python
>
> Run `pip install openai`, then:
>
> ```python theme={null}
> import os
> from openai import OpenAI
>
> client = OpenAI(
>     api_key=os.environ["MORPH_API_KEY"],
>     base_url=os.environ["MORPH_ENDPOINT_URL"].rstrip("/") + "/v1",
> )
>
> response = client.chat.completions.create(
>     model=os.environ["MORPH_ENDPOINT_MODEL"],
>     messages=[{"role": "user", "content": "Hello!"}],
> )
> print(response.choices[0].message.content)
> ```

> [tab] JavaScript
>
> Run `npm install openai`. Save as `request.mjs`; run `node request.mjs`:
>
> ```javascript theme={null}
> import OpenAI from "openai";
>
> const endpointUrl = process.env.MORPH_ENDPOINT_URL;
> const model = process.env.MORPH_ENDPOINT_MODEL;
> if (!endpointUrl || !model) {
>   throw new Error("Set MORPH_ENDPOINT_URL and MORPH_ENDPOINT_MODEL from the endpoint status.");
> }
>
> const client = new OpenAI({
>   apiKey: process.env.MORPH_API_KEY,
>   baseURL: endpointUrl.replace(/\/$/, "") + "/v1",
> });
>
> const response = await client.chat.completions.create({
>   model,
>   messages: [{ role: "user", content: "Hello!" }],
> });
> console.log(response.choices[0].message.content);
> ```

Keys must belong to the endpoint's account or organization. `morph token new` saves a CLI key; SDKs still need `MORPH_API_KEY` exported.

## Monitor your endpoint

Open its dashboard:

```bash theme={null}
morph dedicated dashboard ENDPOINT_ID
```

View provisioning, request counts, token usage, latency, and success metrics where available. Logs contain operational metadata, excluding prompts and responses.

```bash theme={null}
morph dedicated logs ENDPOINT_ID
morph dedicated logs ENDPOINT_ID --errors
morph dedicated logs ENDPOINT_ID --follow
morph dedicated history ENDPOINT_ID
```

`logs --follow` polls until Ctrl+C; `history` shows lifecycle events, including provisioning. Logs are empty before activation because requests are not yet served.

## Capacity and scaling

Lower traffic does not reduce reserved capacity or charges. The CLI and dashboard expose no autoscaling limits, scaling to zero, region selection, custom weights, or engine configuration. Morph manages serving and placement; contact us for other capacity arrangements.

Endpoint access is scoped to your account, but hardware is not exclusive: idle hardware may serve other traffic.

Use [general inference](https://docs.morphllm.com/general-inference.md) without reserving capacity.

## Billing and cancellation

Hourly plans bill reserved GPU time from readiness, including idle time. Displayed token counts measure usage, not charges. Check your checkout agreement for rates and service terms.

In [Dedicated](https://www.morphllm.com/dashboard/dedicated), select **Cancel dedicated** on the order or detail page and confirm. Organization cancellations require an admin. Alternatively:

```bash theme={null}
morph dedicated stop ENDPOINT_ID
```

Canceling a purchased order before activation stops billing immediately, moves it to `refunding`, and refunds collected payment. Active endpoints follow their agreement: they stay `ready`, serving and billing, until the cancellation response's effective date (`cancelEffectiveAt` in `status`), then move to `canceled`.

Verify with `morph dedicated status ENDPOINT_ID`. Cancel accidental purchases before creating another endpoint.

## Troubleshoot a request

| Symptom | What to check |
| :- | :- |
| Still provisioning | Check `status` and `history`; wait for `state` `ready`. |
| Unauthorized | Use a valid key from the owning account or organization. |
| Model not found | Use the served model name, not the catalog ID. |
| Request fails | Check `logs --errors` and readiness. |
| Organization purchase or cancellation denied | Ask an organization admin. |

For provisioning failures, send [support](https://www.morphllm.com/contact) the endpoint ID and history. Do not duplicate pending orders.


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